Contenu connexe
Similaire à I motion (20)
Plus de Fernand Galiana (10)
I motion
- 18. NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
NSString *myString = [prefs stringForKey:@"bumbleblee_tuna"];
Friday, May 17, 13
- 19. NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
NSString *myString = [prefs stringForKey:@"bumbleblee_tuna"];
Friday, May 17, 13
- 29. localweb
def viewDidLoad
super
@content = UIWebView.alloc.initWithFrame( [[0,0],[300,300]] )
@content.loadHTMLString( html, baseURL:base_url )
view.addSubview( @content )
end
def base_url
@base_url ||= NSURL.fileURLWithPath( App.resources_path )
end
def html
<<HTML
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/font-awesome.css"/>
<link rel="stylesheet" type="text/css" href="css/app.css"/>
</head>
...
</html>
HTML
end
Friday, May 17, 13
- 30. networking
app.pods do
pod 'AFNetworking'
end
def self.shared
$instance ||= begin
BlownSpeakerClient.alloc.initWithBaseURL( base_url ).tap do |client|
client.registerHTTPOperationClass( AFJSONRequestOperation )
client.setDefaultHeader( 'Accept', value:'application/json' )
end
end
end
def fetch_proposals(&cb)
getPath( "/confs/#{App.delegate.conf_id}.json",
parameters: {},
success: ->(operation, response) { cb.call response, nil },
failure: ->(operation, error) { cb.call nil, error }
)
end
def self.base_url
@url ||= begin
uri = Device.simulator? ? "http://localhost:3000" : "http://192.168.122:3000"
NSURL.URLWithString( uri )
end
end
def setup( talk )
...
@mug_shot.setImageWithURL( NSURL.URLWithString( talk.speaker.avatar ),
placeHolderImage: place_holder_img )
end
Rakefile
Friday, May 17, 13
- 38. appstore
✓ Distribution profile
✓App screenshots x-devices
✓Icons (@2x) - rinse and repeat for devices!
✓ITune connect
✓rake archive:distribution
✓Application loader
Friday, May 17, 13