iosuilabeluifont

How to force UILabel to draw a text with upper case chars?


How to force UILabel to draw a text with upper case chars?


Solution

  • Objective-C

    NSString *text = @"Hello";
    [myLabel setText:[text uppercaseString]];
    

    Swift 3 & 4

    let text = "Hello"
    myLabel.text = text.uppercased()