views:

105

answers:

0

Hello everyone I have an UIAlertView with a textfield that shows a default value and two buttons, one to cancel and the other one to confirm. What I am trying to do is that when the alert view is popped up the default value is highlighted so the user can override the whole value faster than manually erasing it.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Title" message:@"" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Continue",nil];
[alerta addTextFieldWithValue:@"87893" label:@"value"];
UITextField *textField = [alert textField];
campoTexto.highlighted = YES;
campoTexto.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
[alertt show];
[alert release];

}

for some reason there is a highlighted attribute for the textfield but it doesn't seem to work and there is no trail of that attribute in the Class documentation.