Home > Net >  VB.NET how to implement a frame round button
VB.NET how to implement a frame round button

Time:10-27

VB.NET how to implement a frame round button

CodePudding user response:

Many times we need a rounded button, and a UIButton controls the borders of the default is square, or do not meet our requirements, then we need to use the code to modify it,

[testBtn layer setMasksToBounds: YES];
[testBtn layer setCornerRadius: 8.0];//set the moment radius
[testBtn layer setBorderWidth: 1.0];//border width
CGColorSpaceRef colorSpace=CGColorSpaceCreateDeviceRGB ();
CGColorRef colorref=CGColorCreate (colorSpace, (CGFloat []) {1, 0, 0, 1});
[testBtn layer setBorderColor: a colorref];//border color


From the jump newest baby
  • Related