In the art to provide pictures of the premise, only need to do a uiimage below to do a classification, you can easily achieve in 6 and 7 of the picture name adaptation.
For example, the artwork in the 6 above provides the picture called common_button_big_red_highlighted.png,7 on the name [email protected], through the following simple code can achieve 6 and 7 of the picture adaptation, and in the call is very convenient, Only through [UIImage imagewithnamed:] Can, with the decency of the [UIImage imagenamed:] similar;
+ (UIImage *) imagewithnamed: (NSString *) imagename{if([[Uidevice currentdevice].systemversion Doublevalue] >=7.0) {NSString* name = [NSString stringWithFormat:@"%@_os7", ImageName]; UIImage* Image =[UIImage Imagenamed:imagename]; if(Image = =Nil) { returnImage =[UIImage Imagenamed:imagename]; } return[UIImage Imagenamed:name]; } return[UIImage imagenamed:imagename];}