2015-07-15 08:43:02 +08:00
2015-07-14 16:30:08 +08:00
2015-07-14 16:29:48 +08:00
2015-07-14 16:30:08 +08:00
2015-07-14 16:29:48 +08:00
2015-07-15 08:43:02 +08:00
2015-07-14 16:29:48 +08:00
2015-07-14 16:29:48 +08:00
2015-07-14 16:29:48 +08:00
2015-07-14 16:29:48 +08:00
2015-07-14 16:29:48 +08:00
2015-07-14 16:29:48 +08:00
2015-07-15 08:43:02 +08:00

RubyMotionContributors

Quick demo of RubyMotion

1. bundle
2. rake pod:install
3. rake

screenshot

class HomeScreen < PM::TableScreen

  REQUEST_URL = 'https://api.github.com/repos/HipByte/RubyMotion/contributors'

  title "RubyMotion Contributors"
  refreshable
  searchable

  stylesheet HomeScreenStylesheet

  def on_load
    @contributors = []
    load_contributors
  end

  def table_data
    [{
        cells: @contributors.map do |c|
          {
            title: c[:login],
            subtitle: c[:url],
            action: :mp,
            arguments: {
              url: c[:url]
            }
          }
        end
      }]
  end

  def load_contributors
    AFMotion::JSON.get(REQUEST_URL) do |r|
      @contributors = r.object
      stop_refreshing
      update_table_data
    end
  end
  alias_method :on_refresh, :load_contributors
end

This is all the code to it.

Description
No description provided
Readme 2.1 MiB
Languages
Ruby 100%