Reputation: 6109
In order to round the corner of an image, I am doing the following
UIImageView *myView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, size.width, size.height)];
[myView setImage:[UIImage imageNamed:@"xcode_57X57"]];
myView.layer.cornerRadius = 10.0;
myView.layer.borderWidth = 1.0;
myView.layer.borderColor = [UIColor blueColor].CGColor;
myView.layer.shadowRadius = 8;
However, what I got is the corners of myView are rounded but the corners of an image. The image below shows my issue.
If you encountered this problem before, please advice me on this.
Upvotes: 2
Views: 195