나는 UITableView
을 가지고 있는데, 이는 이름 목록을 의미합니다. 이름을 클릭 할 때마다 UIAlertView
을 불러와 이름과 관련된 정보 (지금은 나이) 만 변경할 수 있도록하고 싶습니다.경고보기에 텍스트를 보관하고 텍스트를 NSString에 저장 하시겠습니까?
는 지금, 나는 당신이 자리에 UITextField
재설정 내부의 alertView의 text
을 닫습니다 그러나되면, UITextField
과 alertView
가 나타날 수 있습니다. 텍스트를 UIAlertView
에 머무르게하려면 어떻게해야합니까? 또한
- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UIAlertView *alert =
[[UIAlertView alloc] initWithTitle:@"Set Age"
message:[_tableData1 objectAtIndex:indexPath.row]
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
alert.alertViewStyle = UIAlertViewStylePlainTextInput;
UITextField *textField = [alert textFieldAtIndex:0];
textField.placeholder = @"18";
[alert show];
}
, 내가 어떻게 UIAlertView
에서 텍스트를 얻을, 그리고 NSString
로 저장할 수 있습니다?
감사합니다.
에
UIAlertViewDelegate
을 추가해야'alertView : clickedButtonAtIndex를'그'UITextField' 텍스트를 검색 할 수 있습니다. – Larme