I have set the placeholder text(e.g. Under 18s) of a text field(homeTeam) in storyboard. Now i want to check the condition something like below.
- (BOOL)textFieldShouldBeginEditing:(UITextField *) textField
{
if ([_homeTeam.text isEqualToString:@"e.g. Under 18s"]) { // e.g. Under18s
[_homeTeam setPlaceholder:@""];
}
}
But the condition is never getting true. What am i missing here? _homeTeam.text is blank when i used NSlog to trace. Why is it so?
Please suggest.