Files
featherVoice/QXLive/Tabbar/弹窗/QXAppVersionView.h
2025-10-20 09:43:10 +08:00

41 lines
969 B
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// QXAppVersionView.h
// QXLive
//
// Created by 启星 on 2025/9/27.
//
#import <UIKit/UIKit.h>
#import "QXAppVersionModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface QXAppVersionView : UIView
@property (nonatomic,strong)QXAppVersionModel *model;
-(void)showInView:(UIView *)view;
-(void)hide;
@end
@interface QXVersionComparator : NSObject
/**
比较两个版本号是否需要更新
@param newVersion 新版本号(服务器返回的版本)
@param oldVersion 旧版本号(当前应用版本)
@return 比较结果:-1=旧版本更大0=版本相同1=新版本更大(需要更新)
*/
+ (NSInteger)compareVersion:(NSString *)newVersion withOldVersion:(NSString *)oldVersion;
/**
检查是否需要更新
@param newVersion 新版本号
@param oldVersion 旧版本号
@return YES=需要更新NO=不需要更新
*/
+ (BOOL)shouldUpdateFromVersion:(NSString *)oldVersion toVersion:(NSString *)newVersion;
@end
NS_ASSUME_NONNULL_END