nghialv / MaterialKit

Material design components for iOS written in Swift
MIT License
2.51k stars 290 forks source link

MKLayer Ripple issue #57

Open LeenaTekani opened 8 years ago

LeenaTekani commented 8 years ago

I am using following GitHub library for the menu :- https://github.com/yannickl/FlowingMenu

When I push any viewcontroller on the controller that is showing menu the ripple effects stops working in all the controllers.

Consider I have HomeViewController which has menu button to show menu. Once the menu is displayed after that in any viewcontroller I use UITextfield with subclass of MaterialKit the ripple effect stops working.

I know it's not the issue of your library but just wanted to know any workaround I can solve the issue. While debugging I got to know "clearEffects" method in the MKLayer method is not getting called after I tap on any textfield.

So is there is any way I can solve this issue.

LeenaTekani commented 8 years ago

Right now I have solved the issue with the following code :-

public override func touchesEnded(touches: Set, withEvent event: UIEvent?) { super.touchesEnded(touches, withEvent: event) mkLayer.effectIsRunning = false mkLayer.touchesEnded(touches, withEvent: event) }

Not sure whether it will create any issue in future but as of now working.