iphone-常用的对视图图层(layer)的操作
2010-10-14 10:47 Tracy E 阅读(770) 评论(0) 编辑 收藏 举报对图层的操作:
1.给图层添加背景图片:
myView.layer.contents = (id)[UIImageimageNamed:@"view_BG.png"].CGImage;
2.将图层的边框设置为圆脚
myWebView.layer.cornerRadius = 8;
myWebView.layer.masksToBounds = YES;
3.给图层添加一个有色边框
myWebView.layer.borderWidth = 5; myWebView.layer.borderColor = [[UIColorcolorWithRed:0.52green:0.09blue:0.07alpha:1] CGColor];