OGeek|极客世界-中国程序员成长平台

标题: ios - 文本中的效果-objective-c [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 13:39
标题: ios - 文本中的效果-objective-c

http://i.imgur.com/lF60tKu.png

我有这些字母的来源,我正在尝试在 Objective-c 中创建灰色效果。 但我不能,有没有人知道如何做到这一点?



Best Answer-推荐答案


看看GSBorderLabel .

这很好,因为它在字符上添加了外边框而不是内边框,并且非常容易自定义。

例如:

GSBorderLabel *myLabel = [[GSBorderLabel alloc] initWithFrame:CGRectMake(0, 50, 300, 100)];
myLabel.textColor = [UIColor yellowColor];
myLabel.textAlignment = NSTextAlignmentCenter;
myLabel.borderColor = [UIColor grayColor];
myLabel.borderWidth = 20;
myLabel.text = @"Review";
myLabel.font = [UIFont fontWithName"arty LET" size:60.0];

image

关于ios - 文本中的效果-objective-c,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18334311/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4