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];

最新文章

  1. python学习笔记(字符串操作、字典操作、三级菜单实例)
  2. C程序汇编运行模式简析
  3. python基础之数据类型(二)
  4. android surfaceView 黑屏
  5. C++中,申请字符串数组可用new实现
  6. Android的Handler几种常见的传值方式
  7. 正则去掉html标签
  8. distributor之Interrupt Set/Clear-Active Registers, GICD_IS/CACTIVERn
  9. keyboard splitting bug on ipad with ios 5 and 6 (Cocos2d-x)
  10. Essential C#读书笔记
  11. iOS错误之-Presenting view controllers on detached view controllers is discouraged
  12. java基础小项目练习之1----3天做出飞机大战
  13. VIM学习二: VIM配置代码及效果图
  14. Dear Menuhin
  15. 为什么90%的CTO 都做不好绩效管理
  16. canvas-3radialGradient.html
  17. Solr——Windows下部署Solr6.6.0至Tomcat8.5.28(一)
  18. day 11 生成器
  19. linux服务器安装anaconda,然后远程使用jupyter
  20. 使用python来搞定redis的订阅功能

热门文章

  1. IntelliJ_13书签
  2. nginx配置实战1----配置虚拟主机
  3. Freemarker 各种格式化
  4. 本篇文章: HTML DOM 对象
  5. Mysql实现行列转换
  6. asp.net mvc web api 可跨域方法
  7. c#读取excel
  8. BZOJ 1029 建筑抢修 贪心+堆
  9. java 基础拾漏
  10. Azure 数据库中文乱码的问题