I am using following code to give round corners to the image placed on a uiimageview
imgUserImage=[[UIImageView alloc] init];
[imgUserImage setImage:[UIImage imageNamed:kAddImageUserBlank]];
imgUserImage.frame=CGRectMake(20.0, 70.0, 110.0, 110.0);
CALayer * l = [imgUserImage layer];
[l setMasksToBounds:YES];
[l setCornerRadius:15.0];
[[self view] addSubview:imgUserImage];
I am getting a leak in the instrument which says mem_alloc and responsible library is QuartzCore.
Or is there any other way to give rounded corners to the image.
Please advise.
1)Why don’t you use the following?
2)Try to use instead of your last string:
or