开发者

A simle view with a button that calls another view with a tab bar controller

开发者 https://www.devze.com 2023-01-05 20:30 出处:网络
It is quiet embarrassing but I just don\'t get it. How should I browse prom viewA to viewB to viewC if I have a main view \"viewMain\"... how can I make it call a view wit开发者_运维百科h a tab bar

It is quiet embarrassing but I just don't get it.

  1. How should I browse prom viewA to viewB to viewC

  2. if I have a main view "viewMain"... how can I make it call a view wit开发者_运维百科h a tab bar controller for the views viewTabA, viewTabB and viewTabC. (All views should give me the option to go back to the main view "viewMain")

It just so frustrating that I can't find it on Google: I can't believe that people who are creating a simple game (full screen), and some info "pages", have not solved this before.

I have tried everything...got close but...Please any help, lead, tip would be highly appreciated :_(


You mean your UITabBarController has three pages A, B, C and you want to change that programmatically?

That's easy. Just do

yourTabBarController.selectedIIndex = ... or
yourTabBarController.selectedViewController = ...

If there you don't find a solution for a problem you think many people face, then almost always the way you are trying to solve it is wrong. :-)


There is a nice implementation very similar for what I've been looking for in the Stanford University iphone course

http://www.youtube.com/watch?v=4CBMusxvivE&feature=related

0

精彩评论

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