【代码笔记】iOS-UIActionSheet字体的修改
来源:互联网 发布:二级备案域名免费注册 编辑:程序博客网 时间:2024/06/05 18:19
一,效果图。
二,代码。
RootViewController.h
#import <UIKit/UIKit.h>@interface RootViewController : UIViewController<UIActionSheetDelegate>@end
RootViewController.m
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UIActionSheet *actionSheet=[[UIActionSheet alloc]initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@"手机找回密码", nil]; [actionSheet showInView:self.view];}#pragma mark - UIActionSheetDelegate- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{ switch (buttonIndex) { case 0: { NSLog(@"--0--"); } break; case 1: { NSLog(@"--1--"); } break; default: break; }}- (void)willPresentActionSheet:(UIActionSheet *)actionSheet{ for (UIView *subViwe in actionSheet.subviews) { if ([subViwe isKindOfClass:[UIButton class]]) { UIButton *button = (UIButton*)subViwe; button.titleLabel.font=[UIFont systemFontOfSize:15]; [button setTitleColor:[UIColor redColor] forState:UIControlStateNormal]; } }}
阅读全文
0 0
- 【代码笔记】iOS-UIActionSheet字体的修改
- 【代码笔记】iOS-清除图片缓存UIActionSheet
- 【代码笔记】iOS-UIActionSheet动态添加按钮
- IOS笔记 - UIActionSheet
- iOS UIActionSheet的使用
- ios--UIActionSheet的使用
- ios-UIActionSheet的使用
- [IOS]UIActionSheet的使用
- iOS UIActionSheet的用法
- [IOS]UIActionSheet的使用
- iOS学习笔记—— UIAlertView 和 UIActionSheet 的使用
- iOS开发笔记-UIActionSheet的相关属性设置
- 【代码笔记】iOS-字体抖动动画
- iOS中UIActionSheet的使用
- iOS之UIActionSheet的使用
- ios中UIActionSheet的误区
- iOS中UIActionSheet的使用
- iOS中UIActionSheet的使用
- Linux rm命令
- SAP 常用业务数据表设计
- android 字定义GridView 引用自己的定义布局
- TensorFlow 中 tf.app.flags.FLAGS 的用法介绍
- MongoDB增删改查(三)
- 【代码笔记】iOS-UIActionSheet字体的修改
- XAMPP和VMware Workstation占用443端口冲突的解决办法
- 数据库的常用查询命令
- 刷清橙OJ--A1081.二分求方程根
- pandas中Timestamp类用法讲解
- java下载网络文件并重命名
- Android EditText输入时闪退
- 分页查询优化
- Xcode使用之安装Xcode Command Line Tools