Ios 如何为静态uitableview单元格添加凸版效果

Ios 如何为静态uitableview单元格添加凸版效果,ios,uitableview,letterpress,Ios,Uitableview,Letterpress,我有一个应用程序,我使用此代码在视图中将凸版效果添加到NSStrings: //NSMutableAttributedString NSString *nameString = [NSString stringWithFormat:@"Nombre: %@", [[jsonArray objectAtIndex:0] objectForKey:@"nombre"]]; NSString *addressString = [NSString stringWithFormat:@"Direccio

我有一个应用程序,我使用此代码在视图中将凸版效果添加到NSStrings:

//NSMutableAttributedString

NSString *nameString = [NSString stringWithFormat:@"Nombre: %@", [[jsonArray objectAtIndex:0] objectForKey:@"nombre"]];
NSString *addressString = [NSString stringWithFormat:@"Direccion: %@", [[jsonArray objectAtIndex:0] objectForKey:@"direccion"]];

NSMutableAttributedString *restName = [[NSMutableAttributedString alloc] initWithString:nameString];
NSMutableAttributedString *addressName = [[NSMutableAttributedString alloc] initWithString:addressString];    

[restName addAttributes:@{ NSTextEffectAttributeName : NSTextEffectLetterpressStyle, NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline] } range:NSMakeRange(0, restName.length)];
[addressName addAttributes:@{ NSTextEffectAttributeName : NSTextEffectLetterpressStyle, NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline] } range:NSMakeRange(0, addressName.length)];

self.topVC.restaurantName.attributedText = restName;
self.topVC.restaurantAddress.attributedText = addressName;

但我有另一个应用程序,我想将它添加到tableview单元格中的单个标签中。问题是它是一个静态的tableview,我没有一个cellForRowAtIndexPath方法来设置文本。如何操作?

您可以为标签创建一个
IBOutlet
,然后在
viewDidLoad
上配置属性字符串。我相信您也可以通过Interface Builder添加此效果。

我还没有找到活版,我相信这将是我的UILabel的属性检查器。你看到了吗?