UIPopover问题调用新视图时
我在iPad应用程序中使用了UIPopover,但是当我从带有IBAction的UIPopover调用视图时,出现了一个问题,该视图已打开但没有旋转,并且可以看到预览视图向后旋转,而UIPOPover仍然打开。
我在调试器控制台上遇到的错误:
2011-06-18 16:34:49.562
UniversityAlumni [8540:207]视图
控制器从传回NO
-应该AutorotateToInterfaceOrientation:
适用于所有界面方向。它
应该支持至少一个
取向。 wait_fences:未能
收到回复:10004003
这是我用来打开UIPOPOver的IBAction:
-(IBAction)barBtn3:(id)sender
{
if (self.popoverController3 == nil) {
PopOverSelfMain *selfserve =
[[PopOverSelfMain alloc]
initWithNibName:@\"PopOverSelfMain\"
bundle:[NSBundle mainBundle]];
UIPopoverController *popover3 =
[[UIPopoverController alloc] initWithContentViewController:selfserve];
popover3.delegate = self;
[popover3 setPopoverContentSize:CGSizeMake(220, 220)];
[selfserve release];
self.popoverController3 = popover3;
[popover3 release];
}
CGRect popover3Rect = [self.view convertRect:[btn3 frame] fromView:[btn3 superview]];
[self.popoverController3 presentPopoverFromRect:popover3Rect inView:self.view permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES];
}
然后在POPOver内部,我正在使用此方法打开一个新视图:
-(IBAction)actionevent:(id)sender{
Eventspage *listing = [[Eventspage alloc] initWithNibName:nil bundle:nil];
listing.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:listing animated:YES];
[listing release];
}
这是我第一次使用POPOver,但我缺少某些东西...
dismissPopover可以解决此问题吗?还是应该使用其他方法来调用View?
没有找到相关结果
已邀请:
1 个回复
抢垢洛韧
} -(无效)open_EventPage { Eventspage * listing = [[Eventspage alloc] initWithNibName:nil bundle:nil]; listing.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [自身presentModalViewController:列出动画:是]; [上市发布]; } 让我知道您是否可以在这里解决问题。