mercredi 4 mars 2015

presentViewController does not hide popover, popover appears on presented modal view

I'm facing this weird issue where i present a popover from a button on a view. Later i call presentViewController, without dismissing the popover. View is presented modally. Weird thing is, modal view does not cover the popover, popover appears on top of modal view. I'm on iPad Retina, iOS 7.1. In the attached image, purple view is modal view and blue one is the popover. Please help if someone had been through pain and resolved it. Thanks in advance.


Code to present popover -



[self.pop presentPopoverFromRect:[sender frame]
inView:[self.navigationController view]
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];


Code to present modal view -



[self presentViewController:anotherVC animated:YES completion:nil];


enter image description here




Aucun commentaire:

Enregistrer un commentaire