【发布时间】:2011-04-24 05:59:17
【问题描述】:
我在 xcode 中创建了一个新的标签栏应用程序模板。当按下按钮时,我应该如何正确设置在(向上滑动)中动画的新视图?我已经看到使用 NavigationController 完成了这项工作。
我添加了一个导航栏和一个按钮,其中包含使用以下代码添加子视图的操作:
(IBAction)newPost:(id)sender
{
// Load UIViewController from nib
PostViewController *screen = [[PostViewController alloc] initWithNibName:@"PostViewController" bundle:nil];
// Add to UINavigationController's stack, i.e. the view for this UITabBarController view
[self.view addSubview:screen.view];
// Release music, no longer needed since it is retained by the navController
[screen release];
}
【问题讨论】:
标签: iphone xcode views switching uitabview