UIImage's imageWithName does not take name into account
| Originator: | cycrypt | ||
| Number: | rdar://18118975 | Date Originated: | 25-Aug-2014 |
| Status: | Open | Resolved: | |
| Product: | iOS | Product Version: | iOS 8.0 (12A4345d) |
| Classification: | Severe Bug | Reproducible: | Always |
Summary: Having the latest iOS 8 beta 5 installed on my iPad I found out that an error and/or significant change in behaviour like UIImage loads images in iOS 8 leads to very unexpected results and makes existing apps unusable!!! Steps to Reproduce: 1) Have a universal app, which is built for retina and nonretina devices. For some of the images you use, you provide retina resources explicitly, but for reasons of memory-consumption you will not provide retina resources for certain iPad assets, but instead you use the scaled up retina resources from the iPhone. 2) You use following UIImage initializer UIImage *image = [self isPad] ? [UIImage imageNamed:@"myImageName@2x.png"] : [UIImage imageNamed:@"myImageName.png"]; 3) Recognize, that you won't get the @2x-Resource any longer on the initializer, but instead a scaled down version. Expected Results: I would expect that the UIImage initializer would behave consistently with iOS 7 in iOS 8 and load the explicitly named resource without any interpretation involved. Actual Results: The wrong image gets delivered by the initializer, which leads to very undesirable results. (See attached screenshot showing both in comparison) Version: iOS 8.0 (12A4345d) Notes: Configuration: iPad (3rd generation ATT), running iOS 8 beta 5
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!