【代码笔记】iOS-给UIImageView加上圆角效果
来源:互联网 发布:阿里云 共享存储 编辑:程序博客网 时间:2024/06/07 00:12
一,效果图。
二,代码。
RootViewController.m
#import "RootViewController.h"@interface RootViewController ()@end@implementation RootViewController- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self;}- (void)viewDidLoad{ [super viewDidLoad]; // Do any additional setup after loading the view. //圆角效果 [self addView]; }#pragma -mark -functions//圆角效果-(void)addView{ UIImageView *imageView=[[UIImageView alloc]initWithFrame:CGRectMake(50, 100, 200, 200)]; imageView.backgroundColor=[UIColor greenColor]; imageView.layer.cornerRadius = 10; imageView.clipsToBounds = YES; [self.view addSubview:imageView];}- (void)didReceiveMemoryWarning{ [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated.}
0 0
- 【代码笔记】iOS-给UIImageView加上圆角效果
- 给UIImageView加上圆角效果
- UIImageView加上圆角
- 【代码笔记】iOS-给背景图加上移动的手势
- 给UIImageView 添加圆角
- UIImageView 的圆角效果
- 给UIImageView添加点击效果
- 给Button加上圆角
- 给TabHost加上拖动效果
- 给文本框加上提示效果
- 给文本框加上提示效果
- iOS中UIImageview笔记
- iOS笔记-UIImageView
- iOS开发UIImageView动画效果
- 【代码笔记】iOS-水波效果
- iOS 水纹效果代码笔记
- 【代码笔记】iOS-将400电话中间加上-线
- 我的OpenCV学习笔记(四):给图像加上水印效果
- Redis作者谈Redis应用场景
- Java内存简介
- MySQL执行计划解读
- 深入浅出之Spring第一章Spring介绍
- 转:蓝牙物理链路类型:SCO和ACL链路
- 【代码笔记】iOS-给UIImageView加上圆角效果
- 【转】偷偷告诉你快速提高app下载量和安装量
- java如何写一个防止同账号不同ip登录的程序?
- 欧拉项目第7题 10001st prime
- WGS84经纬度坐标到北京54高斯投影坐标的转换
- 高效工作
- VS使用protobuf和gflag的一体化解决方案
- Topic On ARM Core
- float转换为二进制