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 imageview2 whenever calculate layout.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -