概述
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 UIAlertController 文字左对齐所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复