?????????? ????????

Send Snippet To: Save this snippet to Code Collector Pro -- view all spetruk's snippets
language: Objective-C
license: Other

Code for Snippet:

+ (void)cornerRadiusForPicture:(UIImage*)image imageView:(UIImageView*)imageView radius:(CGFloat)radius {
	UIGraphicsBeginImageContextWithOptions(imageView.bounds.size, NO, [UIScreen mainScreen].scale);
	[[UIBezierPath bezierPathWithRoundedRect:imageView.bounds cornerRadius:radius] addClip];
	[image drawInRect:imageView.bounds];
	imageView.image = UIGraphicsGetImageFromCurrentImageContext();
comments powered by Disqus


Link to this snippet:

Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 189
Date Added: 2015-11-03 22:25:58
Last Modified: 2015-11-03 15:27:33

Web Analytics