123456789101112131415161718192021222324252627282930313233343536373839 |
- //
- // UIViewController+YOUPAIAlert.m
- // MSYOUPAI
- //
- // Created by admin on 2022/3/16.
- // Copyright © 2022 MS. All rights reserved.
- //
- #import "UIViewController+YOUPAIAlert.h"
- #import "LZAlertWindow.h"
- #import "UIViewController+TFPresent.h"
- @implementation UIViewController (YOUPAIAlert)
- /**
- 确认操作提示框
- */
- - (void)youpaifAlertWithTitle:(NSString *)title content:(NSString *)content cancelBtn:(NSString *)cancel confimBtn:(NSString *)confim confimBlock:(void (^)(void))block{
- LZAlertAction *cancelAction = [LZAlertAction actionWithTitle:cancel handler:^(LZAlertAction *action) {
- }];
- cancelAction.cornerRadius = 24.0f;
- cancelAction.bgColor = LZF5F4F7Color;
- cancelAction.color = LZ273145Color;
- LZAlertAction *confimAction = [LZAlertAction actionWithTitle:confim handler:^(LZAlertAction *action) {
- if (block != nil) {
- block();
- }
- }];
- confimAction.cornerRadius = 24.0f;
- confimAction.bgColor = [UIColor colorWithPatternImage:[LCTools ColorImage:CGSizeMake((KScreenWidth - 105.0f) / 2.0f, 48.0f) FromColors:@[LZBFB6FFColor,LZ7C69FEColor] ByGradientType:GradientLeftToRight]];
- confimAction.color = [UIColor whiteColor];
- LZAlertWindow *alert = [LZAlertWindow alertWithTitle:title content:content action:@[cancelAction,confimAction]];
- alert.contentTextAlignment = NSTextAlignmentCenter;
- [self TFPresentVC:alert completion:^{}];
- }
- @end
|