Swift - Make a Slide to Unlock like button in iOS 6

5.7k Views Asked by At

i want to make a Button with an iOS 6 slide to unlock like gesture recognizer. How can I do this?

I already googled this but I only found articles for Objective-C

1

There are 1 best solutions below

2
Nikita Gaidukov On BEST ANSWER

You could use this library - https://github.com/maail/MMSlidingButton.

If you don't like it, it would be easy enough to implement it yourself. Just create a container view, add an inner view (that will be sliding) and add UIPanGestureRecognizer to the container view. After that you could change the inner view position depending on the pan gesture.