UIAlertController 标题文字大小 颜色

NSString *title = [NSString stringWithFormat:@"\n恭喜您获得%d个红包\n", ];
NSString *msg = @"\n把红包分享给微信好友,金额随机,可用于购买雪票和雪卡";
UIAlertController * alert = [UIAlertController alertControllerWithTitle:title
message:msg
preferredStyle:UIAlertControllerStyleActionSheet];
// titile字号处理
NSMutableAttributedString *hogan = [[NSMutableAttributedString alloc] initWithString:title];
[hogan addAttribute:NSFontAttributeName
value:[UIFont systemFontOfSize:20.0]
range:NSMakeRange(, title.length)];
[alert setValue:hogan forKey:@"attributedTitle"];
// UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"给好友发红包" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[self shareAction];
}];
[alert addAction:sureAction]; alert.view.tintColor = APP_MAIN_COLOR;
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消"
style:UIAlertActionStyleCancel
handler:nil];
[alert addAction:cancelAction]; [self presentViewController:alert animated:YES completion:nil];
UIAlertController 标题文字大小 颜色的更多相关文章
- 设置UIButton文字大小颜色不同
_loginBtn = [[UIButton alloc]initWithFrame:CGRectMake(iconX, CGRectGetMaxY(passwordBGView.frame)+25, ...
- IOS 修改UIAlertController的按钮标题的字体颜色,字号,内容
IOS 修改UIAlertController的按钮标题的字体颜色,字号,内容 UIAlertController *alertVC = [UIAlertController alertControl ...
- [BS-03] 统一设置UITabBarController管理的所有VC的tabBarItem图标文字的颜色大小等属性
1. 统一设置UITabBarController管理的所有VC的tabBarItem图标文字的颜色大小等属性 . 统一设置UITabBarController管理的所有VC的tabBarItem图标 ...
- 【转】iOS中设置导航栏标题的字体颜色和大小
原文网址:http://www.360doc.com/content/15/0417/11/20919452_463847404.shtml iOS中设置导航栏标题的字体颜色和大小,有需要的朋友可以参 ...
- iOS中设置导航栏标题的字体颜色和大小
iOS中设置导航栏标题的字体颜色和大小,有需要的朋友可以参考下. 在平时开发项目的时候,难免会遇到修改导航栏字体大小和颜色的需求,一般使用自定义视图的方法,其实还存在一种方法. 方法一:(自定义视图的 ...
- Echarts 设置地图上文字大小及颜色
Echarts 设置地图上文字大小及颜色,效果如下: 上代码:关键代码用红色 series: [ { //name: '香港18区人口密度', type: 'map', mapType: 'jiang ...
- 【Android】安装插件 + 改变文字大小、颜色 + 隐藏代码区块的直线
安装插件 可以在搜寻框里面填入关键字搜寻,具体的插件,网上有很多介绍了 改变文字大小.颜色 隐藏代码区块的直线
- UIAlertController 修改文字显示实现方法
UIAlertController修改文字显示 不废话先上完整代码 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 UIAlertControll ...
- android textview改变部分文字的颜色和string.xml中文字的替换(转)
转 :http://blog.csdn.net/ljz2009y/article/details/23878669 一:TextView组件改变部分文字的颜色: TextView textView ...
随机推荐
- Css-控制div斜转
必须放在css声明中 div { transform: rotate(45deg); -o-transform: rotate(45deg); float: right; -webkit-transf ...
- 【HDU 5832】A water problem(大数取模)
1千万长度的数对73和137取模.(两个数有点像,不要写错了) 效率要高的话,每15位取一次模,因为取模后可能有3位,因此用ll就最多15位取一次. 一位一位取模也可以,但是比较慢,取模运算是个耗时的 ...
- 【HDU 4305】Lightning(生成树计数)
Problem Description There are N robots standing on the ground (Don't know why. Don't know how). Sudd ...
- Handler的postDelayed方法
这是一种可以创建多线程消息的函数 使用方法:1,首先创建一个Handler对象 Handler handler=new Handler(); 2,然后创建一个Runnable对象 Runnable r ...
- if __name__ == '__main__':
python if __name__ == '__main__': 模块是对象,并且所有的模块都有一个内置属性 __name__.一个模块的 __name__ 的值取决于您如何应用模块.如果 impo ...
- 【BZOJ-3709】Bohater 贪心
3709: [PA2014]Bohater Time Limit: 5 Sec Memory Limit: 128 MBSec Special JudgeSubmit: 835 Solved: ...
- C# .NET 使用第三方类库DotNetZip解压/压缩Zip文件
dotNetZip on CodePlex: http://dotnetzip.codeplex.com/ 详细的可以看源代码……总之感觉比SharpZipLib好用.而且DotNetZip支持VB, ...
- CMMI3标准文档模板大全
链接:http://pan.baidu.com/s/1c2cGX8W 密码:ulns
- Redis未授权访问漏洞分析
catalog . Redis简介 . 漏洞概述 . 漏洞利用方式 . 修复方式 1. Redis简介 Relevant Link: http://www.cnblogs.com/LittleHann ...
- C#的委托和事件(delegate)
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Dele ...