Sunday, 15 May 2011

ios8 - UIPopoverPresentationControllerDelegate methods only called on user dismissal -



ios8 - UIPopoverPresentationControllerDelegate methods only called on user dismissal -

one of biggest problems popovers how delegate's dismiss methods (-[popoverpresentationcontrollershoulddismisspopover:], -[popoverpresentationcontrollerdiddismisspopover:]) called if user dismisses popover, not if popover dismissed programmatically.

there's lots of of import code in dismiss methods needs called. there elegant solution create sure code gets called on programmatic dismissal? (sure, can phone call "should" , "did" every time dismiss...but that's error-prone , kind of gross.)

thanks.

i not aware of improve solution manually phone call each time programmatically dismiss it.

[self popoverpresentationcontrollerdiddismisspopover:self.popoverpresentation];

this quite mutual in ios sdk. example, if programmatically select row in table view, delegate method tableview:didselectrowatindexpath: not called.

ios8 uipopovercontroller

No comments:

Post a Comment