fixed-motion

Workarounds for RubyMotion.

Installation

Add this line to your application's Gemfile:

gem 'fixed-motion'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fixed-motion

Usage

Presently, there is only one function, FixedMotion::ObjcBlock(proc). This workaround is to convert a RubyMotion Proc instance into a native Objective-C block. Currently with RubyMotion, if a block argument is declared as type id, RubyMotion does not convert the Proc into an Objective-C block. By using FixedMotion::ObjcBlock(), Procs can be converted into an Objective-C block to be supplied to a native method. The limitation is that the Proc must have a fixed number of arguments, not exceeding 15.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request