开发者

Tab Bar Application with Navigation Controllers in the tabs. Crosslinking from views

开发者 https://www.devze.com 2023-02-17 19:35 出处:网络
This is my first iPhone project and all has been going very well but I\'ve run into a small snag that I can\'t seem to find a good solution for.Thanks in advance to everyone who takes their time to he

This is my first iPhone project and all has been going very well but I've run into a small snag that I can't seem to find a good solution for. Thanks in advance to everyone who takes their time to help me out.

I have a very straight forward Tab Bar application with a few tabs. Each tab defines a subsection that is controlled with a Navigation Bar. The client now wants to place a button in one of the views of the subsection that "deep links" into a view 开发者_StackOverflow中文版of a different section ( different tab).

To Illustrate:

Root
  - Tab 1 (Bedrock)
     - Navigation Controller
        - Fred View
        - Wilma View
        - Betty View
        - Barney View
   - Tab 2 (Mystery Machine)
     - NC
        - Scooby View
        - Shaggy View
        - Daphnie View
        ...

The client would like a button in 'Barney View' that opens up 'Shaggy View'

What is the best way to accomplish this?


You will want to use the selectedViewController or selectedIndex property of the UITabBarController to switch tabs, and the viewControllers property of the UINavigationController to set the view stack.

0

精彩评论

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