Pregunta

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];
¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top