user559142
user559142

Reputation: 12517

Xcode issue - cannot connect button to object

I seem to be having an issue. The tutorial I am following from Apple's Dev Center says:

  1. Control-drag a connection from the Convert button to the ConverterController instance in the nib file window.

  2. A black box will pop up similar to the one we used to connect outlets. Choose convert:.

  3. Save the nib file.

I usually hold ctrl and drag the mouse from one object to another. However, when selecting a button from my User Interface and trying to drag to an Object in the xib window (this is all in the Interface Builder), the object will not highlight. It just won't let me do it!

Any ideas why this is happening?

Upvotes: 0

Views: 862

Answers (2)

johnbakers
johnbakers

Reputation: 24771

you can use the "tree" map of all the objects in your nib file so it is easier to select one. this is helpful if they are on top of each other, hidden, or otherwise difficult to click directly. in xcode 4, there is a little triangle button along the bottom left of the nib view; if you click it, a sidebar opens with a text outline of all your nib's object. you can click the button in this list so it highlights, then control-drag to your file owner to attach it to a method you have written. the sidebar is also useful if you want to re-order objects in a view or subview, to make some on top of others.

Upvotes: 1

Radix
Radix

Reputation: 3657

Right click the file owner file a pop up will appear in front of you their you can see various action methods that you have in your project.

select a particular action method and then assign it to the appropriate button on which you want to call the appropriate function.

Upvotes: 0

Related Questions