iOS set radius to button by layer

#import

CALayer * layer = [deltaButton layer];
[layer setMasksToBounds:YES];
[layer setCornerRadius:1.0]; //note that when radius is 0, the border is a rectangle
[layer setBorderWidth:2.0];
[layer setBorderColor:[[UIColor grayColor] CGColor]];

0 意見: