contentView is broken. It can be also fixed in awakeFromNib
ObjC:
- (void)awakeFromNib {
[super awakeFromNib];
self.contentView.frame = self.bounds;
self.contentView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
}
Swift3:
override func awakeFromNib() {
super.awakeFromNib()
self.contentView.frame = self.bounds
self.contentView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
}
Related Contents:
- CFURLCopyResourcePropertyForKey failed because passed URL no scheme
- Xcode throws an exception in Main() in iOS 8 with ‘all exceptions’ breakpoint
- Location Services not working in iOS 8
- Replacement for deprecated sizeWithFont: in iOS 7?
- Cannot hide status bar in iOS7
- How to stop unwanted UIButton animation on title change?
- iOS 8 Snapshotting a view that has not been rendered results in an empty snapshot
- invalid context 0x0 under iOS 7.0 and system degradation
- registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later
- Base64 Decoding in iOS 7+
- iOS 7 sizeWithAttributes: replacement for sizeWithFont:constrainedToSize
- What happened to “HelveticaNeue-Italic” on iOS 7.0.3
- iOS8 – constraints ambiguously suggest a height of zero
- Sizing class for iPad portrait and Landscape Modes
- sizeWithFont method is deprecated. boundingRectWithSize returns an unexpected value
- Xcode6: IBDesignable and IBInspectable with Objective-C
- Can’t endBackgroundTask: no background task exists with identifier, or it may have already been ended
- Why requestWhenInUseAuthorization doesn’t prompt the user for access to the location?
- Remote Notification iOS 8
- The app references non-public selectors in Payload/.app/: decoder
- How to change background color of UISearchBar in iOS7
- UIPopoverPresentationController on iOS 8 iPhone
- Hide Status Bar In iOS 8 app
- Xcode 6 keeps renaming my app’s directory in iOS8 simulator after each run.
- Xcode 6 and Embedded Frameworks only supported in iOS8
- How to use VideoToolbox to decompress H.264 video stream
- Unable to add UITextField to UIAlertView on iOS7…works in iOS 6
- UIBarButtonItem with UIImage Always Tinted iOS 7
- iOS 8 Map Kit Obj-C Cannot Get Users Location
- Hiding the master view controller with UISplitViewController in iOS8
- UITabBar not showing selected item images in ios 7
- iOS 8 requestWhenInUseAuthorization no Popup
- Resize UICollectionView cells after their data has been set
- iOS 7 – Keyboard animation
- Programmatically implementing two different layouts using size classes
- Detecting user settings for Background App Refresh in iOS 7
- Attempting to badge the application icon but haven’t received permission from the user to badge the application : iOS 8 Xcode 6
- iOS7 excessive navigationbar button padding
- Black bars appear in app when targeting iOS7.1 or 7.0 in Xcode6
- Facebook iOS8 SDK build module error for FBSDKCoreKit
- How to scale a UIImageView proportionally?
- How do I wait for an asynchronously dispatched block to finish?
- How to delete all Annotations on a MKMapView
- Get current date in milliseconds
- looping through an NSMutableDictionary
- Dark shadow on navigation bar during segue transition after upgrading to Xcode 5.1 and iOS 7.1
- NSDictionary Key For Value/Object? [duplicate]
- Objective-C: Forward Class Declaration
- Email composure iOS 8
- What’s the difference between Objective-C and Cocoa?