After upgrading to Xcode 6, I opened an old project (that contains a subproject, so it has many targets) and I noticed that no link from my Storyboard ViewContoller to the relative Objects works.
For example I have a ViewController with a TableView inside and now I cant do can't do anyhing with it because the connection is missing, I can't even redefine a new IBOutlet in the VC because the arrow in the storyboard from the VC won't connect to anything.
To be more clear:
The class is defined in the Custom Class section, so I can't find the problem
What should I do? Btw I'm using obj-c not swift, I found some related answer but all about swift.
IBOutlet & IBAction. Swift use @IBOutlet to specify a class property as an outlet variable, then you can use this class property to modify storyboard UI component’s attribute. Below example define a UILabel type variable, @IBOutlet means this variable is an outlet variable which can modify related label in the storyboard ui.
3.1 Add IBOutlet Property Steps. Click to select the UI component such as a button or label. Then press Control key and click the mouse button to drag the source UI component ( label or button ) from left storyboard to right assistant editor window at the same time.
First you should add connections between storyboard UI components and ViewController class source code. The connection has a lot of types such as outlet (a class property variable that is used to refer to UI component), action (a class method that is used to response action event which UI component triggered.)
@IBAction is used to decorate a ViewController class’s method as an action method. It can has two method parameters, one refer to the event source UI component ( which UI component trigger this event ), the other refer to the event object ( what event happened ). 3. How To Create IBOutlet Property & IBAction Method In ViewController Source Code.
You can also see that the link between the parent view and the custom class is broken (not visible anymore) which is a huge problem.
I had the exact same issue with the app i'm working on actually, updating XCode from 5.xxx to 6.1. The workaround that worked for me was to remove the reference of every view controller and re-add them to the project...
To everyone facing that issue, here's the (annoying) trick :
I can understand those things could be reaaally annoying, but it worked for me... Hope it will help someone else !
In your storyboard hierarchy select the View Controller,
In the right pane Custom Class section Class
, select the drop down and your desired view controller.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With