atsusy / TiPaperFold

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

enableLeftFoldDragging and enableRightFoldDragging ignored? #23

Open kosso opened 11 years ago

kosso commented 11 years ago

Hi,

I'd like to be able to control whether or not a left or right view can be pulled out and unfolded.

Setting either of enableLeftFoldDragging or enableRightFoldDragging seems to be ignored, as I can still unfold the views when these are set to false.

bug?

Thanks. Module version 0.3. TiSDK 3+

kosso commented 11 years ago

Update: It appears to be possible to set the [Left|Right]FoldDragging ok after it has been added to the window, but not on the creation of the paperFoldView, using the properties.

Edit: And now I see why: In the source of the PaperFold module, the setLeftFoldContentView method is always setting enableLeftFoldDragging to YES.

https://github.com/atsusy/PaperFold-for-iOS/blob/9b21a556531d6b9ead39247df5b5e77caccef272/PaperFold/PaperFold/PaperFold/PaperFoldView.m#L143

nickfoti commented 11 years ago

I have a similar issue with setShowDividerLines:YES. I've tried to change that value using your suggestion by doing it post add to window, but doesn't seem to work.

window.add(paperfoldView); paperfoldView.setShowDividerLines = 'NO';

Any suggestions?

Thanks!

chmiiller commented 11 years ago

Here (in Titanium for iOS) it works after the paperfoldView is added...In the creation it's really ignored =/ But with a paperFoldView.enableLeftFoldDragging = false; you can't drag it anymore!

nickfoti commented 11 years ago

Thanks for the tip, indeed does work for fold dragging, doesn't seem to work for hiding the divider lines though.