Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RubyMotion #JetBrainsDay

RubyMotion #JetBrainsDay

Avatar for Dennis Ushakov

Dennis Ushakov

September 07, 2013
Tweet

More Decks by Dennis Ushakov

Other Decks in Technology

Transcript

  1. BubbleWrap • Collection of helpers and wrappers • Device properties

    • Application state • JSON • HTTP requests • http://bubblewrap.io
  2. BubbleWrap def connect request = NSURLRequest.requestWithURL("https://url.com", cachePolicy:NSURLRequestUseProtocolCachePolicy, timeoutInterval:30.0) connection =

    NSURLConnection.connectionWithRequest(request, delegate:self) end ! def connection(connection, didReceiveData:received_data) @received_data ||= NSMutableData.new @received_data.appendData(received_data) end ! def connectionDidFinishLoading(connection) p @received_data.to_str end ! # NB: Batteries Error handling not included
  3. Teacup • InterfaceBuilder DSL replacement • Main concepts • Layouts

    • Styles • https://github.com/rubymotion/teacup
  4. Teacup class MyController < UIViewController stylesheet :main_screen layout do subview(UIButton,

    :hi_button) end end Teacup::Stylesheet.new :main_screen do style :hi_button, origin: [10, 10], title: 'Hi!' end