does anyone know what to call to close the default splitview popover.
By close I mean the same way it closes when you tap away from the popover.
I am trying to make sure the popover is closed before I slide in a modal window.
I have tried everything I can think of (even looked at the source to try figure out how it does it)
splitView.hide() //does nothing
splitView.hide(animated:true) //does nothing
splitView.masterView.close //closes the window but not the popover
masterWindow.close //closes the window not the popover
it just doesnt seem to behave like other popovers
thanks in advance
I just wrote a blog posting and had to resolve this issue, I found the magic in the issue tracking system, this worked.
popupVisible(false)and then again
The following is working for me:
Setting it to true, and then to false seems to trigger making the master popup hide every time!
keep in mind that popover is this:
and not the splitview
sorry was a typo in my original post i have tried that
you are correct in saying popover is not splitView, but I had to explain it somehow. Also I do believe that titanium utilizes the popover functionality for the split view (though I may be wrong).
My issue is that i need to figure out how to make sure the splitView (popover masterView) is closed when I click a button. overwise it stays open and obscures my modal window
mmm, you want when the iPad is in portrait mode to hide the masterView I think.
I'm not sure, this doesn't work ?
Yes thats exactly what i want to do.
if in portrait and the masterView is visible, then hide the masterView before opening my modal window
unfortunately that snippet doesnt work either
and simply doing splitView.close(); kills the app when i try to splitView.open(). (not sure why perhaps a bug in my code)
The splitview cannot be closed.
Ok, try this ( it's dirty :) )
put a Titanium.API.info when you click the button( nothing else ) and try to log the parent of the masterView
I suppose with the previous code, the popover was there but the content hides.
try to detect if the masterView has a parent, and what it is.
if it's a popover, give it a hide :)
should work , let me know, I'm curious
Nothing mate [INFO] <null>
tried various others masterNav ect all null.
its strange because there must be someway to close it, or the normal closure wouldnt work. just need to find the right piece of code :P
Last idea :)
I tried that one mate, along with a few variants splitView.popover, splitView.popOver
thanks anyways, I will keep trying and if i find something ill let you know
(im sure i posted this half hour ago….)
Does anyone have a solution for this yet? it seems the best I can do is hide the content in the popup
only seemed to work for me the first time. The next time the code is run, it would not close the popup. (I tried calling it twice as suggested, but no luck)
i had the same problema and this worked for me..