个人总结1

1.// 去除多余的线

  table.tableFooterView = [[UIView alloc]initWithFrame:CGRectZero];

2.// 手机号中间四位为*号

 NSString * telStr = [NSString stringWithFormat:@"%@",am.mobilePhoneNum];
        NSString * str1 = [telStr stringByReplacingCharactersInRange:NSMakeRange(3, 4) withString:@"****"];
        _telNumLabel2.text = str1;

3.// cell右边加箭头

cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;

4.

#define RGBCOLOR(r, g, b)       [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:1]
#define RGBACOLOR(r, g, b, a)   [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)]

//弧度转度数
#define RADIANS_TO_DEGREES(x) ((x)/M_PI*180.0)
//度数转弧度
#define DEGREES_TO_RADIANS(x) ((x)/180.0*M_PI)

5.1 iOS9新AlertView

UIAlertController * alert = [UIAlertController alertControllerWithTitle:@"系统信息" message:@"保存成功" preferredStyle:UIAlertControllerStyleAlert];
    [alert addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {

    }]];
    [self presentViewController:alert animated:YES completion:nil];

5.2

NSString *title = NSLocalizedString(@"提示", nil);
    NSString *message = NSLocalizedString(@"这是一个提示", nil);
    NSString *cancelButtonTitle = NSLocalizedString(@"取消", nil);
    NSString *otherButtonTitle = NSLocalizedString(@"确定", nil);

    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];

    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelButtonTitle style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
        NSLog(@"点击了取消按钮.");
    }];

    UIAlertAction *otherAction = [UIAlertAction actionWithTitle:otherButtonTitle style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
        NSLog(@"点击了确定按钮.");
    }];

    [alertController addAction:cancelAction];
    [alertController addAction:otherAction];

    [self presentViewController:alertController animated:YES completion:nil];

//应尽量用自己定义的类
-(void)customAlertView:(NSString *)subStr mainStr:(NSString *)mainStr confirmStr:(NSString *)confirmStr cancelStr:(NSString *)cancelStr{
    UIAlertController * alert = [UIAlertController alertControllerWithTitle:subStr message:mainStr preferredStyle:UIAlertControllerStyleAlert];
    [alert addAction:[UIAlertAction actionWithTitle:confirmStr style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
        NSLog(@"确定");
    }]];
    [alert addAction:[UIAlertAction actionWithTitle:cancelStr style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
        NSLog(@"取消");
    }]];
    [self presentViewController:alert animated:YES completion:nil];

}
  1. tableview点击cell跳转到storyboard中搭建界面同时有h,m方法的类
UIStoryboard * story = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController * vc = [story instantiateViewControllerWithIdentifier:@"justTest"];


[self presentViewController:vc animated:YES completion:nil];

7.得到控件的高
CGRectGetHeight(_tableView.frame)

8.#warning 下面的修改button文字颜色

//        _noWifiButton.titleLabel.textColor = [UIColor blackColor];
[_noWifiButton setTitleColor:[UIColor darkGrayColor] forState:0];
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值