I am trying to connect UITextField to file's owner.
Though i have taken
IBOutlet UITextField *txt1
But i am not able to connect the outlet
Can you please suggest what could be wrong?
My suggestion is checking the type of the file's owner.
It should be exactly the same type as the class where you declared
IBOutlet UITextField *txt1.
Also, ensure that IB knows about the outlet (i.e., it lists it in the outlet pane for your file's owner).
From the popup you have open, click and drag from the circle next to
New Referencing Outlet to the
File's Owner. If you can't see an option for
txt1, click on the rightmost of the three buttons above the label
View in the top bar. The right pane will appear In the right pane, click the third icon from the left (on the top), and make sure the
Class under the
Custom Class heading is set to the same class as the file's owner.
Sometimes there is a problem with the class file name. In my case I made a refactory (rename) and forgot to change the custom class attribute for the file's owner, as show in the screen shoot:
I think you have not declared
.h file and synthesize it..
u may require to declare property in .h file like this:
@property (nonatomic, retain) UITextField *txt1;
and synthesize in
.m file like this..
make sure "
@synthesize txt1" comes after
I hope that will help according to my knowledge.. :)