开发者

Pop Over Control on iPad Problem !

开发者 https://www.devze.com 2022-12-31 17:25 出处:网络
i try to load a view via UIPopover but my app crash after tap the popover button , i tried to solve it but i don\'t understand ! here is my code :

i try to load a view via UIPopover but my app crash after tap the popover button , i tried to solve it but i don't understand ! here is my code :

-

(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 setPopo开发者_如何学GoverContentSize:CGSizeMake(226, 129)];
}


I guess you should change inView:self to inView:self.view.

0

精彩评论

暂无评论...
验证码 换一张
取 消