iOS8开发中采用xcassets设置LaunchImage后如何获取自适应屏幕大小的启动图片
1 2 3 4 5 |
NSDictionary * dic = @{@"320x480" : @"LaunchImage-700", @"320x568" : @"LaunchImage-700-568h", @"375x667" : @"LaunchImage-800-667h", @"414x736" : @"LaunchImage-800-Portrait-736h"}; NSString * key = [NSString stringWithFormat:@"%dx%d", (int)[UIScreen mainScreen].bounds.size.width, (int)[UIScreen mainScreen].bounds.size.height]; UIImage * launchImage = [UIImage imageNamed:dict[key]]; |
不知如何快速释放启动图片内存
测试下缓存性能