41 lines
969 B
C
41 lines
969 B
C
|
|
//
|
|||
|
|
// 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
|