Skip to content

Instantly share code, notes, and snippets.

@ConorBrady
Created April 26, 2017 10:43
Show Gist options
  • Save ConorBrady/91bb42c21ef24812b80dbbaafbb42499 to your computer and use it in GitHub Desktop.
Save ConorBrady/91bb42c21ef24812b80dbbaafbb42499 to your computer and use it in GitHub Desktop.
// Before
let v1 = UIViewController()
v1.title = "View 1"
let v2 = UIViewController()
v2.title = "View 2"
let tabBar = UITabBarController(viewControllers: [v1, v2])
//After
let tabBar = UITabBarController(viewControllers: [
UIViewController() <== {$0.title = "View 1"},
UIViewController() <== {$0.title = "View 2"}
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment