I have a UIView containing other views that are clipped with "Clip to Bounds" is true. But during the transition, all those clipped parts of some views are visible.
Is there a chance to enable clip to bounds during the transition?
Same problem with UICollectionViewCell subviews during transition
It seems that I found workaround for this. I've been just randomly checking different modifiers one by one and hooray. It's magic...
I have view that has to be visible outside of parent view bounds during transition. So I added this modifier and it worked. (It should do nothing visually)
cell.partySignImageView.hero.modifiers = [.translate(y: 0)]
I think that it worked because when I say "I want to translate this view inside parent view", hero somewhere is setting clipToBounds to true for parent view. Probably.
@julianpomper If you still need this, check it out
@dannydaddy3 I think what @julianpomper wanted is clip subviews those beyond superView's bounds during transition, contrary to your description.
@cuzv oops, you鈥檙e right.
I found couple of issues with this problem, and misunderstood this one.
@julianpomper Did you find a solution for this?
@julianpomper Did you find a solution for this?
@ManueGE No, I used a wrapper
@julianpomper
Can you explain what you did to fix this? Running into the same issue.
Why is the modifier masksToBounds(_:) not doing the job?
Thanks @dannydaddy3 for your workaround. I needed exactly the same thing!
So how is the other way round a problem, since we needed to do something to achieve our goal :D?
I have this issue as well. I have views clipped to bounds but when I apply modifiers they clipping is lost. Curious if there is a way around this beyond my own animation after loading.
Most helpful comment
It seems that I found workaround for this. I've been just randomly checking different modifiers one by one and hooray. It's magic...
I have view that has to be visible outside of parent view bounds during transition. So I added this modifier and it worked. (It should do nothing visually)
cell.partySignImageView.hero.modifiers = [.translate(y: 0)]I think that it worked because when I say "I want to translate this view inside parent view", hero somewhere is setting clipToBounds to true for parent view. Probably.