Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't link to outlet collection in XCode9

I have some constraints that a shuffle around during an animation. After upgrading to XCode9 I tried to make some tweaks, and the editor seems to no longer allow me to add constraints to an constraint collection IBOutlet. I even created a new project and tried to make a simple outlet collection and ran into the same issue. Here's a short video of what I'm talking about:

frustrating xcode footage

I've tried the usual things of deleting derived data, restarting xcode, creating new xibs, praying to the xcode gods...etc. As you can see in the gif, it even happens to me in a brand new project. Anybody else seeing this? Any work-around I'm missing?

I think this is a legit bug, I submitted it to apple.

I'm surprised I don't see anybody else running into this.

like image 950
Kevin DiTraglia Avatar asked Jan 29 '23 13:01

Kevin DiTraglia


1 Answers

I had the same issue. This is the only workaround I could find to get it working is to create the Outlet Collection in code (or create the first one by dragging from the storyboard as you're doing). Then drag from the 'add' icon in the ViewController's line margin back to the objects on the storyboard rather than the usual way around.

Drag from the ViewController to the Storyboard

This also seems to be an alternative way: https://stackoverflow.com/a/45597939/1320134

In summary, you need create the first outlet collection as you are currently doing, then drag from the newly created 'referencing outlet collection' in the Connections Inspector to the other objects you want to add to the collection in the storyboard.

like image 95
svarrall Avatar answered Feb 04 '23 04:02

svarrall