The instantiateViewControllerWithIdentifier:
method requires that the view controller I pass have an identifier. I went to my storyboard and clicked on my view controller, but I see no option to set the identifier. Where exactly do I find this option?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
In the identity inspector there is a field Storyboard ID. You could enter the class name here and then use this identifier in
instantiateViewControllerWithIdentifier:
.As the Image suggests! Hope it helps!
Then to use it you call:
Updated for XCode 8 and Swift 3.
instantiateViewControllerWithIdentifier
is now instantiateViewController(withIdentifier:).Setting the storyboard ID:![enter image description here](https://i.stack.imgur.com/4ObWU.png)