Pop Over Control on iPad Problem !
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
.
精彩评论