objective c - UIImageView Clip Subviews in code -
i have been able behavior want using xcode , attributes inspector. have found lot of information here on stackoverflow. problem cannot resolve cropping image in code uses pixels rect have in points. help! this trying do: have image full size on iphone. want capture portion of center of image. want portion size of rectangle. in xcode, created view uiimageview uiimageview view mode = center , clip subviews checked. then, in code set image. voila! image cropped @ center , displayed in rectangular shaped view. can please me in code? i've been trying different approaches days....feeling pretty dumb now. thank in advance help.