Use the performWithoutAnimation:
method and then force layout to happen immediately instead of later on.
[UIView performWithoutAnimation:^{
[self.myButton setTitle:text forState:UIControlStateNormal];
[self.myButton layoutIfNeeded];
}];
More Related Contents:
- Why shouldn’t I subclass a UIButton?
- Replacement for deprecated sizeWithFont: in iOS 7?
- How do you add multi-line text to a UIButton?
- invalid context 0x0 under iOS 7.0 and system degradation
- What’s the _ underscore representative of in Swift References?
- How to use a Objective-C #define from Swift
- Cannot access property on Swift type from Objective-C
- iOS start Background Thread
- how to check screen size of iphone 4 and iphone 5 programmatically in swift
- Advantages, problems, examples of adding another UIWindow to an iOS app?
- iOS 7 sizeWithAttributes: replacement for sizeWithFont:constrainedToSize
- Swift readonly external, readwrite internal property
- Can’t endBackgroundTask: no background task exists with identifier, or it may have already been ended
- How can I round a float value to 2 post decimal positions?
- UIButton events. What’s the difference?
- Why does my MCSession peer disconnect randomly?
- Swift native base class or NSObject
- Xcode 6 Swift code completion not working
- How can I add forward class references used in the -Swift.h header?
- Unable to add UITextField to UIAlertView on iOS7…works in iOS 6
- Restore pre-iOS7 UINavigationController pushViewController animation
- Can a Swift Optional Int (Int?) be exposed to Objective-C via bridging?
- UIScrollview with UIButtons – how to recreate springboard?
- Swift – Objective-C load class method?
- MKPolygon area calculation
- Is there a way for Interface Builder to render IBDesignable views which don’t override drawRect:
- Failed to import bridging header
- How do you load a prototype cell from a storyboard?
- Swift: Class Prefix Needed?
- iOS 7 bug or my bug in UIAlertView