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

Swiping fully in any direction destroys the view. Need an option to not destroy. #83

Closed benmathes closed 9 years ago

benmathes commented 9 years ago

When using someUIView.mdc_swipeToChooseSetup(...), a full swipe to the left or right will destroy the view.

If this view was created with storybuilder, then an @IBAction or @IBoutlet links are gone, along with the entire view. For a lot of cases, that renders this library unusable :-(

benmathes commented 9 years ago

I might be able to work around this by overriding exitScreenOnChooseWithDuration, but that's not documented and I doubt you intended that.

benmathes commented 9 years ago

Looks like you do have a hook to override the default onswipe behavior with MDCSwipeOptions.onChosen