开发者

Is there a way to implement four tabbed uitableviews that all have the same uinavigationbar

开发者 https://www.devze.com 2023-03-22 23:39 出处:网络
I am working on a mobile version for my company\'s web app. The structure of this application requires uitableviews with a tab bar on the bottom and a navigation bar up top to return to the previous v

I am working on a mobile version for my company's web app. The structure of this application requires uitableviews with a tab bar on the bottom and a navigation bar up top to return to the previous view. As you drill down in the application the tab bar items change at 开发者_StackOverflow中文版each level allowing selection of different views pertaining to that specific level in the app. I need a way to implement this with a navigation bar on top that navigates back to the previous screen on every tab in said tab bar when a back button is clicked on any of the tabs.

for example: let's say i start out with an items tab and a simple about tab. When i click items it drills down to a new view called subitems and the tabs for this view are subitems, favorites, details, and notes. I want the navigation bar to go back to the previous screen when i click the back button on any one of these four tabs.

Is this at all possible? I can't seem to find anything related to this type of structuring within an app. any help/examples would be greatly appreciated.


I know that a negative answer always sounds bad, but I tried to do the same a few months ago and I could not find a way of doing it using the standard UITabBarController/UITabBar. Take also a look at this question/answer.

The good news is that it is not that difficult to implement from scratch a tab bar controller that can be pushed on a navigation stack. There are also several examples around, one is BCTabBarController. GtabBar is another example.


I actually found a way to do it you just have to implement the navigation bar's leftbarbuttonitem instead of the traditional back button. Then I just created a method that is invoked when the back button is pushed this updates the navigation stacks of all four views within the tab bar and sets the tab bar items accordingly to match with the previous views we are navigating back to. . . so long story short...it is possible.

0

精彩评论

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

关注公众号