-
Notifications
You must be signed in to change notification settings - Fork 52
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
app_width/height not correct depending on portrait/landscape #41
Comments
Yeah, UIScreen.mainScreen.bounds always shows portrait values regardless. However, in stylesheets we can fix that for app_width, screen_width, etc. I assume you're talking about in stylesheets? |
module RubyMotionQuery
class Stylesheet
def app_width
landscape? ? app_size.width : app_size.height
end
def app_height
landscape? ? app_size.height : app_size.width
end
end
end correct, the above seemed to work |
yup, exactly, feel free to do a PR (become a contributor :-)). Or I'm happy to do it. screed_width/screen_height too please. |
I'll hook this up and send in a PR. |
closing this: pull request here #42 |
title says it all.. going to look at fixing that now
The text was updated successfully, but these errors were encountered: