вы можете указать процессу кнопки следить за текстовым полем, чтобы, если текстовое поле пусто, кнопка не обрабатывала функцию, она была бы такой:
-(IBAction) buttonPressed:(id) sender
{
//----this will process the button function if the textfield is not empty
if(textField.text != @"")
{
>>> do the process <<<
}
else
//----this will show an alert message when the user tries to click button without filling the textfield
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"error"
message:@"please fill the information first"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
}
}