atsusy / TiPaperFold

Titanium Mobile module for "PaperFold for iOS"
MIT License
63 stars 21 forks source link

Open right or left view programatically #9

Closed alperdincer closed 12 years ago

alperdincer commented 12 years ago

Hi,

Thanks for great plugin. I'm trying to add a button at top which triggers a function to open the right or left folded views, but I can't find a solution. I just want to add something like facebook menu with folding.

Thanks.

atsusy commented 12 years ago

You can open right or left view programmatically by changing module's state property.

Open left view programmatically:

var module = require('jp.msmc.tipaperfoldview');
module.state = module.STATE_LEFT_UNFOLDED;

Open right view programmatically:

var module = require('jp.msmc.tipaperfoldview');
module.state = module.STATE_RIGHT_UNFOLDED;

Close opened view programmatically:

var module = require('jp.msmc.tipaperfoldview');
module.state = module.STATE_DEFAULT;
alperdincer commented 12 years ago

Thanks a lot.