MDCSwipeToChoose icon indicating copy to clipboard operation
MDCSwipeToChoose copied to clipboard

not usable in interface builder, and other design issues

Open gurgeous opened this issue 10 years ago • 1 comments

I love MDCSwipeToChoose! It works great and I was thrilled when I saw the demo app.

There's a problem, though. You can't use it in interface builder because MDCSwipeToChooseView uses a custom initializer. That forces me to do manual layout for my views, which is really tragic. Or I can use complicated wrappers to load my subviews from nibs and stuff them into an MDCSwipeToChooseView subclass.

It would be better to refactor into a traditional collection/subview model, like UITableView, UICollectionView, etc. See ZLSwipeableView for a design example. ZLSwipeableView is an interesting case - I'm not crazy about the control behavior but the API design is very nice.

This would have additional benefits too:

  1. would make it possible to remove the UIVIew category
  2. the container class could handle card layout and front/back logic
  3. put options in one place (instead of every card)

Thanks for making such a nice control!

gurgeous avatar Dec 02 '14 21:12 gurgeous

+1!!!

yisheng avatar Apr 20 '15 13:04 yisheng