在iPad上弹出过度控制问题!

时间:2010-05-20 20:56:51

标签: iphone ipad sdk

我尝试通过UIPopover加载视图,但我的应用程序崩溃后点击弹出按钮,我试图解决它,但我不明白!这是我的代码:

-

(IBAction)calendarPopUp:(id)sender {

 PopViewController *cal = [[PopViewController alloc]init];
//The compiler tells me the problem comes from this line :
 UIPopoverController *popOver = [[UIPopoverController alloc] initWithContentViewController:cal];
 [popOver setDelegate:self];
 [popOver presentPopoverFromRect:CGRectMake(113, 64, 226, 129) inView:self permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES];
 [popOver setPopoverContentSize:CGSizeMake(226, 129)];
}

1 个答案:

答案 0 :(得分:1)

我猜您应该将inView:self更改为inView:self.view