I motion

588 views

Published on

RubyMotion slides from ScottishRuby conf

Published in: Technology, Self Improvement
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
588
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

I motion

  1. 1. im ti nfernandgalianaFriday, May 17, 13
  2. 2. Born and raised inCrieff!Friday, May 17, 13
  3. 3. Friday, May 17, 13
  4. 4. kitesurferderailedgithub.com/derailedfernand.galianaFriday, May 17, 13
  5. 5. Friday, May 17, 13
  6. 6. ObjCIOS SDKXcodeMemoryFriday, May 17, 13
  7. 7. Friday, May 17, 13
  8. 8. Friday, May 17, 13
  9. 9. Friday, May 17, 13
  10. 10. blownspeaker!Friday, May 17, 13
  11. 11. railsBROIOSIOSIOSDbFbFriday, May 17, 13
  12. 12. bigdeal?Not even Ruby!Still need to learn IOSCan’t use my xxx gem ;-(Write once, run onceFriday, May 17, 13
  13. 13. Friday, May 17, 13
  14. 14. Friday, May 17, 13
  15. 15. Friday, May 17, 13
  16. 16. Friday, May 17, 13
  17. 17. cocoapodsapp.pods dopod AFNetworkingendRakefileFriday, May 17, 13
  18. 18. NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];NSString *myString = [prefs stringForKey:@"bumbleblee_tuna"];Friday, May 17, 13
  19. 19. NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];NSString *myString = [prefs stringForKey:@"bumbleblee_tuna"];Friday, May 17, 13
  20. 20. NSUserDefaults.standardUserDefaults.objectForKey("bumblebee_tuna")NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];NSString *myString = [prefs stringForKey:@"bumbleblee_tuna"];Friday, May 17, 13
  21. 21. NSUserDefaults.standardUserDefaults.objectForKey("bumblebee_tuna")NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];NSString *myString = [prefs stringForKey:@"bumbleblee_tuna"];Friday, May 17, 13
  22. 22. NSUserDefaults.standardUserDefaults.objectForKey("bumblebee_tuna")NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];NSString *myString = [prefs stringForKey:@"bumbleblee_tuna"];App.user_cache[:bumblebee_tuna]Friday, May 17, 13
  23. 23. NSUserDefaults.standardUserDefaults.objectForKey("bumblebee_tuna")NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];NSString *myString = [prefs stringForKey:@"bumbleblee_tuna"];App.user_cache[:bumblebee_tuna]bubble-wrappedFriday, May 17, 13
  24. 24. NSUserDefaults.standardUserDefaults.objectForKey("bumblebee_tuna")NSUserDefaults *prefs =[NSUserDefaults standardUserDefaults];NSString *myString =[prefs stringForKey:@"bumbleblee_tuna"];App.user_cache[:bumblebee_tuna]bubble-wrappedFriday, May 17, 13
  25. 25. Friday, May 17, 13
  26. 26. UIColor.colorWithRed( 50/255.0,green:50/255.0,blue:50/255.0,alpha:0.5 )0x5b5b5b.uicolorFriday, May 17, 13
  27. 27. UIColor.colorWithRed( 50/255.0,green:50/255.0,blue:50/255.0,alpha:0.5 )0x5b5b5b.uicolorsugarcubedFriday, May 17, 13
  28. 28. ✓Rails integration✓Collections✓Third party services✓Autolayout✓Web views✓Social connect✓Pods✓RM Gems✓CustomViews✓Custom Alerts✓Notifications✓Styling✓GesturesFriday, May 17, 13
  29. 29. localwebdef viewDidLoadsuper@content = UIWebView.alloc.initWithFrame( [[0,0],[300,300]] )@content.loadHTMLString( html, baseURL:base_url )view.addSubview( @content )enddef base_url@base_url ||= NSURL.fileURLWithPath( App.resources_path )enddef 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>HTMLendFriday, May 17, 13
  30. 30. networkingapp.pods dopod AFNetworkingenddef self.shared$instance ||= beginBlownSpeakerClient.alloc.initWithBaseURL( base_url ).tap do |client|client.registerHTTPOperationClass( AFJSONRequestOperation )client.setDefaultHeader( Accept, value:application/json )endendenddef 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 })enddef self.base_url@url ||= beginuri = Device.simulator? ? "http://localhost:3000" : "http://192.168.122:3000"NSURL.URLWithString( uri )endenddef setup( talk )...@mug_shot.setImageWithURL( NSURL.URLWithString( talk.speaker.avatar ),placeHolderImage: place_holder_img )endRakefileFriday, May 17, 13
  31. 31. Friday, May 17, 13
  32. 32. |[visual]-20-[constraints]|@content.translatesAutoresizingMaskIntoConstraints = falsedef setup_constraintsmetrics = { sp => 5 }contentView.addConstraintsNSLayoutConstraint.constraintsWithVisualFormat"V:|-ps-[mug_shot(100)][scorer(20)][speaker(30)]-ps-",options: 0,metrics: metrics,views: @views ))...endFriday, May 17, 13
  33. 33. soopastyling!I don’t usually pimp out my UI’s,but when I do...I use stylesheets!Friday, May 17, 13
  34. 34. NUIPixateTeacupPromotionFriday, May 17, 13
  35. 35. Friday, May 17, 13
  36. 36. testingFriday, May 17, 13
  37. 37. appstoreFriday, May 17, 13
  38. 38. appstore✓ Distribution profile✓App screenshots x-devices✓Icons (@2x) - rinse and repeat for devices!✓ITune connect✓rake archive:distribution✓Application loaderFriday, May 17, 13
  39. 39. arewethereyet?Friday, May 17, 13
  40. 40. appstorerealityFriday, May 17, 13
  41. 41. Friday, May 17, 13
  42. 42. pimpitdogg!Friday, May 17, 13
  43. 43. motionblowFriday, May 17, 13
  44. 44. Friday, May 17, 13
  45. 45. questions?Friday, May 17, 13

×