I can't add an outlet to my code from storyboard.
But first: which version of XCode ?
Do you see the option "Top level objects" menu when you click in the icon with 4 squares at top left of the bar ?Every time I try to open assistant editor from storyboard, it takes me to a file called 'UIViewController.h.' I checked the top bar, and it is set to automatic. There is no manual option when I click on it either.
This is active if the viewController is selected in IB
Select the ViewController.swift after holding option key: that will open it in another pane.
On top of this, when I try to manually splitscreen ViewController.swift and ctrl-drag from my object to the editor, it doesn't let me add an outlet, and is stuck on 'action.'
Where do you ctrl-drag in the swift file ?
Have you checked that the ViewController in IB is of the right class ?
Class is not ViewController.swift (that's the file) ; class is what you defined inWhen I try to change the class for my view controller in identity inspector, it doesn't let me type in my class, which is 'ViewController.swift.'
Code Block class ViewController: UIViewController {
That was good to try, but no effect if class definitions in IB are not correct.I even tried deleting the DerivedData folder, which was recommended by another forum, which didn't help.
When I look at top level objects in the 4 squares on the top left, it shows me 2 files: UIViewController.h, and UISwipeGestureRecognizer.h
I ctrl-drag to the ViewController.swift file, which is opened in splitscreen. I don't know how to check whether it is in the right class, what does that mean?
I'm a beginner, so I don't really get what I am doing here. Thanks for trying to help though.
Can you show the name of the class ?I ctrl-drag to the ViewController.swift file, which is opened in splitscreen. I don't know how to check whether it is in the right class, what does that mean?
It is in a statement like
Code Block class ViewController: UIViewController { }
inside ViewController.swiftThen look at the Identity inspector for the ViewController in Interface Builder.
Select the ViewController window by clicking on its top part where you have a few colored icons
Open the inspectors and look for Identity Inspector (should be the 4th icon)
At top of Identity inspector, you have Custom Class area.
Type ViewController (or the exact name of class inside) and hit return
From what type of object in IB you try to ctrl-drag to the swift file ?