Version 1.6.0 released

New

  • New custom events, woot!.
rmq(my_view).on(:custom_event) do |sender_q, event|
  puts "woot!"
end

rmq(my_view).trigger(:custom_event)
# or select whatever you like
rmq.all.trigger(:custom_event)
  • Added to stylehseet, shorthand for all the device types, like four_point_seven_inch
  • Turn off animations when Voiceover is on, to improve accessibility

Bug fixes

  • Fixed bug with root?
  • Fixed bug with .all after selecting a view. It would select all views, not all views inside that view.
  • Fixed :long_press event from firing twice

Install

gem update ruby_motion_query

In your projects:

bundle update ruby_motion_query

Version 1.5.0 released

New features

  • Added :full, :half, :quarter to w, h, l, t, r, b, width, height, left, top, right, bottom
  • Added find!: rmq(my_view)find(:some_child).get == rmq(my_view)find!(:some_child)
  • UITextViewStyler supports UITextInputTraits
  • A few disabled goodies for the UIButton styler.

Bug fixes

  • Changed pulling template from git to use HTTP rather than SSH, so you don’t have to have your SSH key to do a rmq create foo

Install

gem update ruby_motion_query

# In your projects:
bundle update ruby_motion_query

Version 1.4.0

New features

  • Add app.info_plist hash accessor
  • Added formatter_from_string, which uses a full format string rather than a format template

Bug fixes

  • rmq_live_stylesheets:
    • Make sure that all files in all subfolders of the stylesheets are included
    • Added UITableViewController & PM::TableScreen-friendly reloading
  • Fix double reloading on ProMotion tables
  • Fixed debug.assert
bundle update ruby_motion_query

Version 1.3.5 released

New features

  • Added remove_style
  • Add init_with_segments to UISegmentedControlStyler

Bugs

  • BIG BUG FIX: Fixed memory leak when using on for event or gesture, and not removing it (using off). It would retain the UIViewController. This has been fixed (and don’t bother removing your events, unless you want to for a specific reason)
  • Fixed some bugs with rmq_live_stylesheets and made it more robust. We want to do a lot more with this in the future

Version 1.3.1 released

New

Live stylesheet reloading!

See this blogpost for more info.

To use this in your existing projects, add this to the development section of your rake file:

app.development do
  app.info_plist["ProjectRootPath"] = File.dirname(__FILE__)
end

Then in the REPL when you want to turn it on, use: rmq_live_stylesheets

Other

  • Various aliases and strict tests added. PR 225
  • User Interaction enabled/disabled styler for all UIViews in PR 222
  • Symbolize any string new utility as in PR 229
  • New Stylers: Separator_inset, DatePicker
  • Normalized stylers in PR 223
  • UIProgressView now supports data in PR 224
  • Convenience callback on adding methods, like append in PR 227
  • rmq.app.hide_keyboard does just that in PR 234
  • Support for automatically using new iPhone dimensions in PR 235
  • RMQ Events support debounce timing in PR 236

Bugs Fixed

  • 220 – Set background image to nil when setting background color as suggested by apple.
  • 237 – Fix for RMQ selector not detecting corner case.

Version 1.1.0 released

Some deprecations were removed, others now give warnings and will be removed in a later release

Deprecations removed:

  • rmq_did_create – use rmq_build
  • st.padded = ... – use frame hash
  • app_width in stylesheet- use device_width or screen_width
  • app_height in stylesheet – use device_height or screen_height
  • screen_size in stylesheet
  • weak_ref_is_same_object – This hasn’t been needed since RM 2.17

New

  • Added UISwitch to work with .data and .data()
  • Allows validation of upper case email addresses
  • Allow setting keyboard_type, return_key_type, spell check, and border style with symbols
  • Allow setting a view transform manually in UIView styler.
  • More tests added; now 607 specifications (1733 requirements)
  • Added deprecation warnings
  • Added styler for separator_inset
  • Added rmq.device.log – For quickly seeing what common values are for the device you’re on
  • Added row_height styler
  • Added text_highlighted styler

Bugs fixed

  • #165 – Distribute margin with multiple selected objects
bundle update ruby_motion_query

Version 1.0.0 released

After a year and a half, 21 releases, 554 commits by 23 contributors, 1708 requirements in specs, RMQ is finally at 1.0.0.

Deprecations will be removed in 1.0.1. I’m giving you one last chance.

bundle update ruby_motion_query

People who worked on this version: @squidpunch, @GantMan, @twerth, @vaughankg, and @markrickert

New

  • New cool color system, look at docs for basics: http://rubymotionquery.com/documentation/#post-105. The old one works exactly the same
  • rmq.debug.colorize
  • rmq.app.short_version (to go along with rmq.app.version)
  • Updated table template to make it simpler, no need for an extra stylesheet for the view, it just makes it overly complicated
  • Supports setting relative frames when a previous element does not exist. below_prev & above_prev should set set their frames relative to y=0 and right_of_prev & left_of_prev should use x=0 as their starting point when no previous element exists
  • added .ios_at_least? to rmq.app
  • Added rmq.app.windows that returns the windows array
  • Added prefab date and time styles to RMQ::Format.date

Plugins

RMQ has a plugin system, here are 2 examples:

And a template for creating your own:

Bug fixes

  • Fixed problem where rmq inside a stylesheet couldn’t select views from the root_view. This bug sucked. If you couldn’t select a view in a stylesheet, this is why. Sorry about that
  • Changed current_view_controller to accommodate ProMotion-menu
  • Fixed grid spec failures in RM 3.0/64bit
  • Removed motion_print in gem file, requiring it was a mistake. To be clear, you should use motion_print, but RMQ doesn’t require it

Version 0.9.0 released

New features, multiple styles, other misc

bundle update ruby_motion_query

People who worked on this version: @squidpunch, @GantMan, @twerth, @kemiller, @vaughankg, and @markrickert

This is the final release before 1.0. Once it’s in the wild for a while, we’ll move it to 1.0 and remove deprecation.

New

  • Multiple styles can be applied at once with apply_style and reapply_styles runs all styles in order. Added has_style? and styles accordingly.
  • Added stylers on UITextView, UIControl, UITableViewCell
  • Validation – valid/invalid array is now unique, even if you have multiple validations.
  • Short syntax (t,b,l,r) added to resource_resizable
  • Advanced array access (multi-argument, range, negative indicies) on RMQ selected.
  • Allow animated spinner to be centered.
  • Examples/Readme updates for XCode and typos.
  • Removed defunct methods/variables (like .ios_eight?)
  • Numerous updated and stable tests added! (47 specs and 222 requirements added)

Version 0.8.0 released

New features, landscape done right, and RMQ plugins.

bundle update ruby_motion_query

People who worked on this version: @twerth, @GantMan, @squidpunch, and @mwise

New features

  • Automatically enable user interaction when an event is added
  • app_width, app_height, screen_width, and 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 rmq.device.three_point_five_inch?, rmq.device.four_point_seven_inch?, and rmq.device.five_point_five_inch?
  • 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
  • Added color= alias to ui_text_view styler
  • Default clipToBounds true if corner_radius give
  • Neato iOS version detection: rmq.device.ios_version rmq.device.is_version? 8 rmq.device.is_version? "7.1" rmq.device.is_version? "8.0"

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.

  • Added device.height_landscape and device.width_landscape
  • 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
end

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.
  • Added rmq_style_applied method for your custom views, it gets called anytime RMQ styles your view

Bug fixes

  • 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