Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

phillipie99

macrumors newbie
Original poster
Jul 8, 2010
21
0
I Created a Tab Bar App (from the template) and tried to add an IBOutlet to the viewControler.h/.m files but when I went to IB the outlets dont show up in the proxy object (Owner) or even in any object. They show up in the delegate if I declare them in the delegate.h/.m files. I,ve done everything correct for creating outlets and I know this is probably something simple. So what do I have to do to make the outlets show up in the owner object?
 
I Created a Tab Bar App (from the template) and tried to add an IBOutlet to the viewControler.h/.m files but when I went to IB the outlets dont show up in the proxy object (Owner) or even in any object. They show up in the delegate if I declare them in the delegate.h/.m files. I,ve done everything correct for creating outlets and I know this is probably something simple. So what do I have to do to make the outlets show up in the owner object?

Could you post some of your code? Did you remember to do the @property & @synthesize correctly?
 
Could you post some of your code? Did you remember to do the @property & @synthesize correctly?

I started with a blank tab Bar application, so there is litle code but here is how i declared them in the viewcontroller.h file

IBOutlet UITextFeild *test;

@property(nonatomic, retain) UITextFeild *test;

the .m file
@synthisize test;

[test dealloc];

Im not on my mac right now so I couldnt copy the code directly but that should be exactly or almost exactly how it is in xcode.
 
I started with a blank tab Bar application, so there is litle code but here is how i declared them in the viewcontroller.h file

IBOutlet UITextFeild *test;

@property(nonatomic, retain) UITextFeild *test;

the .m file
@synthisize test;

[test dealloc];

Im not on my mac right now so I couldnt copy the code directly but that should be exactly or almost exactly how it is in xcode.

UITextField not UITextFeild (probably just a typo in replying)

@property (...) IBOutlet UITextField *test;
 
UITextField not UITextFeild (probably just a typo in replying)

@property (...) IBOutlet UITextField *test;

Yup thats just a typo and trying it with the IBOutlet in the @property statement dosent make a difference. Still no outlets.
 
There are some bugs in IB where it doesn't sync properly with Xcode. If you look at the lower left corner of the xib window there is a little LED icon. If the connection to the project is good then the icon is green. If it's bad then the icon is grey. Yellow also indicates a problem.

What color is your LED?

If grey then you may be able to fix it by checking for any spaces or other funny characters in the path to the project. Also, apparently opening the project or the xib file from the Finder may help. (I haven't seen this myself but there are lots of complaints on the Apple iPhone forum.) I do see the yellow LED.
 
There are some bugs in IB where it doesn't sync properly with Xcode. If you look at the lower left corner of the xib window there is a little LED icon. If the connection to the project is good then the icon is green. If it's bad then the icon is grey. Yellow also indicates a problem.

What color is your LED?

If grey then you may be able to fix it by checking for any spaces or other funny characters in the path to the project. Also, apparently opening the project or the xib file from the Finder may help. (I haven't seen this myself but there are lots of complaints on the Apple iPhone forum.) I do see the yellow LED.
Nope the LED is green. As i said it works if I put the connections in the delegate.h/.m files so it's working fine but not when I put the connections in the viewcontroler.h/.m maybe because it is a tabbar app with a tab bar controler not a normal view controler?
 
Did you set the Class of the File's owner?

Do you want to show a screenshot of where you expect the outlets to be?
 
After trying with a few different types of software and the built in screen shot mecanism I was unable to take a screen shot. I here the photo sound but nothing apears on my desktop not matter what I try. Ill keep trying.
 
screen shot can be achieved by SHIFT + COMMAND + 3 in Mac.

PhoneyDeveloper provided a very good point : What is the class of your File's owner. (It should be specified as your class definition not UIViewController)

Thanks! PhoneyDeveloper...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.