2013-01-20 38 views
9

मैं निम्नलिखित कोड का उपयोग कर UIView एनिमेट कर रहा हूं। यह बहुत अच्छा काम करता है लेकिन मैं इसे एक ही समय में एनिमेट स्केल करने के लिए कैसे प्राप्त करूं, मैं आदर्श रूप से इसे स्पिन के दौरान 0 तक स्केल करना चाहूंगा।एकल एनिमेट के दौरान स्केल और घुमाने के लिए कैसे करें WithDuration कॉल

[UIView animateWithDuration:0.4 delay:0.0 options:UIViewAnimationOptionCurveEaseInOut 
       animations:^(void) { 
        recognizer.view.transform = CGAffineTransformMakeRotation(DegreesToRadians(540)); 
        recognizer.view.backgroundColor = [[UIColor alloc] initWithRed:220.0/255.0 green:220.0/255.0 blue:220.0/255.0 alpha:1.0]; 
       }]; 

उत्तर

11

बस CGAffineTransformConcat विधि का उपयोग करें। आज़माएं:

[UIView animateWithDuration:0.4 delay:0.0 options:UIViewAnimationOptionCurveEaseInOut 
       animations:^(void) { 
        recognizer.view.transform = CGAffineTransformConcat(CGAffineTransformMakeRotation(DegreesToRadians(540)), CGAffineTransformMakeScale(1.0, 1.0)); 
        recognizer.view.backgroundColor = [[UIColor alloc] initWithRed:220.0/255.0 green:220.0/255.0 blue:220.0/255.0 alpha:1.0]; 
       }]; 

आशा है कि मदद करता है!