How to round the corners of a button
I have a rectangle image (jpg) and want to use it to fill the background of a button with rounded corner in xcode. I wrote the following: UIButton *button = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]; CGRect frame = CGRectMake(x, y, cardWidth, cardHeight); button.frame = frame; [button setBackgroundImage:backImage forState:UIControlStateNormal]; However, the button I get with that approach doesn’t … Read more