xcode - iOS中怎么给文字加倒影?
PHP中文网
PHP中文网 2017-04-17 11:33:46
0
1
357

如果不行的话,怎么把文字转换成图片?

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
阿神

重载UIView子类中的drawRect:方法,自己在drawRect:里面画倒影

CGContextRef context  = UIGraphicsGetCurrentContext();
UIFont *myFont = [UIFont systemFontOfSize:17];
CGContextSetShadow(context, CGSizeMake(5, 5), 2);
[@"需要倒影的文字" drawAtPoint:CGPointMake(50, 50) withFont:myFont];
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!