Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I "go to" a referencing outlet's code from the XCode storyboard?

Does anyone know how to quickly go to the code for a referencing outlet from the XCode storyboard's events/outlets sidebar?

like image 682
Emile Victor Avatar asked Nov 28 '13 03:11

Emile Victor


People also ask

How do I find my storyboard code?

Select the storyboard file in the Navigator on the left and click Assistant Editor icon on the toolbar we just reviewed. You should get the storyboard on the left and the code on the right.

How do I see connections in Xcode?

To do this, select the object that will be connecting to the action and open the Connections Inspector by clicking the arrow icon at the top of the Xcode Utility area. You can also show the inspector by choosing View, Utilities, Show Connections Inspector (or by pressing Option+Command+6).

How do I drag from storyboard to Viewcontroller?

Try selecting your view in the storyboard and clicking on the identity inspector on the right side in class. Enter your view controller name and then drag and drop the item from the storyboard to the view controller. Hope it helps. Save this answer.

How do I open Codeboard and storyboard in Xcode?

Select the storyboard in the navigator, right click and select 'Open As'. You should see 2 options 'Interface Builder - Storyboard' or 'Source Code' - select the Source Code option should fix your issue.


1 Answers

The outlet doesn't have any code. It's the IBAction link that points to code.

I haven't found a way to display the IBAction method automatically, but if you select the object (usually a button) and view the Connections Inspector, it will tell you the target and method name that is being invoked. You can then find that method in your project's source code.

like image 144
Duncan C Avatar answered Oct 20 '22 00:10

Duncan C