Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4 - Connecting Outlets

This page shows how easily I can connect outlets http://developer.apple.com/technologies/tools/whats-new.html in Xcode 4, but I can't get it.

I right click and drag an outlet from the new referencing outlet circle, and into my header where the object is declared, but nothing happens.

Has anyone used this?

Thanks a lot

like image 616
Bryan Avatar asked Jul 27 '10 17:07

Bryan


People also ask

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 rename an outlet in Xcode?

In the example Swift code below, right click on btnRequestCode , from the popup menu select "Refactor > Rename...", change the outlet/action name and Xcode changes it in the Storyboard also.


1 Answers

I had the same problem with the final version of Xcode 4 and solved it by selecting the File's Owner Custom Class before using the drag & drop outlet feature like shown on the screenshot below.

Screenshot

like image 90
Martin Avatar answered Sep 22 '22 08:09

Martin