문제

I have a UIViewController with some buttons that works fine when I add as subview, but when I present this viewcontroller in UIPopoverController none of the buttons trigger actions. Someone knows that problem ?

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"iPhoneStoryboard" bundle:nil];
menuViewController =  (MenuListViewController *)[storyboard instantiateViewControllerWithIdentifier:@"menuviewcontroller"];

Buttons inside viewcontroller works if I use:

[self.view menuViewController.view];

But I want to use

popover = [[UIPopoverController alloc]initWithContentViewController:menuViewController];
도움이 되었습니까?

해결책

One thing to look at when you can't interact with UI elements, especially after frame resizes, is to check that your elements are not outside of their parents bounds, check my answer to this question

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top