kawoou / KWDrawerController

Drawer view controller that easy to use!
MIT License
157 stars 32 forks source link

Observe state with delegate #15

Closed 0xch4z closed 6 years ago

0xch4z commented 6 years ago

Thanks for the library! It would be cool if there was a delegate protocol to preform actions on the drawer state changing rather than having to pass a completion handler in. For example, the following stubs:

func drawerController?(willOpenSide side: DrawerSide)

func drawerController?(willCloseSide side: DrawerSide)

I'd be happy to submit a PR.

Thanks, Charles

kawoou commented 6 years ago

Sounds like a good idea😆 Do I add this? Or if you would like to upload your own PR, I'll be happy to review.

0xch4z commented 6 years ago

Sweet, thanks. Just added PR #16. Already using this in my own project and it's a big help for changing the status bar color when the drawer is open.

Let me know if I need to change anything!