Skip to content

Obnoxiously easy iOS development with RubyMotion

Notifications You must be signed in to change notification settings

colinyoung/spry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Obnoxiously easy iOS development with RubyMotion

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published