cwRichardKim / RKSwipeCards

The basics of a swipeable card interface inspired by Tinder
MIT License
2.17k stars 61 forks source link

Card instantiated from xib doesn't seem to keep subviews within boundaries. #21

Closed CharlesW95 closed 7 years ago

CharlesW95 commented 8 years ago
screen shot 2015-12-27 at 11 06 34 am

This is a subclass of DraggableView, and it holds an ImageView and a UIView (the gray part). When I swipe on the card the UIView seems to poke out the side of the card. I was wondering if this is an intended behavior, or if there is some sort of fix.

Also, the corner radius property doesn't seem to apply to the bottom of the card.

Thanks!

sajayshah commented 8 years ago

You're going to have to programmatically set the cornerRadius for the gray UIView part. I'm also having the same issue with loading from xib.

cwRichardKim commented 7 years ago

It probably has to do with masking (sorry for the super late response). Masks can't be applied while there are shadows because it will mask the shadow as well. What you can do is put a view ontop of that view with the same dimensions and use that as a mask