84669 personnes étudient
152542 personnes étudient
20005 personnes étudient
5487 personnes étudient
7821 personnes étudient
359900 personnes étudient
3350 personnes étudient
180660 personnes étudient
48569 personnes étudient
18603 personnes étudient
40936 personnes étudient
1549 personnes étudient
1183 personnes étudient
32909 personnes étudient
比如这样
光阴似箭催人老,日月如移越少年。
Une suggestion : Généralement, dans ce cas, nous utilisons des images, et définissons simplement l'image d'arrière-plan du bouton.
Personnaliser un bouton
@implementation CustomButton - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { [self setupLayersWithFrame:frame]; } return self; } - (void)setupLayersWithFrame:(CGRect)frame{ CAShapeLayer * roundedrect = [CAShapeLayer layer]; roundedrect.frame = CGRectMake(0, 0, frame.size.width, frame.size.height); roundedrect.fillColor = [UIColor whiteColor].CGColor; roundedrect.strokeColor = [UIColor colorWithRed:0.329 green: 0.329 blue:0.329 alpha:1].CGColor; roundedrect.lineDashPattern = @[@5.5, @4.5]; roundedrect.path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, frame.size.width , frame.size.height) cornerRadius:20].CGPath; [self.layer addSublayer:roundedrect]; }
Une suggestion : Généralement, dans ce cas, nous utilisons des images, et définissons simplement l'image d'arrière-plan du bouton.
Personnaliser un bouton