开发者

Combine TabBar and Navigation Bar how to pushViewController? [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 10 years ago.

I drag a TabBar controller into "MainWindow.xib", then put a Na开发者_JS百科vigation controller into TabBar controller, So one of my tab page is navigation page. I set the root view of Navigation Controller (NavRootviewController.h / .m)

Give me one way to call -pushViewController: animated: ?


You'll typically call pushViewController:animated: from your view controller in response to a button click, or in a method like tableView:didSelectRowAtIndexPath:. If you're pushing a UITableViewController subclass for example, you could do something like this in your root view controller:

YourTableViewController *controller = [[[YourTableViewController alloc] initWithStyle:UITableViewStylePlain] autorelease];
// Maybe set some properties on your controller here.
[self.navigationController pushViewController:controller animated:YES];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜