how to check that UITextField is empty or not?????????
suppose i have two control one is textField and second is button for submitting to value of textField.
I can click on button then and then only i have entered values.
If i press button without put cursor on textField then it should give
me alert when textField has not any value.
I have tried like,
NSString *string = textField.text;
if(string isEqualToString:@"")
{
code of alert;
NSLog(@"textField is empty");
}
But its not working for me.
Then
if([string lenght]>0)
{
processing code
}
esle{
code for alert and ;;;;;
}
Its also not working for me.
Please anyone tell me where am i wrong????????????
Thanks.
Message was edited by: vavdiyaharesh
mac book, Mac OS X (10.5.4)