iOS中APP版本号的比较方法
介绍一个简单的APP版本号比较方法
NSString *oldVersion = @”1.0.1″;
NSString *newVersion = @”1.1.0″;
if ([oldVersion compare:newVersion options:NSNumericSearch] ==NSOrderedDescending) {
NSLog(@”%@ is bigger”,oldVersion);
}else
{
NSLog(@”%@ is bigger”,newVersion);
}