New features, landscape done right, and RMQ plugins.
bundle update ruby_motion_query
People who worked on this version: @twerth, @GantMan, @squidpunch, and @mwise
- Automatically enable user interaction when an event is added
screen_height are now calculated by RMQ, not the SDK (as the SDK just changed this in iOS8 and broke everything, bad SDK, bad)
- Added alpha styler for UIViews
- Adds styler for text color in highlighted state
- Added some additional stylers for UITextView including all UIScrollViewStyler stylers
- Added support for finding controllers with frontViewController methods that specify their “main” controller
color= alias to ui_text_view styler
- Default clipToBounds true if
- Neato iOS version detection:
New landscape features
RMQ’s support for landscape use to be “meh”. v0.8.0 has pretty great support now. A lot of little enhancements went into this version for landscape. If you add willChangeStatusBarOrientation to your app_delegate (see below), everything should work well automatically.
- Grid now automatically supports landscape. Of course you can still assign a new grid for landscape, but now you don’t have to do that or clear the cache just for an orientation change
- You can now set the orientation that RMQ uses everywhere (to :landscape normally). So you can tell RMQ what the orientation will be, not what it is. Add this to your app_delegate to do this automatically:
def application(application, willChangeStatusBarOrientation: new_orientation, duration: duration)
# Manually set RMQ's orientation before the device is actually oriented
# So that we can do stuff like style views before the rotation begins
rmq.device.orientation = new_orientation
New plugin features
Plugins are coming to RMQ, one already exists (although it’s not 100% yet) https://github.com/infinitered/rmq-slide-over-control. RMQ v0.8.0 adds some important features for plugins. The next version will add many more and we’ll make some more plugins to highlight all the things one can build for RMQ.
- Added the ability for a custom view to define its own styler. This is especially useful for upcoming RMQ plugins.
rmq_styler is the method.
rmq_style_applied method for your custom views, it gets called anytime RMQ styles your view
- Fixed a bug where a view would have rmq_build called multiple times if it was added as a subview, removed, then added again. Ack.
- Changed UITextViewStyler to inherit from UIScrollViewStyler, which it should have done already. This may break your code if you have a UITextViewStyler in your app, just change the super class to UIScrollViewStyler
- Fixed a problem where you could not set .data to nil. This rmq(my_view).data(nil) was equivalent to rmq(my_view).data and it shouldn’t have been. Now the first one sets the view’s data to nil and the second one returns the view’s data
- Fixed data assigning to UITextView and UITextField in SDK 8.x
- Clarified where superview size comes from (it’s bounds)
- Check for nil on super_width and super_height
- Fixed bug when styling with :full and the view didn’t have a superview
- Fixed minor bug in Rect