-
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
update stylesheet.rb to fix app/screen size/height #42
Conversation
takes into account the orientation
Here's some other interesting facts: rmq.device.landscape? returns false when I'm running in landscape mode on the simulator. |
Hmm, that's odd, it does for me in simulator: (main)> rmq.stylesheet.landscape? I flipped it here (main)> rmq.stylesheet.landscape? |
Oh, I bet it doesn't work when you start the simulator in landscape mode, rather than flip to it |
This may be related: #2 |
Good call: also check out https://github.com/infinitered/rmq/blob/master/motion/ruby_motion_query/device.rb#L65 Looks like there's a fat finger in there with a capital L in left. That wasn't the cause thought. |
Even more strange: UIDevice.currentDevice.orientation in the repl returns 0 which is more than likely why things are bad. However installing BubbleWrap and accessing Device.orientation yields :landscape_right, but their implementation just calls UIDevice.currentDevice.orientation. What the what? |
Accessing the orientation with UIApplication.sharedApplication.statusBarOrientation seems to be a better choice. |
This works and specs pass. Build is failing because of rubymotion needing to be updated on travis. |
Diff with whitespace ignored: https://github.com/infinitered/rmq/pull/42/files?w=1 Let me know what you think. |
update stylesheet.rb to fix app/screen size/height
Thanks sir for this fix. |
takes into account the orientation