Skip to content

Instantly share code, notes, and snippets.

@bannzai
Last active May 11, 2019 05:28
Show Gist options
  • Save bannzai/cf75f27ca43a8d4a6f1d3e2919e21627 to your computer and use it in GitHub Desktop.
Save bannzai/cf75f27ca43a8d4a6f1d3e2919e21627 to your computer and use it in GitHub Desktop.
まだハードコードで消耗してるの? ResourceKitで安全コーディング! ref: https://qiita.com/bannzai/items/e9bf5904940fb1ed5082
// Get ViewController
let storyboard = UIStoryboard(name: "Storyboard", bundle: nil)
let viewController = storyboard.instantiateViewControllerWithIdentifier("XXXX") as! ViewController
// PerformSegue
performSegueWithIdentifier("Open", sender: sender)
// Nib
let nib = UINib(nibName: "TableViewCell", bundle: nil)
let cell = nib.instantiateWithOwner(nil, options: nil)[0] as! TableViewCell
// Get ViewController
let viewController = ViewController.instanceFromStoryboard()
// PerformSegue
performSegueOpen()
// Nib
let cell = TableViewCell.Xib().view()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment