I have an array of labels
[labelsArray objectAtIndex:1] ????
I want to change label text style to bold and stressed. How can I do that?
I have an array of labels
[labelsArray objectAtIndex:1] ????
I want to change label text style to bold and stressed. How can I do that?
I do not understand what you mean by stressed but if you want to make it bold you can write:
UILabel *label = [labelArray objectAtIndex:1];
label.font = [UIFont fontWithName:@"Helvetica-Bold" size:18];
The size and font type is ofcourse up to you. Here are the list: http://www.prepressure.com/fonts/basics/ios-4-fonts
EDIT for comment: I have never done that, but after some searching I found this post at stackoverflow. You may try that, but there is no "built-in" function for this as far I know.
If there are different fonts in labels, that you don't know you can try this:
NSInteger i = 0;
for ( ... )
{
UILabel *label = [labelArray objectAtIndex:i];
UIFont *oldFont = label.font;
NSString *fontName = [NSString stringWithFormat:@"%@-BoldItalic", oldFont.fontName];
label.font = [UIFont fontWithName:fontName size:oldFont.pointSize];
}
Hope this'll help!