1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| - (void)showPopView { SCLAlertView *alertView = [[SCLAlertView alloc] initWithNewWindowWidth:310]; [alertView removeTopCircle]; [alertView setHorizontalButtons:YES]; alertView.showAnimationType = SCLAlertViewShowAnimationSimplyAppear; alertView.shouldDismissOnTapOutside = NO; alertView.labelTitle.font = [UIFont pingFangSCWithSize:16]; alertView.labelTitle.textColor = [UIColor blackColor]; alertView.attributedFormatBlock = ^NSAttributedString *(NSString *value) { return [NSString attributeString:value subString:@"13812341234" subStrColor:kRedColorRegular font:[UIFont pingFangSCWithSize:16] otherStrColor:[UIColor colorWithHexString:@"#818181"]]; }; [alertView setBodyTextFontFamily:@"PingFangSC-Regular" withSize:16];
alertView.customViewColor = [UIColor redColor]; alertView.buttonFormatBlock = ^ NSDictionary *{ return @{@"backgroundColor": [UIColor cyanColor]}; }; SCLButton *authPersonalBtn = [alertView addButton:@"取消" actionBlock:^(void) { DLog(@"取消按钮被按下"); }]; authPersonalBtn.titleLabel.font = [UIFont pingFangSCWithSize:16]; authPersonalBtn.buttonFormatBlock = ^ NSDictionary *{ return @{@"backgroundColor": [UIColor whiteColor], @"textColor": [UIColor colorWithHexString:@"#818181"], @"borderWidth": @0}; }; SCLButton *authCompanyBtn = [alertView addButton:@"去注册" actionBlock:^(void) { DLog(@"去注册按钮被按下"); }]; authCompanyBtn.titleLabel.font = [UIFont pingFangSCWithSize:16]; authCompanyBtn.buttonFormatBlock = ^ NSDictionary *{ return @{@"backgroundColor": [UIColor whiteColor], @"textColor": [UIColor blackColor], @"borderWidth": @0}; }; [alertView showSuccess:self title:@"手机号码未注册" subTitle:@"手机号码 13812341234 未注册, 请注册后再登录。" closeButtonTitle:nil duration:0.0f]; }
|