lemanhtien / MTSlideToOpen

A simple SlideToUnlock iOS UI component
MIT License
145 stars 51 forks source link

Not able to lock #2

Closed ghost closed 6 years ago

ghost commented 6 years ago

am trying with "slide to lock". while tapping & dragging on thumnailImageView am notable to close the lock. it is coming back again to same position. tried multiple times

lemanhtien commented 6 years ago

If you want to keep the thumbnail in lock position, don't call function resetStateWithAnimation in the delegate. You can see in my example project

    func mtSlideToOpenDelegateDidFinish(_ sender: MTSlideToOpenView) {
        let alertController = UIAlertController(title: "", message: "Done!", preferredStyle: .alert)
        let doneAction = UIAlertAction(title: "Okay", style: .default) { (action) in
            sender.resetStateWithAnimation(false)
        }
        alertController.addAction(doneAction)
        self.present(alertController, animated: true, completion: nil)

    }

Please comment the line sender.resetStateWithAnimation(false)

ghost commented 6 years ago

i got one more issue here

am using multiple English, Arabic languages in my app

While using english the slidingButton is working fine. And i can swipe the thumNailImage from left to right.

But, when am using Arabic, the slidingButton is not working. am not able to swipe the thumNailImage from right to left

Could you help me regarding this issue

-- Thanks & Regards Bhanuteja