iphone TextView UIImageview 加个圆角

来源:互联网 发布:淘宝增加流量的方法 编辑:程序博客网 时间:2024/05/29 17:03

#import <QuartzCore/QuartzCore.h>

[self.content.layer setBackgroundColor:[[UIColor whiteColor] CGColor]];
    [self.content.layer setBorderColor:[[UIColor grayColor] CGColor]];
    [self.content.layer setBorderWidth:1.0];
     [self.content.layer setCornerRadius:10.0];
     [self.content.layer setMasksToBounds:YES];
    self.content.clipsToBounds = YES;

self---uiimageviw

self.image=[UIImage imageWithContentsOfFile:strPath];

self.layer.masksToBounds=YES;//圆角

self.layer.cornerRadius=10.0;

self.layer.borderWidth=1.0; //边框阴影宽度

self.layer.borderColor=[[UIColor grayColor] CGColor];