ios - UISplitView: Dismiss another popover when splitview popover is presented -


i have problem on ipad application using uisplitview. basically, have button toggles popover (different basic splitview popover). image might explain problem better: enter image description here problem there in portrait mode.

there 2 cases possible:

  • first tap on "folders" button, second tap on "settings cogwheel" button, works there: 1 popover shows @ time, because know how register action on settings button.

  • first tap on "settings" button, second 1 on "folders" button. in case don't know how dismiss "settings" popover, because don't know how register touch on default button made available splitview. (that's problem on picture)

do know how handle touch event on default "folders" button offered splitview?

fixed it! there's delegate method called splitview when popover going present view controller, here is:

//------------------------------------------------------------------------------------- // splitviewcontroller:popovercontroller:willpresentviewcontroller: //------------------------------------------------------------------------------------- - (void)splitviewcontroller:(uisplitviewcontroller *)svc          popovercontroller:(uipopovercontroller *)pc  willpresentviewcontroller:(uiviewcontroller *)aviewcontroller {     [self.popoversettings dismisspopoveranimated:yes]; //dismiss other popover here } 

apple's documentation here


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -