how do I set a delegate in a view that is not my main view

Posted by orangecl4now on Stack Overflow See other posts from Stack Overflow or by orangecl4now
Published on 2010-04-21T14:40:07Z Indexed on 2010/04/21 14:43 UTC
Read the original article Hit count: 211

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

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about delegates