GoldXApp
GoldXApp

Reputation: 2627

ViewDidLoad not called with UITabbarController

I have an app with a first view then it displays two views in an UITabBarViewController.

Unhappily, it seems the ViewDidLoad method is not called in my two views linked by the Tab Bar. It has to display a title for example, action which is not done.

Here is a photo to illustrate my current work.

http://i41.tinypic.com/2duftz5.jpg

Upvotes: 2

Views: 1869

Answers (1)

Rob
Rob

Reputation: 438307

A couple of thoughts:

  1. You say ViewDidLoad. This is case sensitive and should be viewDidLoad. Or was that just a typo in the question.

  2. Make sure your child scenes have the appropriate view controller. If you select the view controller in IB, you should see something like the following in the Identity inspector:

    enter image description here

    If it looks like:

    enter image description here

    then that means that you may have neglected to specify the view controller subclass.

  3. You've got a weird set of segues from your tab bar controller to your child scenes; it's hard to tell what's going on there or why you've done that, but I'd get rid of those extra push segues. Instead of that mess of segues, it should look something like:

    tab bar controller

Upvotes: 2

Related Questions