i have added textfeld in uiactionsheet as
-(void)showAction {
printf("getting action ready \n");
UIActionSheet *asheet = [[UIActionSheet alloc] initWithTitle:@"New Sheet Name" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles: nil];
[asheet showInView:self.view];
[asheet setFrame:CGRectMake(0, 70, 320,200)];
UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(0, 100,200, 25)];
textField.borderStyle= UITextBorderStyleRoundedRect;
[textField becomeFirstResponder];
[textField setKeyboardType:UIKeyboardTypeAlphabet];
[textField setKeyboardAppearance:UIKeyboardAppearanceAlert];
textField.text=@"test" ;
textField.delegate=self;
[asheet insertSubview:textField atIndex:0];
[textField release];
[asheet release];
}
but keypad is not working for this textfield however backspace is working. previously when i have been using ios 3 its workd fine but with ios 3.2 iphone simulator 4.0 does not accept any input from keypad
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
printf("\n textFieldShouldBeginEditing\n ");
return YES;
}
this gets called
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
printf("shouldChangeCharactersInRange %s ",[string UTF8String]);
return YES;
}
however this delegate method gets called only for backspace.