Last active
May 11, 2019 05:28
-
-
Save bannzai/cf75f27ca43a8d4a6f1d3e2919e21627 to your computer and use it in GitHub Desktop.
まだハードコードで消耗してるの? ResourceKitで安全コーディング! ref: https://qiita.com/bannzai/items/e9bf5904940fb1ed5082
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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