यहाँ मैंने पाया है कि कैसे अब पदावनत beginAnimations:context:
पद्धति का उपयोग करके UIButton
के शीर्षक परिवर्तन चेतन करने के लिए:चेतन UIButton के शीर्षक परिवर्तन
UIBUtton title animation for iPhone
कैसे एक ही बात वर्तमान API का उपयोग करके करना है?
अद्यतन:
मैं ब्लॉक आधारित एनिमेशन का उपयोग करने की कोशिश की है:
NSTimeInterval animationDuration = animated ? 1.f : 0.f;
[UIView animateWithDuration:animationDuration delay:0.f options:UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction animations:^{
[button setTitle:newTitle forState:UIControlStateNormal];
[button setTitleColor:newTitleColor forState:UIControlStateNormal];
} completion:nil];
रंग बदलने एनिमेटेड नहीं है।
प्रलेखन की जांच करें, टीटी सभी UIView संदर्भ में विस्तार से बताया है: http://developer.apple.com/library/ios/#documentation/uikit/reference/uiview_class/uiview /uiview.html 'प्रारंभएनीकरण: संदर्भ:' प्रतिस्थापन के स्पष्ट स्पष्टीकरण के साथ। –