Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Obnoxiously easy iOS development with RubyMotion

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
README.md

Spry

Experiments in wrapping the iOS SDK in a more Ruby-esque manner.

Samples

Easily create a UITableViewController that leverages NSFetchedResultsController to fetch data:

class ArtistsController < Spry::EntityTableViewController
  entity    "Artist"
  sortBy    :name

  def layoutCell(cell, artist)
    cell.textLabel.text = artist.name
  end

  def selected(artist)
    puts "You selected #{artist.name}"
  end
end

NOTE: You must setup the context property on the controller with a properly initialized NSManagedObjectContext beforehand.

Declarative entity specification:

class Artist < Spry::Entity
  field :name,      :type => String
  field :imageUrl,  :type => String
  field :updatedAt, :type => Time
end

NOTE: Migrations are not handled, so wipe the DB if you change it.

Something went wrong with that request. Please try again.