ios - Clip to bounds of a different UIImageView -
i have 2 uiimageviews, imageview1 , imageview2. i've set  
self.imageview1.clipstobounds = yes; but wondering if possible set imageview1 cliptobounds of imageview2?
not easily. "right" way use clipping path on imageview1's layer. however, can same effect more follows.
put imageview1 centered inside container uiview, , turn view's clipstobounds on. then:
- if you're using auto layout, constrain container view's size equal size of - imageview2.
- if you're not using auto layout, set bounds of container view size of - imageview2whenever calculate layout.
Comments
Post a Comment