Deep Dive Xamarin.iOS

1,247 views
1,015 views

Published on

My presentation from St. Louis Days of .NET that covers the 20% of concepts that helps you get through the 80% of your iOS app development with Xamarin.IOS.

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

  • Be the first to like this

No Downloads
Views
Total views
1,247
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
21
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Deep Dive Xamarin.iOS

  1. 1. Xamarin.IOS Xamarin.IOS Ben Bishop ben@rendr.io
  2. 2. for code/slides... @benjamminstl @rendrstl
  3. 3. Who Am i? • My name is Ben Bishop (Twitter: @benjamminstl) • I grew up in a small rural town of Indiana • Went to Purdue University • Now lives in Saint Louis • Been independent for 4+ years • Worked at an agency for 5 years, 1 year at TMG
  4. 4. my new company http://rendr.io
  5. 5. David ortinau http://xamarin.com/evolve/2013
  6. 6. FLash Away3D, AIR, AS3, RobotLegs, FlexUnit
  7. 7. Native IOS Xamarin.IOS, Facebook, Twitter, SQLite, C#, NUnit
  8. 8. $1200+ 60 hours
  9. 9. Native Android Xamarin.Android, C#, Twitter, Facebook, SQLite
  10. 10. Hybrid PhoneGap, HTML, CSS3, jQuery, Backbone, RequireJS
  11. 11. Mobile optimized Web jQuery, Backbone, CSS3, Ruby on Rails, Moustache, JSON
  12. 12. WHAT IS A XAMARIN? “The best damn mobile team, building the best damn mobile platform.”
  13. 13. What is Mono? • Mono 1.0 was released on June 30, 2004 • “The Mono runtime contains a code execution engine that translates ECMA CIL byte codes into native code and supports a number of processors: ARM, MIPS SPARC, PowerPC, S390 , x86, x86-64 and IA-64 for 64-bit modes.” • Also has support for LLVM • Runs on Linux, OSX, Windows, PS3, XBox 360, Wii
  14. 14. How does Mono Work? “Xamarin compiles your app to a native binary, not cross-compiled, and not interpreted.”
  15. 15. Code Structure By only having to write core code once, more time can be spent tuning the UI per platform.
  16. 16. cross platform strategies
  17. 17. must have components Components that keep you from having to write platform specific code.
  18. 18. xamarin.mobile A component that helps abstract your code for location, photos, and contacts across all platforms.
  19. 19. Xamarin.Social A component that helps abstract your code for App.Net, Twitter, Facebook, and Flickr
  20. 20. xamarin.auth Makes OAuth suck less.
  21. 21. Data RestSharp, SQLite.NET, and JSON.net help you store and retrieve data for your app.
  22. 22. Frameworks https://github.com/MvvmCross/MvvmCross https://github.com/benbishop/MonkeyArms
  23. 23. interfaces are your friend
  24. 24. iOS Implementation Have your platform specific views implement the interface.
  25. 25. android implementation
  26. 26. ios implementation
  27. 27. android implementation
  28. 28. Mediator/View Model Your Mediator or ViewModel will have a reference to the View
  29. 29. UI Logic
  30. 30. Mock your views Moq lets you mock your views for Unit Tests.
  31. 31. Unit Test UI Logic Moq can raise events and verify Method invocation.
  32. 32. Test runner
  33. 33. Strings ResourceManager https://gist.github.com/benbishop/6232751
  34. 34. detect locale
  35. 35. anatomy of an iOS app
  36. 36. info.plist
  37. 37. info.plist
  38. 38. important Need to specify 640x1136 Launch Image so iOS knows your app supports tall UI
  39. 39. entitlements.plist New for iOS7
  40. 40. New to iOS7
  41. 41. Main.CS Entry point for your app
  42. 42. AppDelegate.cs Creates the UI Window and attaches a ViewController.
  43. 43. ViewController This is responsible for your screen.
  44. 44. ViewController Lifecycle
  45. 45. Setup/tear down Great place to do any setup/tear down.
  46. 46. View
  47. 47. Creating a view
  48. 48. UIBUTTON
  49. 49. frame vs bounds Frame A view's frame (CGRect) coordinate is the position of its rectangle in thestarts at the top left. superview's system. By default it Bounds A view'sits own coordinate expresses a bounds (CGRect) system. view rectangle in
  50. 50. extend views
  51. 51. class extensions All UIView classes now have a CenterHorizontally method
  52. 52. Images for multi DPI
  53. 53. Text Input
  54. 54. view event handling
  55. 55. View Controller Types UIViewController TabViewController UITableViewController UINavigationController
  56. 56. UITabViewController
  57. 57. Setting title/Icon
  58. 58. Header buttons
  59. 59. detecting ios7
  60. 60. UITableViews
  61. 61. UITableViews
  62. 62. UITableviewsource
  63. 63. UITableviewsource
  64. 64. UITableviewCell
  65. 65. uitableviewcell styles
  66. 66. UIPickerView
  67. 67. UIPickerView
  68. 68. uipickerview source
  69. 69. UIPICKERVIEWMODEL
  70. 70. UIPickerviewModel
  71. 71. UIPickerviewModel
  72. 72. UIPickerviewmodel
  73. 73. Dialog http://docs.xamarin.com/guides/ios/user_interface/monotouch .dialog/
  74. 74. Rapid UI dev
  75. 75. JSON support
  76. 76. Attributes Let’s decorate!!
  77. 77. parting thoughts
  78. 78. experiences • iOS sandbox is limited.You are at Apple’s mercy • Provisioning is a pain • iOS SDK is very prescriptive in regards to look and feel • Most things are genuinely easier in iOS than Android. Music player, sharing to FB/Twitter, selecting photos... • Few device configurations to work with.
  79. 79. Gracias

×