• Stars
    star
    128
  • Rank 281,044 (Top 6 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

常用Category和工具类

AZTools Build Status

快速集成

pod 'AZTools'

常用分类

UIView+AZGradient
UIViewController+AZPushAndPop
NSObject+AZSafeArea
UIButton+AZCountDown
- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    // 恢复倒计时
    [self.button az_cd_recover];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // ...   
  
    self.button.az_cd_identify = @"AZCountDownDemoBtn";
    self.button.az_cd_count = 60;
    self.button.az_cd_countdownBlock = ^(NSInteger countDown, UIButton * _Nonnull button) {
        [button setTitle:[NSString stringWithFormat:@"%lds",(long)countDown] forState:UIControlStateDisabled];
    };
    self.button.az_cd_endBlock = ^{
        NSLog(@"倒计时结束!");
    };
}

- (IBAction)startCountDown:(UIButton *)sender {
    // 用户点击开始倒计时
    [sender az_cd_start];
}

工具类

AZServiceDate

  • 获取服务器时间,设置成功后,即使用户修改手机时间,也能获取到正确的服务器时间。

AZBlockHelper

  • 获取Block的签名、参数个数