case 0: {
[cell.textLabel setText:@"ID :"];
[cell.textLabel setTextAlignment:UITextAlignmentRight];
UIView *viewCell = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 160, 40)];
UITextField *textUserID = [[UITextField alloc] initWithFrame:CGRectMake(0, 10, 160, 31)];
[viewCell addSubview:textUserID];
[textUserID setTag:0];
[textUserID setText:[dictUserData objectForKey:@"ID"]];
[textUserID setReturnKeyType:UIReturnKeyDone];
[textUserID setAutocorrectionType:UITextAutocorrectionTypeNo];
[textUserID setClearButtonMode:UITextFieldViewModeWhileEditing];
[textUserID setClearsOnBeginEditing:NO];
self.stringID = textUserID.text;
[textUserID addTarget:self action:@selector(textFieldDone:) forControlEvents:UIControlEventEditingChanged];
cell.accessoryView = viewCell;
[textUserID release];
[viewCell release];
break;
}
case 1: {
[cell.textLabel setText:@"Password :"];
[cell.textLabel setTextAlignment:UITextAlignmentRight];
UIView *viewCell = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 160, 40)];
UITextField *textUserPW = [[UITextField alloc] initWithFrame:CGRectMake(0, 10, 160, 31)];
[viewCell addSubview:textUserPW];
[textUserPW setTag:1];
[textUserPW setText:[dictUserData objectForKey:@"PW"]];
[textUserPW setSecureTextEntry:YES];
[textUserPW setReturnKeyType:UIReturnKeyDone];
[textUserPW setAutocorrectionType:UITextAutocorrectionTypeNo];
[textUserPW setClearButtonMode:UITextFieldViewModeWhileEditing];
[textUserPW setClearsOnBeginEditing:NO];
[textUserPW addTarget:self action:@selector(textFieldDone:) forControlEvents:UIControlEventEditingChanged];
cell.accessoryView = viewCell;
[textUserPW release];
[viewCell release];
break;
}
default: {
[cell.textLabel setText:@"자동 저장 :"];
[cell.textLabel setTextAlignment:UITextAlignmentRight];
UIView *viewCell = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 160, 40)];
UISwitch *switchAutoSave = [[UISwitch alloc] initWithFrame:CGRectMake(0, 6, 94, 27)];
if ([[NSUserDefaults standardUserDefaults] stringForKey:@"ID"] ) [switchAutoSave setOn:YES animated:NO];
else [switchAutoSave setOn:NO animated:NO];
[viewCell addSubview:switchAutoSave];
[switchAutoSave addTarget:self action:@selector(autoSaveChange:) forControlEvents:UIControlEventValueChanged];
cell.accessoryView = viewCell;
[switchAutoSave release];
[viewCell release];
break;
}
'프로그래밍 > iOS' 카테고리의 다른 글
UIScrollView와 UIPageControl을 이용하여 페이징 처리하기 (0) | 2011.06.12 |
---|---|
시작하세요! 아이폰 3 프로그래밍 - Part 8. 테이블 뷰 입문 (0) | 2011.06.08 |
UITableView Cell에 두줄 입력하기 (0) | 2011.06.08 |
iPhone용 Open Source 모음 (0) | 2011.06.05 |
위치정보(GPS) (0) | 2011.06.03 |