MMDrawerController icon indicating copy to clipboard operation
MMDrawerController copied to clipboard

MMOpenDrawerController Integrate in swift 3 not working

Open TejveerSambariya opened this issue 8 years ago • 10 comments

Use of undeclared type MMOpenDrawerGestureMode in swift 3 not working.

TejveerSambariya avatar Dec 03 '16 12:12 TejveerSambariya

Could you provide some context for the issue you are having and what you are trying to accomplish? What specific error message are you getting and where?

ghost avatar Jan 02 '17 18:01 ghost

I have the same problem to, except it's only with the .None mode.

When trying to choose the None mode like this:

drawerController?.openDrawerGestureModeMask = MMOpenDrawerGestureMode.None

I have the following error:

'None' has been renamed to 'none'

then after changing to MMOpenDrawerGestureMode.none I have the following error

'none' is unavailable: use [] to construct an empty option set

Any clues ?

Thanks!

yannbu avatar Jan 14 '17 13:01 yannbu

= [.none]

altagir avatar Jan 15 '17 17:01 altagir

Thanks but it doesn't work in my case. Same error as before:

'none' is unavailable: use [] to construct an empty option set

yannbu avatar Jan 15 '17 20:01 yannbu

Syntax is correct for enum flag in swift 3 Cannot test it here because not using this pod with swift. Try []? Which version of swift u r using?

altagir avatar Jan 15 '17 20:01 altagir

I use swift 3.0.2

[] compiles and runs but it doesn't actually desactivate the open gesture.

yannbu avatar Jan 15 '17 20:01 yannbu

it should actually.... [] is the correct form. :\ = 0

altagir avatar Jan 16 '17 15:01 altagir

You're right! There was a problem in my test.

drawerController?.openDrawerGestureModeMask = [] works perfect.

Thanks!

yannbu avatar Jan 23 '17 10:01 yannbu

it is not enough. You should set both openDrawerGestureModeMask and closeDrawerGestureModeMask

gerchicov-bp avatar Apr 19 '17 15:04 gerchicov-bp

You can use drawerController?.openDrawerGestureModeMask = MMOpenDrawerGestureMode(rawValue: 0)

jposes22 avatar Oct 17 '18 09:10 jposes22