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内容请搜索靠谱客的其他文章。
发表评论 取消回复