【发布时间】:2012-02-04 15:38:21
【问题描述】:
我的第一个视图包含一个按钮,按下按钮后,我将看到第二个视图。我所做的是
FirstViewController.m
- (void)pushToWishList {
SecondViewController *controller = [[SecondViewController alloc] initWithNibName:@"SecondView" bundle:nil ];
[UIView beginAnimations:@"flipping view" context:nil];
[UIView setAnimationDuration:1];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.view cache:YES];
[self.view addSubview:controller.view];
[UIView commitAnimations];
}
SecondViewController 是一个 UIViewController 使得:
SecondViewController.h:
@interface SecondViewController : UIViewController
SecondViewController.m
self.navigationController.navigationBarHidden = NO; self.navigationItem.hidesBackButton = NO; self.navigationController.navigationBar.tintColor = [UIColor blackColor];
发生的事情是顶部导航消失了,我的第二个视图中的 UITableView 无法上下滚动。每当我尝试这样做时,我的程序就会崩溃。
请就这个问题给我建议。这里欢迎任何 cmets。
【问题讨论】:
标签: iphone objective-c uinavigationcontroller