how do I set a delegate in a view that is not my main view
- by orangecl4now
I have a xib. the xib has a button that swaps another xib.
the second xib has a uitextfield and a uilabel.
how do I make the keyboard go away when I'm done typing? what do I need to wire or code? the second xib has it's own class (called CustomSign.m)
Inside CustomSign.m, I've implemented the following method
-(void)textFieldDidEndEditing:(UITextField *)textField {
[customText resignFirstResponder];
signedLabel.text = customText.text;
}
- (void)awakeFromNib
{
//assume textField is an ivar that is connected to the textfield in IB
[customText setDelegate:self];
}
I get the following warning
Class "CustomSign" does not implement the UITextFieldDelegate protocol