开发者

Adding UITabBarControllerDelegate to UINavigationController application

I hope this isn't too obvious of a question. I'm really banging my head here.

I have a Navigation based application. I'm using the table views to drill into a set of data until I can find my desired record. When I find it, I want to push the detail view onto the stack. The detail view should have a tab bar at the bottom of the screen so I can view the summary of the detail in one tab and then flip around to other tabs to view other portions of the detail screen.

I can add a simple tab bar control to the view, but it seems like what I really need is what you get from the "Tab Bar Application" template. I have found example after example where someone starts with 开发者_如何转开发a tab bar application and then adds Navigation controllers to it, but I haven't found one like mine.

HALP!


I found the solution... the "magic bullet" as it were. In my master controller, the one with the tab bar controller in it, I had to set:

    self.view = tabBarController.view;

Suddenly, things worked as I expected.


You can create a tab bar controller that has two subviews, "Summary" and "Details". After this controller is working, you can simply push onto your navigation stack.

I recommend the following approach:

  1. Study the tab bar nav template to see how tab controller works.
  2. Create and test the required behavior outside your current app.
  3. Once you've debugged everything add the tab controller to your app.

HTH.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜