你的位置:首页 > 软件开发 > 操作系统 > iOS 文字属性

iOS 文字属性

发布时间:2015-08-17 17:00:43
- (void)drawInRect:(CGRect)rect withAttributes:(NSDictionary *)attrs-(void)drawRect:(CGRect)rect{ self.backgroundColor=[UIColor whiteColor] ...

- (void)drawInRect:(CGRect)rect withAttributes:(NSDictionary *)attrs

-(void)drawRect:(CGRect)rect{  self.backgroundColor=[UIColor whiteColor];  NSString *attrString =@hello word;    NSDictionary* attrs =@{NSFontAttributeName:[UIFont fontWithName:@AmericanTypewriter size:30]              }; //在词典中加入文本的字体 大小    [attrString drawInRect:CGRectMake(20,120,320,200)withAttributes:attrs];}NSShadow
 NSShadow *shadow=[[NSShadow alloc]init];  shadow.shadowBlurRadius=5;//阴影的模糊程度  shadow.shadowColor=[UIColor blueColor];//阴影颜色  shadow.shadowOffset=CGSizeMake(6, 6);//阴影相对原来的偏移
八,NSObliquenessAttributeName

 

 

 


原标题:iOS 文字属性

关键词:IOS

IOS
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。