I was tired of “real work” Friday night, so like any popular guy with too many fiends, I spent my Friday night making a new logo for the Dispatch. I really enjoyed making it, I hope you like it.
If you missed the last issue, you can find it here: issue #35.
Happy coding, Todd Werth (@twerth)
Motion Meetup today at 3PM PST
Meets every 2nd Tuesday.
Articles, News, New Gems, and Blog Posts
July 16th, 2014 | new site | by Clay Allsopp
“Motion Toolbox – A collection of RubyMotion libraries and wrappers”
July 15th, 2014 | new gem | by Erwin Boskma
“motion_ocean – A RubyMotion library for version 2 of the DigitalOcean API.”
July 15th, 2014 | gem release | by Clay Allsopp
“motion-screenspecs – Test your RubyMotion app using screenshot comparison”
July 15th, 2014 | video | by Multiple
“RubyMotion Sydney July meetup videos”
July 14th, 2014 | screencast | by Jack Watson-Hamblin
“MotionInMotion – Episode 33 – Roll Your Own API Client Using NSURLSession”
July 9th, 2014 | gem release | by Colin T.A. Gray
“1.1.9 – motion-wiretap – A wrapper for KVO, gestures, UIControl events, and procs. Inspired by ReactiveCocoa.”
July 9th, 2014 | gem release | by Clay Allsopp
“0.1.0 – motion-screenshots – Automatic screenshots for your RubyMotion apps”
Hidden Gem by Gant Laborde of Iconoclast Labs
For those of us coming from Rails, we do enjoy
Object#try. It allows us a friendly way to attempt methods without having to check if the object responds to designated method first.
Of course you can gain this functionality by bringing in the
motion-support gem (ActiveSupport methods that make sense in RubyMotion). But in some cases I even prefer the simply inline rescue. Especially, if we don’t want to completely sweep the failed method under the rug.
Object.method_will_miss('it will') rescue nil
This will still raise an undefined method in RubyMotion, but rather than bombing out with the exception, it will return our rescued
nil. This methodology gives you the app security and at the same time it helps you find bad data issues.
NOTE: Behavior of undefined methods differ on versions/flavors of Ruby.
From the Archives
Because it’s easier to copy and paste than to write
RubyMotion Views != Rails Views
I think this causes a lot of confusion. Some may disagree with me, but think of RubyMotion controllers as Rails’ controllers + Rails’ views, and think of RubyMotion’s views as Rails’ partials.
In some other development environments, a UIView would be called a control, and a UIViewController would be a screen.
This is overly simplified, but I think it gives you a better mental model of what they are actually are.
My company InfiniteRed sponsors this newsletter by allowing me the time to work on it every week and hosting everything.
Contact us if you ever need help working on a project, mentoring, or other development services . We specialize in RubyMotion and have an awesome team.
If you have any tips, blog posts, or want to sponsor this newsletter, please send emails to email@example.com