このコードを使用して、ビューの 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;
しかし、テーブルビューセルの単一のラベルに追加したい別のアプリがあります。問題は、それが静的なテーブルビューであり、テキストを設定する cellForRowAtIndexPath メソッドがないことです。どうすればいいですか?