增加换肤功能
This commit is contained in:
114
QXLive/Tools/QXProjectTools.h
Normal file
114
QXLive/Tools/QXProjectTools.h
Normal file
@@ -0,0 +1,114 @@
|
||||
//
|
||||
// QXProjectTools.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/4/27.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreLocation/CoreLocation.h>
|
||||
|
||||
#import <MapKit/MKMapItem.h>//用于苹果自带地图
|
||||
|
||||
#import <MapKit/MKTypes.h>//用于苹果自带地图
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
typedef NS_ENUM(NSInteger) {
|
||||
//月日时分
|
||||
DataFormatTypeMMDDHHMM = 0,
|
||||
//月日时分 (带汉字)
|
||||
DataFormatTypeZHMMDDHHMM ,
|
||||
//时分
|
||||
DataFormatTypeHHMM,
|
||||
//年月日
|
||||
DataFormatTypeYYYYMMDD
|
||||
}DataFormatType;
|
||||
@interface QXProjectTools : NSObject
|
||||
|
||||
|
||||
/** 把字符串替换成星号*/
|
||||
+(NSString *)replaceStringWithAsterisk:(NSString *)originalStr startLocation:(NSInteger)startLocation lenght:(NSInteger)lenght;
|
||||
|
||||
/// 获取显示类型
|
||||
/// @param type 显示类型
|
||||
/// @param dateStr 原始时间字符串
|
||||
+(NSString*)getDispalyTimeWithType:(DataFormatType)type dateStr:(NSString*)dateStr;
|
||||
|
||||
|
||||
/// 获取显示日期
|
||||
/// @param dateStr 时间
|
||||
+(NSString *)getDayDisplayWithDate:(NSString *)dateStr;
|
||||
|
||||
/// 获取日期时间戳
|
||||
/// @param dateStr 日期
|
||||
+ (NSString *)getTimestampFromTime:(NSString*)dateStr;
|
||||
|
||||
|
||||
/// 打电话
|
||||
/// @param mobile 联系电话
|
||||
+(void)contactWithMobile:(NSString*)mobile;
|
||||
|
||||
/// 提示摇晃
|
||||
/// @param viewToShake view
|
||||
+ (void)shakeView:(UIView*)viewToShake;
|
||||
|
||||
|
||||
/// 跳转到已经安装的地图
|
||||
/// @param coord 目标位置
|
||||
/// @param currentCoord 当前位置
|
||||
+(UIAlertController *)getInstalledMapAppWithEndLocation:(CLLocationCoordinate2D)coord
|
||||
address:(NSString*)address
|
||||
currentLocation:(CLLocationCoordinate2D)currentCoord;
|
||||
|
||||
|
||||
+(void)contactServices;
|
||||
|
||||
|
||||
/// 振动反馈
|
||||
+(void)vibrationFeedback;
|
||||
|
||||
+(void)showMessage:(NSString*)text;
|
||||
|
||||
+(void)showMessage:(NSString *)text view:(UIView *)view;
|
||||
|
||||
+(void)showLoadingInView:(UIView*)view;
|
||||
|
||||
+(void)hideLoadingInView:(UIView*)view;
|
||||
/// 根据消息类型跳转控制器
|
||||
/// @param type 消息类型
|
||||
/// @param parameterId 参数Id
|
||||
+(void)jumpToControllerWithType:(NSInteger)type parameterId:(NSString*)parameterId;
|
||||
|
||||
|
||||
/// 展示价格
|
||||
/// @param type 0 四舍五入 1进一法 2去尾法
|
||||
/// @param number 数字
|
||||
+(NSString*)showDoubleNumberWithType:(NSInteger)type number:(double)number;
|
||||
|
||||
+(void)toSetting;
|
||||
|
||||
//阿里支付
|
||||
+(void)aliPayWithOrderNum:(NSString*)orderString
|
||||
resultBlcok:(void(^)(NSDictionary*dict))resultBlock;
|
||||
//微信支付
|
||||
+(void)wexinPayWithDict:(NSDictionary*)dict;
|
||||
|
||||
/**
|
||||
获取父控制器
|
||||
|
||||
@param childVC 子控制器
|
||||
@return 父控制器
|
||||
*/
|
||||
+(UIViewController *)getViewControllerWithChildVC:(UIViewController*)childVC;
|
||||
|
||||
/**
|
||||
获取最上层的控制器
|
||||
|
||||
@return 控制器
|
||||
*/
|
||||
+ (UIViewController*)topViewController;
|
||||
|
||||
+ (NSString *)getTimeFromTimestampWithTime:(long)time;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Reference in New Issue
Block a user