On my first view controller I had no problem creating IBOutlets and Actions, but when I made another view controller, I couldn't make an IBOutlet. There was no blue line when I control dragged it and I couldn't make an IBOutlet and then connect it up either. The first view controller still works. Is it possible to make IBOutlets on two different view controller?
相关问题
- 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
- SwiftUI: UIImage (QRCode) does not load after call
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Using if let syntax in switch statement
- 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
Your view controller must have a custom class file assigned to it in the identity inspector in InterfaceBuilder:
Then select the assistant editor and you should be able to ctrl-drag IBOutlets to the associated swift file.
Make sure you have set the custom class for second view controller in your storyboard.
it happens to me sometimes as well... and the reason it to use the new controller you need to create a new view controller file for it where you can use the iboutlets generally.. so you will be having one view controller file for each view controller. and you can follow the steps to do that.
good luck..