[TIMOB-16329] Kitchen Sink: High Resolution image is not visible on iPad
GitHub Issue | n/a |
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2014-09-14T22:43:36.000+0000 |
Affected Version/s | Release 3.2.1 |
Fix Version/s | Release 3.4.0 |
Components | iOS |
Labels | qe-3.2.1 |
Reporter | Priya Agarwal |
Assignee | Ingo Muschenetz |
Created | 2014-01-28T11:49:44.000+0000 |
Updated | 2017-03-03T21:43:26.000+0000 |
Description
High Resolution image (dog@2x~iphone.jpg) is not visible on iPad since the format of image is wrong.
Steps to reproduce:
1.Install and Run KS>BaseUI>Views>Hi-Res Image 2
Expected Result:
1.High Resolution image of dog must be visible.
Actual Result:
1.No image is viewed.
Note: Issue is due to wrong format of high resolution image(dog@2x~iphone.jpg) Think it must be dog@2x.jpg
Attachments
File | Date | Size |
iOS7.PNG | 2014-09-12T23:25:04.000+0000 | 186272 |
iOS8.PNG | 2014-09-12T23:25:04.000+0000 | 7230737 |
This issue exist with 3.2.1 but can't reproduce with 3.4.0 iOS 7.1 TiSDK 3.4.0 Appcelerator Studio, build: 3.3.0.201407111535 Titanium Command-Line Interface, CLI version 3.3.0,
Issue still exists on: Mac OSX 10.9.4 Appcelerator Studio, build: 3.4.0.201409112242 Titanium SDK build: 3.4.0.v20140912145715 Titanium CLI, build: 3.4.0-rc2 Alloy: 1.5.0-beta2 Xcode6 GM Seed iPhone Device iPad 4 (8.0 GM Seed), iPad 3 (7.0.6) On iOS8 the Hi-Res Image 2 displays the image, however on iOS 7.0.6 the image is not displayed. This is shown in the attached screenshots.
How to fix
If the image is renamed to dog@2x.jpg then it displays fine.Essentially, this is the way we create a local image before we load it into the ImageView
At this point, running on Xcode 6 GM, if the app is installed in an iPad running iOS 8, the system will try to figure out what the name of the file really is. For example: "dog.png". If that does not exist, then it looks for "dog@2x.png" then for "dog@2x~iphone.png", and so on. What is actually going behind the scenes is unknown since it's part of the UIKit and the code is not open source. Running the same exact code with Xcode 6 GM and iPad running on iOS7, this logic breaks, and the UIImage* returns null. I'm looking into this, but it looks like an Apple bug since the same code works for iOS 8 and not for iOS 7. Not sure if the bug is in iOS 7 or iOS 8 (since the file has "~iphone" in it and not "~ipad")
The image, in order to be shown on the iPad, cannot have the "~iphone" in the name. "~iphone" is used for iPhone specific images while "~ipad" is for iPad. The reason it works in iOS 8, it must be a bug internally. This ticket is invalid, rename the image to "~ipad" or simply remove "~ipad" from the name. Also, this is on Kitchen Sink, and this example/test was created for iPhone.
[~penrique] I feel that this bug is valid, however it should be logged against KitchenSink because the issue is due to a incorrectly named file. Should I change the component to KitchenSink?
[~eharris] We are cleaning up JIRA. Although KS is now defunct, if you feel there is work to be done here, please reopen or write a new ticket.
Closing as invalid.