I have the following code:
@interface AddResident : UIViewController
{
IBOutlet UITextField *FirstName;
IBOutlet UISegmentedControl *Gender;
}
I can see both of these outlets in interface builder but can only connect the UISegmented control… the other one will not connect to my UITextField on the form.
Any help is much appreciated.
Two possibilities:
1) You’re trying to link to the textfieldCELL instead of the textfield. (which has a cell inside of it)
2) you need to bind it instead of connect it.
The way that I have done this (With NSTextFields, but I can’t imagine it’s all that different) was to bind the textField to a property (Not necessarily IBOutlet) in my controller. Actually, in one case, the property doesn’t even actually exist, but I have what look like getter and setter methods that do the correct things…