设为首页 加入收藏

TOP

【代码笔记】iOS-圆角矩形
2017-10-13 10:23:02 】 浏览:214
Tags:代码 笔记 iOS- 圆角 矩形

代码:

复制代码
- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.title=@"圆角矩形";
    
    
    UIImageView *imageView=[[UIImageView alloc]initWithFrame:CGRectMake(50, 100, 100, 100)];
    imageView.backgroundColor=[UIColor redColor];
    //设计其圆角半径
    [imageView.layer setCornerRadius:18.0f];
    [imageView.layer setMasksToBounds:YES];
    [self.view addSubview:imageView];
}
复制代码

 

 

 
 
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇面试题的一些笔记 下一篇swift学习笔记2——函数、闭包

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目