Custom views with Storyboard

Putting the widget/view in a separate .xib file works, and is appropriate especially if you might want to reference that same view from multiple View Controllers. However, sometimes you do want to see the additional view/widget within the same storyboard, and it is possible. Here’s how you do it: Select your view controller in IB … Read more

Conditionally start at different places in storyboard from AppDelegate

I’m surprised at some of the solutions being suggested here. There’s really no need for dummy navigation controllers in your storyboard, hiding views & firing segues on viewDidAppear: or any other hacks. If you don’t have the storyboard configured in your plist file, you must create both the window and the root view controller yourself … Read more

Missing UI Elements in XCode 6

The problem is with your device layout…. Actually it makes on other layout like wAny hAny and now you show it on other layouts like wCompact hRegular….thats why the problem occurs… Here is the visual presentation You can enable it by checking the option installed for your size classes in your attribute inspector. Refer this … Read more

Storyboard – refer to ViewController in AppDelegate

Have a look at the documentation for -[UIStoryboard instantiateViewControllerWithIdentifier:]. This allows you to instantiate a view controller from your storyboard using the identifier that you set in the IB Attributes Inspector: EDITED to add example code: UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@”MainStoryboard” bundle: nil]; MyViewController *controller = (MyViewController*)[mainStoryboard instantiateViewControllerWithIdentifier: @”<Controller ID>”];

In iOS13 the status bar background colour is different from the navigation bar in large text mode

No hacks or funkiness required here. The key is defining the desired appearance and setting this value on BOTH the nav bar’s standardAppearance AND its scrollEdgeAppearance. I have the following in the init for my base navigation controller subclass for my entire app: if #available(iOS 13.0, *) { let navBarAppearance = UINavigationBarAppearance() navBarAppearance.configureWithOpaqueBackground() navBarAppearance.titleTextAttributes = … Read more

Display clearColor UIViewController over UIViewController

iOS8+ In iOS8+ you can now use the new modalPresentationStyle UIModalPresentationOverCurrentContext to present a view controller with a transparent background: MyModalViewController *modalViewController = [[MyModalViewController alloc] init]; modalViewController.modalPresentationStyle = UIModalPresentationOverCurrentContext; [self presentViewController:modalViewController animated:YES completion:nil];