steps to add tabbarcontroller to AppDelegate using Interface Builder in XCode 4.2 Empty Application template

前端 未结 3 1022
感情败类
感情败类 2021-02-06 14:10

while I\'m stuck at this question I cannot find the right steps to add a UITabBarController to the AppDelegate (not programatically) but by using interface builder for the \"Emp

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-06 14:37

    Here's what I had to do.

    From your storyboard's Objects list (Controllers & Objects) in the Utilities panel, drag over a generic "Object" (yellow cube) to your Tab Bar Controller Scene page (I place the object under the "Exit" object).

    Set the class of the object to your appDelegate. Now you should be able to link your Tab Bar Controller's delegate to your appDelegate object. You can also link the appDelegate to the Tab Bar Controller if you've created a property such as

    @property (weak, nonatomic, readwrite) IBOutlet UITabBarController *tabs
    

提交回复
热议问题