我找不到为什么这个UIView在调用方法时无法正确显示。它在另一个视图控制器中工作。当我在RootViewController中尝试它时,NSLog输出工作正常,但没有视图动画。我想知道它是否显示,但隐藏的看法。任何帮助都会很棒。当一个方法被调用时,UIView无法正确显示
- (IBAction)showView:(id)sender{
NSLog(@"showView button pressed");
[self.view addSubview: menuView];
[self.view bringSubviewToFront:menuView];
CGRect rect = menuView.frame;
rect.origin.x = 60;
rect.origin.y = -400;
menuView.frame = rect;
[UIView beginAnimations:@"ShowView" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.5];
rect.origin.y = 65;
menuView.frame = rect;
[UIView commitAnimations];
}
当你调用'NSLog(@“View:%@”,self.view)时会记录什么;''低于其他NSLog? – JNK 2012-03-22 16:58:50
出来的脚本是:查看:> –
hanumanDev
2012-03-23 10:28:47