我是靠谱客的博主 传统御姐,这篇文章主要介绍iOS UIAlertController 文字左对齐,现在分享给大家,希望可以做个参考。

UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"" message:@"" preferredStyle:UIAlertControllerStyleAlert];

    UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"好的" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {

        

    }];

    

    [alertController addAction:action1];

    UIView *subView1 = alertController.view.subviews[0];

    UIView *subView2 = subView1.subviews[0];

    UIView *subView3 = subView2.subviews[0];

    UIView *subView4 = subView3.subviews[0];

    UIView *subView5 = subView4.subviews[0];

    UILabel *title = subView5.subviews[0];

    UILabel *message = subView5.subviews[1];

    message.textAlignment = NSTextAlignmentLeft;

    UIViewController *rootVC = [[UIApplication sharedApplication]delegate].window.rootViewController;

    [rootVC presentViewController:alertController animated:YES completion:nil];

最后

以上就是传统御姐最近收集整理的关于iOS UIAlertController 文字左对齐的全部内容,更多相关iOS内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(85)

评论列表共有 0 条评论

立即
投稿
返回
顶部