Skip to content

Conversation

hyun99999
Copy link
Contributor

UIScree.main will be deprecated in a future version of iOS.
I used UIAplication to get display's scale.

developer doc > mian already deprecated. It causes serious errors in the near future.

So have to change another way. And UIApplication is the one way of getting display's scale. That is available from iOS 13.0. This is why control flow has iOS 13.0 condition.

@hyun99999 hyun99999 changed the title Use UIApplication instead of UIScreen.main on iOS 13.0 and later Use UIApplication instead of UIScreen.main on iOS 13.0 and later Oct 18, 2023
@hyun99999
Copy link
Contributor Author

hyun99999 commented Oct 20, 2023

Thank you for your approved review!
I found CI failed. I'm not sure why unit test error at 'AdjustSizeSpec'.
I want a review about that. PLZ
@lucdion

@lucdion
Copy link
Member

lucdion commented Oct 25, 2023

@hyun99999 , could you adjust the results of the 2 tests that fails, then I will merge your PR. Thanks

@hyun99999 hyun99999 changed the title Use UIApplication instead of UIScreen.main on iOS 13.0 and later Replace UIScreen.main to get display scale on iOS 13.0 and later Nov 2, 2023
@hyun99999
Copy link
Contributor Author

@lucdion I find another way to get screen's scale.
In displayScale doc, Retina display has 2.0 value. But i have been checked with simulator. Normally can get 3.0 value in 3x Retina display.

@lucdion lucdion merged commit a0ab0f5 into layoutBox:master Nov 3, 2023
@lucdion
Copy link
Member

lucdion commented Nov 3, 2023

Thanks for the PR. A new release is available with your change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants