+(UIImage*)getImageByRetina:(NSString*)imageName
{
float nativeWidth= MIN([[UIScreen mainScreen] nativeBounds].size.width,[[UIScreen mainScreen] nativeBounds].size.height);
float screenWidth= MIN([UIScreen mainScreen].bounds.size.width,[UIScreen mainScreen].bounds.size.height);
float currentRatio=nativeWidth/screenWidth;
if (currentRatio<2) {
return [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:[imageName stringByAppendingString:@"@2x"]]];
}else{
return [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:imageName]];
}
return [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:imageName]];
}