我在 xcode-4.2 中进行了编码,在更新 xcode-4.5.1 后,我的应用程序运行良好,同时单击窗口导航它显示以下错误。
Warning: Attempt to present <learnview: 0x8876220> on <UINavigationController: 0x8866e10> whose view is not in the window hierarchy!
我将函数从 viewdidload() 更改为 viewdidappear() 仍然显示相同的错误?请帮我解决
编辑:
-(void)goright
{
CATransition* transition = [CATransition animation];
transition.duration = 1.5;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
transition.type = kCATransitionPush;
learnview *lview=[[learnview alloc]initWithNibName:@"learnview" bundle:nil];
transition.subtype = kCATransitionFromRight; //kCATransitionFromLeft, kCATransitionFromRight, kCATransitionFromTop, kCATransitionFromBottom
[self.navigationController.view.layer addAnimation:transition forKey:nil];
[[self navigationController] pushViewController:lview animated:NO];
[imagetim invalidate];
}