Reputation: 9419
I downloaded a project from GitHub and I'm experiencing some problems when detecting where a referencing outlet comes from.
This is an UIImage
called "backgroundImage".
This is a UIViewController
called "WalkthroughPageContentViewController".
"backgroundImages" has two outlets references, one of which is connected to the "WalkthroughPageContentViewController" UIViewController
.
But there isn't any @IBOutlet
connection here.
So where does the first referencing outlet come from?
Upvotes: 2
Views: 4089
Reputation: 38238
I had a quick look at this project, and the answer is that the referencing outlet doesn't come from anywhere. It's broken. If you examine the destination, the you'll see that Xcode knows this is a problem:
And if you open up the WalkthroughPageContentViewController.swift file, and add an outlet called backgroundImage
, then close and reopen the file, you'll find it's magically been linked back up to the Storyboard:
So, I'd surmise that at some point, there was an outlet in the file called backgroundImage
, which was hooked up to the Storyboard, but then it was later deleted, leaving the project in this state.
This is pretty common when editing projects in Xcode. The Storyboard connections are basically just stored in XML in the .xib file, and there's no magic two-way connection between them and the code at design time, so if you delete the lines of code that they point to, you'll end up in this state.
Upvotes: 4