Search code examples
objective-ccocoa-touchiosbold

IOS: string stressed and bold


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?


Solution

  • 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.

    Underline text in UIlabel