首页 > 移动平台 > 详细

iOS中文字体自定义

时间:2015-05-25 22:35:17      阅读:307      评论:0      收藏:0      [点我收藏+]

UILabel *lab = [[UILabel alloc] initWithFrame:CGRectMake(0, 400, 250, 50)];

lab.backgroundColor = [UIColor orangeColor];

lab.text = @"水电费水电费";

[self.view addSubview:lab];


//汉字字体倾斜    

NSInteger number = 55;//倾斜值

CGAffineTransform matrix =  CGAffineTransformMake(1, 0, tanf(number * (CGFloat)M_PI / 180), 1, 0, 0);

UIFontDescriptor *desc = [UIFontDescriptor fontDescriptorWithName:[UIFont systemFontOfSize:17].fontName matrix:matrix];

UIFont *font = [UIFont fontWithDescriptor:desc size:33];

lab.font = font;

技术分享

iOS中文字体自定义

原文:http://blog.csdn.net/u012460084/article/details/45972605

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!