open/demo_src/TCP_Client/MobileIMSDK4iDemo_tcp/MobileIMSDK4iDemo/Utils.h

39 lines
1.7 KiB
C
Raw Normal View History

2025-01-18 15:55:12 +08:00
//
// ToolKits.h
// MobileIMSDK4iDemo
//
// Created by Jack Jiang on 2021/7/8.
// Copyright © 2021 52im.net. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface Utils : NSObject
/*!
* ios8及以上系统中UIAlertView已过时使UIAlertController实现同样的功能
*
* @param title
* @param content
* @param btnTitle
* @param parent UIViewControler对象
* @param handler block回调
*/
+ (void)showAlert:(NSString *_Nonnull)title content:(NSString *_Nonnull)content btnTitle:(NSString *_Nonnull)btnTitle parent:(UIViewController *_Nonnull)parent handler:(void (^ __nullable)(UIAlertAction * _Nonnull action))handler;
/*!
* ios8及以上系统中UIAlertView已过时使UIAlertController实现同样的功能
*
* @param title
* @param content
* @param okBtnTitle
* @param cancelBtnTitle
* @param parent UIViewControler对象
* @param okHandler block回调
* @param cancelHandler block回调
*/
+ (void)areYouSureAlert:(NSString *_Nonnull)title content:(NSString *_Nonnull)content okBtnTitle:(NSString *_Nullable)okBtnTitle cancelBtnTitle:(NSString *_Nullable)cancelBtnTitle parent:(UIViewController *_Nonnull)parent okHandler:(void (^ __nullable)(UIAlertAction * _Nullable action))okHandler cancelHandler:(void (^ __nullable)(UIAlertAction * _Nullable action))cancelHandler;
@end