UIAlertController显示内容左对齐
来源:互联网 发布:c 语言入门级书籍 编辑:程序博客网 时间:2024/06/14 18:09
UIAlertController默认居中对齐。找了很多帖子,也没有看到怎么单纯的修改信息内容的左对齐。有的方法改完以后连title都靠左了。不符合我们的预期。直接上代码
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"更新提示!" message:tips preferredStyle:UIAlertControllerStyleAlert]; UIView *subView1 = alert.view.subviews[0]; UIView *subView2 = subView1.subviews[0]; UIView *subView3 = subView2.subviews[0]; UIView *subView4 = subView3.subviews[0]; UIView *subView5 = subView4.subviews[0];//分别拿到title 和 message 可以分别设置他们的对齐属性 UILabel *title = subView5.subviews[0]; UILabel *message = subView5.subviews[1]; message.textAlignment = NSTextAlignmentLeft;
阅读全文
0 0
- UIAlertController显示内容左对齐
- UIAlertController message信息左对齐
- UIAlertController message 靠左显示
- iOS 8UIAlertcontroller如何实现 message左对齐 ,title居中显示
- UIAlertView内容左对齐
- UIAlertController 中的message中的内容如何设置文本居左显示
- iOS Alert内容左对齐
- Latex使\section中的内容左对齐
- 自定义alert文本内容左对齐
- textarea标签没有左对齐显示数据
- Bootstrap Tooltip显示换行和左对齐
- Bootstrap Tooltip显示换行和左对齐
- Bootstrap Tooltip显示换行和左对齐
- 【SQL分享】字符串左对齐或右对齐显示
- textarea内容不能靠左显示
- 左对齐和右对齐
- Button 左对齐
- mathtype方程组左对齐
- 解决“运行arm-linux-gcc命令,提示No such file or directory”的问题
- 图片自适应父元素大小,并左右上下居中的css方法
- HDU 1228 A + B(map的简单使用)
- 监控平台
- Oracle表空间-本地管理新建
- UIAlertController显示内容左对齐
- of_alias_get_id 函数与设备树中aliases节点的关系
- svn的常用命令
- 【python学习笔记】Python中排序sorted()和list.sort()
- CPU高速缓存行
- 【Kotlin】Android Studio 配置
- Android Studio 上传SVN标准全过程(二)
- ERROR D8016: “/ZI”和“/Gy-”命令行选项不兼容
- HttpClient使用详解