公告
财富商城
积分规则
提问
发文
2019-01-07 02:26发布
聊天终结者
How do I add dashed line border around UIView.
UIView
Something Like this
try bellow code
- (void)drawRect:(CGRect)rect { //// Color Declarations UIColor* fillColor = [UIColor colorWithRed: 1 green: 1 blue: 1 alpha: 1]; UIColor* strokeColor = [UIColor colorWithRed: 0.29 green: 0.565 blue: 0.886 alpha: 1]; //// Rectangle Drawing UIBezierPath* rectanglePath = [UIBezierPath bezierPathWithRoundedRect:rect cornerRadius: 6]; [fillColor setFill]; [rectanglePath fill]; [strokeColor setStroke]; rectanglePath.lineWidth = 1; CGFloat rectanglePattern[] = {6, 2, 6, 2}; [rectanglePath setLineDash: rectanglePattern count: 4 phase: 0]; [rectanglePath stroke]; [super drawRect:rect]; }
for one like bellow
最多设置5个标签!
try bellow code
for one like bellow