Is it possible to update a localized storyboard’s strings?

There are two options: Option 1 Xcode can “reload” the file by converting the file to either an [Interface Builder Cocoa Touch Storyboard] file type or a [Localizable Strings] file type. Select your base storyboard file from the Project Navigator Find the Localization section in the File Inspector If your file is currently a [Localizable … Read more

How to use single storyboard uiviewcontroller for multiple subclass

great question – but unfortunately only a lame answer. I don’t believe that it is currently possible to do what you propose because there are no initializers in UIStoryboard that allow overriding the view controller associated with the storyboard as defined in the object details in the storyboard on initialization. It’s at initialization that all … Read more

Programmatically change rootViewController of storyBoard

Objective-C: UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@”MainStoryboard” bundle:nil]; UITabBarController *rootViewController = [storyboard instantiateViewControllerWithIdentifier:@”tabBarcontroller”]; [[UIApplication sharedApplication].keyWindow setRootViewController:rootViewController]; Swift : let mainStoryboard: UIStoryboard = UIStoryboard(name: “Main”, bundle: nil) let viewController = mainStoryboard.instantiateViewControllerWithIdentifier(“tabBarcontroller”) as UITabBarController UIApplication.sharedApplication().keyWindow?.rootViewController = viewController; Swift 3: let mainStoryboard: UIStoryboard = UIStoryboard(name: “Main”, bundle: nil) let viewController = mainStoryboard.instantiateViewController(withIdentifier: “tabBarcontroller”) as! UITabBarController UIApplication.shared.keyWindow?.rootViewController = viewController Swift … Read more

Prevent segue in prepareForSegue method?

It’s possible in iOS 6 and later: You have to implement the method – (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender In your view controller. You do your validation there, and if it’s OK then return YES; if it’s not then return NO; and the prepareForSegue is not called. Note that this method doesn’t get called automatically when triggering … Read more

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

tech