Top Banner
im ti n fernandgaliana Friday, May 17, 13
45

I motion

May 13, 2015

Download

Technology

Fernand Galiana

RubyMotion slides from ScottishRuby conf
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: I motion

im ti nfernandgaliana

Friday, May 17, 13

Page 2: I motion

Born and raised in Crieff!

Friday, May 17, 13

Page 3: I motion

Friday, May 17, 13

Page 4: I motion

kitesurfer

derailed

github.com/derailed

fernand.galiana

Friday, May 17, 13

Page 5: I motion

Friday, May 17, 13

Page 6: I motion

ObjCIOS SDKXcode

Memory

Friday, May 17, 13

Page 7: I motion

Friday, May 17, 13

Page 8: I motion

Friday, May 17, 13

Page 9: I motion

Friday, May 17, 13

Page 10: I motion

blownspeaker!Friday, May 17, 13

Page 11: I motion

railsBROIOSIOSIOS

Db

Fb

Friday, May 17, 13

Page 12: I motion

bigdeal?

Not even Ruby!

Still need to learn IOS

Can’t use my xxx gem ;-(

Write once, run once

Friday, May 17, 13

Page 13: I motion

Friday, May 17, 13

Page 14: I motion

Friday, May 17, 13

Page 15: I motion

Friday, May 17, 13

Page 16: I motion

Friday, May 17, 13

Page 17: I motion

cocoapods

app.pods do pod 'AFNetworking' end

Rakefile

Friday, May 17, 13

Page 18: I motion

NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];

NSString *myString = [prefs stringForKey:@"bumbleblee_tuna"];

Friday, May 17, 13

Page 19: I motion

NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];

NSString *myString = [prefs stringForKey:@"bumbleblee_tuna"];

Friday, May 17, 13

Page 20: I motion

NSUserDefaults.standardUserDefaults. objectForKey("bumblebee_tuna")

NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];

NSString *myString = [prefs stringForKey:@"bumbleblee_tuna"];

Friday, May 17, 13

Page 21: I motion

NSUserDefaults.standardUserDefaults. objectForKey("bumblebee_tuna")

NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];

NSString *myString = [prefs stringForKey:@"bumbleblee_tuna"];

Friday, May 17, 13

Page 22: I motion

NSUserDefaults.standardUserDefaults. objectForKey("bumblebee_tuna")

NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];

NSString *myString = [prefs stringForKey:@"bumbleblee_tuna"];

App.user_cache[:bumblebee_tuna]

Friday, May 17, 13

Page 23: I motion

NSUserDefaults.standardUserDefaults. objectForKey("bumblebee_tuna")

NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];

NSString *myString = [prefs stringForKey:@"bumbleblee_tuna"];

App.user_cache[:bumblebee_tuna]

bubble

-wrapped

Friday, May 17, 13

Page 24: I motion

NSUserDefaults.standardUserDefaults. objectForKey("bumblebee_tuna")

NSUserDefaults *prefs =

[NSUserDefaults standardUserDefaults];

NSString *myString =

[prefs stringForKey:@"bumbleblee_tuna"];

App.user_cache[:bumblebee_tuna]

bubble

-wrapped

Friday, May 17, 13

Page 25: I motion

Friday, May 17, 13

Page 26: I motion

UIColor.colorWithRed( 50/255.0, green:50/255.0, blue:50/255.0, alpha:0.5 )

0x5b5b5b.uicolor

Friday, May 17, 13

Page 27: I motion

UIColor.colorWithRed( 50/255.0, green:50/255.0, blue:50/255.0, alpha:0.5 )

0x5b5b5b.uicolor

sugarc

ubed

Friday, May 17, 13

Page 28: I motion

✓Rails integration

✓Collections

✓Third party services

✓Autolayout

✓Web views

✓Social connect

✓Pods

✓RM Gems

✓Custom Views

✓Custom Alerts

✓Notifications

✓Styling

✓Gestures

Friday, May 17, 13

Page 29: I motion

localwebdef 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>HTMLend

Friday, May 17, 13

Page 30: I motion

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

Page 31: I motion

Friday, May 17, 13

Page 32: I motion

|[visual]-20-[constraints]|

@content.translatesAutoresizingMaskIntoConstraints = false

def setup_constraints metrics = { 'sp' => 5 } contentView.addConstraints NSLayoutConstraint.constraintsWithVisualFormat "V:|-ps-[mug_shot(100)][scorer(20)][speaker(30)]-ps-", options: 0, metrics: metrics, views: @views )) ...end

Friday, May 17, 13

Page 33: I motion

soopastyling!

I don’t usually pimp out my UI’s, but when I do...

I use stylesheets!

Friday, May 17, 13

Page 34: I motion

NUI

Pixate

Teacup

Promotion

Friday, May 17, 13

Page 35: I motion

Friday, May 17, 13

Page 36: I motion

testing

Friday, May 17, 13

Page 37: I motion

appstore

Friday, May 17, 13

Page 38: I motion

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

Page 39: I motion

arewethereyet?

Friday, May 17, 13

Page 40: I motion

appstorereality

Friday, May 17, 13

Page 41: I motion

Friday, May 17, 13

Page 42: I motion

pimpitdogg!

Friday, May 17, 13

Page 43: I motion

motionblow

Friday, May 17, 13

Page 44: I motion

Friday, May 17, 13

Page 45: I motion

questions?

Friday, May 17, 13