Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting File's Owner to View Issue

Tags:

xcode

I'm having an issue connecting the view and IBActions/Outlets to File's Owner in Xcode 4.2's nib. When I create a new nib file, I'm going to File -> New File -> Select UI on the right -> Select "View" -> Device Family of iPhone -> then save it as TestView.xib. The new nib appears, but when I try to control + drag from File's Owner to View or anything else, nothing at all happens, the line just disappears without letting me select it as an outlet. The same issue occurs when I try to connect IBActions, Pickers, Labels or really anything to File's Owner. I cannot connect anything to it.

I'm working through a programming book that provided source codes, and when I play around with the nibs in there, everything is already connected to File's Owner. I can reconnect everything just fine in those files as well. I've been having to type up the program and then drag and drop the source codes nibs rather than being able to do it myself.

I'm sure that there is something little that I'm missing, and I've been doing research on it and trying to figure it out for days to no avail. Any help would be much appreciated, thank you!

like image 936
Henry F Avatar asked Dec 08 '11 21:12

Henry F


1 Answers

My guess is that you have not set the class for File's Owner correctly. Select File's Owner in the vertical bar on the left of the Interface Builder view, and in the Utilities (right) bar, go to the third tab (Identity inspector) and set Class to be your view controller's class.

like image 145
jrtc27 Avatar answered Sep 30 '22 17:09

jrtc27