시도해보십시오. 먼저 viewdidload에서 텍스트 필드를 숨기십시오. 그런 다음 버튼을 누르고 푸십시오. 편집 가능하게 만들고 사용자를 위해 키보드를 팝업하십시오.
//viewDidLoad
yourTextField.alpha = 0;
yourTextField.userInteractionEnabled = FALSE;
-(void)editNote {
//fade in text field after button push
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDelay:0];
[UIView setAnimationDuration:0.75];
yourTextField.alpha = 1;
[UIView commitAnimations];
//make text field editable
yourTextField.userInteractionEnabled = TRUE;
//pop up keyboard
[yourTextField becomeFirstResponder];
}
------- 업데이트 -------- 이제 조금 더 나은 무엇을하려고 설명했다고
. 이 새 View Controller에서 필드 (UITextFields 등)를 사용하여 완전히 새로운 ViewController를 생성해야합니다. 버튼에
당신이 코드를합니다 클릭
TextFieldViewController * vc = [(TextFieldViewController *)[[TextFieldViewController alloc] init] autorelease];
[self.navigationController presentModalViewController:vc animated:YES];
[vc release];
//you will need to create a button on this new ViewController and use this code to dismiss it when done.
[[self parentViewController] dismissModalViewControllerAnimated:YES];
당신은 사용자가 _notes_button_을 누르면 이후의 UITextField가 편집 될 것을 원하십니까? 그 시점에 나타나야합니까? –
사용자가 notes_button을 누르면 uitextfield가 나타나야하며 편집 가능해야합니다. – lifemoveson