difference between presentViewController and UINavigationController?

presentViewController offers a mechanism to display a so-called modal view controller; i.e., a view controller that will take full control of your UI by being superimposed on top of a presenting controller. UINavigationController offers a much more flexible mechanism where you can push a new controller, and later pop it, so to go back to … Read more

Initializer does not override a designated initializer from its superclass

My solution is a quick fix, but I think is easier than what Apple purposes on the the Release Notes. For more information search for 19775924 http://adcdownload.apple.com//Developer_Tools/Xcode_6.3_beta_3/Xcode_6.3_beta_3_Release_Notes.pdf here. What Apple says is that you create an Objective-C file and extend it (having to add it to the header files and all) and it’s on “Known … Read more

IOS7 Status bar hide/show on select controllers

The plist setting “View controller-based status bar appearance” only controls if a per-controller based setting should be applied on iOS 7. If you set this plist option to NO, you have to manually enable and disable the status bar like (as it was until iOS 6): [[UIApplication sharedApplication] setStatusBarHidden:YES] If you set this plist option … Read more

Can I use autolayout to provide different constraints for landscape and portrait orientations?

Edit: Using the new concept of Size Classes introduced in Xcode 6, you can easily setup different constraints for specific size classes in Interface Builder. Most devices (e.g. all current iPhones) have a Compact vertical size class in landscape mode. This is a much better concept for general layout decisions than determining the device’s orientation. … Read more

What does the text inside parentheses in @interface and @implementation directives mean?

Those are called Categories and allow you to add further functionality to your classes. A category allows you to add methods to an existing class—even to one for which you do not have the source. Categories are a powerful feature that allows you to extend the functionality of existing classes without subclassing. Using categories, you … Read more

In Call Status Bar (Unable to Satisfy Constraints)

iOS 9.2.1, Xcode 7.2.1, ARC enabled UPDATE 3/25/2016: Conflict still exists in Xcode 7.3, iOS 9.3. Summary: In the window hierarchy for your application there are various windows that get added onto the application window. In my case, this was the UITextEffectsWindow and the UIRemoteKeyboardWindow. These windows come with preconfigured constraints. It seems there is … Read more

How to maintain presenting view controller’s orientation when dismissing modal view controller?

– (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window { if ([self.window.rootViewController.presentedViewController isKindOfClass: [SecondViewController class]]) { SecondViewController *secondController = (SecondViewController *) self.window.rootViewController.presentedViewController; if (secondController.isPresented) return UIInterfaceOrientationMaskAll; else return UIInterfaceOrientationMaskPortrait; } else return UIInterfaceOrientationMaskPortrait; } And for Swift func application(application: UIApplication, supportedInterfaceOrientationsForWindow window: UIWindow) -> Int { if self.window?.rootViewController?.presentedViewController? is SecondViewController { let secondController = self.window!.rootViewController.presentedViewController as SecondViewController if secondController.isPresented … Read more