modocache / MDCSwipeToChoose

Swipe to "like" or "dislike" any view, just like Tinder.app. Build a flashcard app, a photo viewer, and more, in minutes, not hours!
MIT License
2.55k stars 422 forks source link

View stucked in position on when app goes to background #128

Open matuskopo opened 7 years ago

matuskopo commented 7 years ago

Hi everybody, first I want to thank you for great plugin. Will try to describe my problem. I have implemented your plugin and everything works as it should. But there's one bug occurring while you are already swiping View. If during swiping your app goes to background (for example: somebody calls you, or just for testing, hit home button during swipe), after returning to app View will stuck somewhere in process off swiping and now it's position is calculated as starting for next swiping. What is wrong. View should return to it's starting position before app went to background.

I attached picture with "censored" content, but just look at cards. This is position they have after resuming app. mdc-bug

Bye

pooja816 commented 6 years ago

I am also having the same issue.

bull-xu commented 5 years ago

When the app goes into background, iOS always remove the UIView's animations, which this library is using [UIView animateWithDuration]. There is something you can read: https://gist.github.com/grzegorzkrukowski/a5ed8b38bec548f9620bb95665c06128 and the author might be able ro use it to solve this issue.