How To Build iOS Apps Without Interface Builder
But why?
IB vs. Code (I) • Context shift • More evil conflicts • Options all over the place • Harder to get help • No betas for you
IB vs. Code (II) • No inheritance • Harder to DRY • Hard to see contraints • Really bad performance
Delete Storyboard
AppDelegate.swift import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? = UIWindow(frame: UIScreen.mainScreen().bounds) func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { window?.rootViewController = ViewController() window?.makeKeyAndVisible() return true } }
UINavigationController import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? = UIWindow(frame: UIScreen.mainScreen().bounds) func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { window?.rootViewController = UINavigationController(rootViewController: ViewController()) window?.makeKeyAndVisible() return true } }
Loading The View override func loadView() { view = FirstView() }
Demo • Login-Screen • Auto Layout • UIStackView • UITableView / UITableViewCell • UINavigationController • UITabBarController

How To Build iOS Apps Without interface Builder

  • 1.
    How To BuildiOS Apps Without Interface Builder
  • 2.
  • 3.
    IB vs. Code(I) • Context shift • More evil conflicts • Options all over the place • Harder to get help • No betas for you
  • 4.
    IB vs. Code(II) • No inheritance • Harder to DRY • Hard to see contraints • Really bad performance
  • 5.
  • 6.
    AppDelegate.swift import UIKit @UIApplicationMain class AppDelegate:UIResponder, UIApplicationDelegate { var window: UIWindow? = UIWindow(frame: UIScreen.mainScreen().bounds) func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { window?.rootViewController = ViewController() window?.makeKeyAndVisible() return true } }
  • 7.
    UINavigationController import UIKit @UIApplicationMain class AppDelegate:UIResponder, UIApplicationDelegate { var window: UIWindow? = UIWindow(frame: UIScreen.mainScreen().bounds) func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { window?.rootViewController = UINavigationController(rootViewController: ViewController()) window?.makeKeyAndVisible() return true } }
  • 8.
    Loading The View overridefunc loadView() { view = FirstView() }
  • 9.
    Demo • Login-Screen • AutoLayout • UIStackView • UITableView / UITableViewCell • UINavigationController • UITabBarController