viezel / NappDrawer

A side drawer navigation container view controller for Appcelerator Titanium.
MIT License
247 stars 128 forks source link

iOS - setLeftWindow(false) throws error using Titanium 7.1.0 GA #218

Closed ulissesrsilva closed 6 years ago

ulissesrsilva commented 6 years ago

Hey everyone!

I've just updated SDK version from 6.3.0 to 7.1.0 and setLeftWindow/setRightWindow methods stop working when I pass false as a parameter to disable the window. It was working just fine in 6.3.0. NappDrawer version is 2.1.0

My code: var centerWindow = Ti.UI.createWindow({backgroundColor: "#000"}); var rightWindow = Ti.UI.createWindow({backgroundColor: "#999"}); var nappWindow = NappDrawerModule.createDrawer({ centerWindow : centerWindow, rightWindow : rightWindow, closeDrawerGestureMode : NappDrawerModule.CLOSE_MODE_ALL, openDrawerGestureMode : NappDrawerModule.OPEN_MODE_ALL, rightDrawerWidth : 280 }); nappWindow.setLeftWindow(false);

Console error: captura de tela 2018-03-20 as 22 36 27 captura de tela 2018-03-20 as 22 36 15

How can I fix this?

hansemannn commented 6 years ago

You cannot pass a boolean to a method that expects a window instance. If you want to show/hide it, use the related methods for that please.