开发者

How i calling UITableViewController in UITabBarController screen using Navigation bar on button click in iphone?

开发者 https://www.devze.com 2022-12-27 10:09 出处:网络
My i have to develop simple window based iphone application. In my first screen I design the UITabBarController with four TabBarButton.On first Tab screen contains three buttons.

My i have to develop simple window based iphone application. In my first screen I design the UITabBarController with four TabBarButton.On first Tab screen contains three buttons. When i click o开发者_C百科n of the button, the screen should navigate on simple tableView screen.But tableView screen the TabBarController should have be visible. Means simply first replacing with table view and move back to again previous one(The UITabBarController should be visible on all srceen).


Wrap your root view controllers in UINavigationControllers. Then, add the UINavigationControllers to the UITabBarController (so there should be 4 UINavigationControllers, one for each tab). When the button is clicked in the original view controller, do something like:

-(void) buttonClicked {
    SimpleTableViewController *tvc = //etc
    [self.navigationController pushViewController:tvc animated:YES];
    [tvc release];
}
0

精彩评论

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