-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposed fix for #1575: huge icons when launching iPhone app on iPad in 2x zoom #2
Closed
bvibber
wants to merge
1
commit into
tidev:master
from
bvibber:c35f0fb2f6241cad27d2825924a6c695df37977c
Closed
Proposed fix for #1575: huge icons when launching iPhone app on iPad in 2x zoom #2
bvibber
wants to merge
1
commit into
tidev:master
from
bvibber:c35f0fb2f6241cad27d2825924a6c695df37977c
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… iPhone compatibility mode in 2x zoom UIScreen's scale property (used to check if we're running on a device with high-res Retina Display) appears as an undocumented surprise on iPads running 3.2; in 2x zoom mode it returns a scale factor of 2.0, which caused false positives because we thought we were running on a high-res display, but couldn't then rescale the @2x images to the proper logical display size. [TiUtils isRetinaDisplay] now checks if we're running on an iPad but in phone mode, and if so hardcodes the scale back to 1.0. I _think_ this will naturally fall through to correct behavior if a future iPad comes out with a double-density display, as it'll report being in Pad mode on a native iPad app and so go ahead and ask for the scale.
I had to make a change in case future versions change their name slightly. Still, good solution. |
pingwang2011
pushed a commit
to pingwang2011/titanium_mobile
that referenced
this pull request
Jan 10, 2012
TIMOB-6429 - Remove all pre-1.8 deprecated APIs and platform specific namespaces
hieupham007
added a commit
to hieupham007/Titanium_Mobile
that referenced
this pull request
Feb 10, 2012
hieupham007
added a commit
to hieupham007/Titanium_Mobile
that referenced
this pull request
Feb 28, 2012
hieupham007
added a commit
to hieupham007/Titanium_Mobile
that referenced
this pull request
Mar 28, 2012
hieupham007
added a commit
to hieupham007/Titanium_Mobile
that referenced
this pull request
May 4, 2012
hieupham007
added a commit
to hieupham007/Titanium_Mobile
that referenced
this pull request
May 9, 2012
hieupham007
added a commit
to hieupham007/Titanium_Mobile
that referenced
this pull request
Jul 26, 2012
hieupham007
added a commit
to hieupham007/Titanium_Mobile
that referenced
this pull request
Jul 27, 2012
hieupham007
added a commit
to hieupham007/Titanium_Mobile
that referenced
this pull request
Feb 18, 2013
pec1985
added a commit
to pec1985/titanium_mobile
that referenced
this pull request
Jul 31, 2013
pec1985
added a commit
to pec1985/titanium_mobile
that referenced
this pull request
Aug 2, 2013
jquick-axway
referenced
this pull request
in jquick-axway/titanium_mobile
Nov 15, 2017
[TIMOB-24963] Add iOS-parity, update docs
jawa9000
pushed a commit
that referenced
this pull request
Jul 17, 2018
This was referenced Apr 5, 2019
ssjsamir
pushed a commit
that referenced
this pull request
Sep 4, 2019
* refactor: fix all warnings (except deprecations for now) * refactor: update Swift test module to Swift 5 * refactor: update Swift test module to Swift 5 #2 * refactor: update Swift module template to Swift 5 * fix: properly lint hooks, restore app.js * fix: fix eslint warnings * fix: fix eslint * fix linting issue * remove duplicate 'use strict' directive * remove duplicate hasProperty method declaration * fix: address couple more warnings
This was referenced Oct 3, 2019
This was referenced Oct 10, 2019
Merged
This was referenced Oct 24, 2019
This was referenced Oct 29, 2019
This was referenced Jan 8, 2020
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/1575-ipad-restarting-a-iphone-published-app-on-ipad-after-using-2x-mode-app-uses-incorrect-icons#ticket-1575-4
The problem here seems to be that the UIScreen reports a scale factor of 2.0 when running on iPad at 2x mode, so [TiUtils isRetinaDisplay] gives a false positive and [TiUtils checkFor2XImage:] pulls the @2x images.
When checking the scale, this patch double-checks if we're on an iPad but with a UI_USER_INTERFACE_IDIOM() for iPhone mode; if so, then we pretend we're on 1x scale instead of checking the reported value.
In native iPad mode we'll still check the scale, so it should still support automatic use of @2x images on a hypothetical future iPad with a double-density display.