NSAttributedString
を使用してテキストをストロークし太字にすることができます。
NSString *string = @"Hello World";
NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:string];
NSDictionary *attributes = @{
NSStrokeWidthAttributeName: @-5.0, //value for making bold, higher negative number bolder text
NSStrokeColorAttributeName:[UIColor blackColor],
NSForegroundColorAttributeName:[UIColor blackColor],
NSFontAttributeName:[UIFont fontWithName:@"Your font name" size:20]
};
[attrString addAttributes:attributes range:NSMakeRange(0, string.length)];
・ホープ、このヘルプ:
は、以下のこのコードを試してみてください。
ありがとうございます。私はこれをしましたが、それは私に概要を与え、それは空の中です。 – Emad
コードを修正して試してみてください。 –
はい、今働いています。ありがとう。 – Emad