UIActionSheet/UIAlertController multiline text

前端 未结 4 1204
孤城傲影
孤城傲影 2021-01-13 05:34

This is the code I am writing to display UIActionSheet.

actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@\"updateresponse         


        
4条回答
  •  抹茶落季
    2021-01-13 06:08

    In iOS 10:

    If you want to apply it to all UIAlertController, you can use these lines of code:

    [[UILabel appearanceWhenContainedIn:[UIAlertController class], nil] setNumberOfLines:2];
    [[UILabel appearanceWhenContainedIn:[UIAlertController class], nil] setFont:[UIFont systemFontOfSize:9.0]];
    

    put this in didFinishLaunchingWithOptions method of the AppDelegate.

提交回复
热议问题