#import <UIKit/UIKit.h>
@interface UIImage (ZB)
+(UIImage *)imageWithName:(NSString *)name;
@end
#import "UIImage+ZB.h"
@implementation UIImage (ZB)
+(UIImage *)imageWithName:(NSString *)name{
if (IOS7) {
NSString *url=[NSString stringWithFormat:@"%@_os7",name];
UIImage *image= [UIImage imageNamed:url];
if (image==nil) {
return [UIImage imageNamed:name];
}else{
return image;
}
}else{
return [UIImage imageNamed:name];
}
}
@end
时间: 2024-11-01 22:40:40