내비게이션 컨트롤러가없는 Iphone 스토리 보드에 대한 모달 연결된 뷰 컨트롤러가있는 뷰 기반 응용 프로그램을 만들었습니다. 내보기 컨트롤러 중 하나를 들어 내가 동적 세포와의 tableview를 디자인 한 : 내가 구현하고자하는테이블 뷰 항목 선택시 ViewController 텍스트 상자 업데이트
- (void)viewDidLoad {
[super viewDidLoad];
tabledata =[[NSArray alloc] initWithObjects:@"Data Mining",@"Software Quality",@"Project Management",@"Data Base", nil];
tablesubtitles =[[NSArray alloc] initWithObjects:@"Test parsing and KDD",@"Management of Software Creation Cycle",@"Roles in a Project",@"Database Lifecycle process", nil];
- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [tabledata count];
}
- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell=nil;
cell= [ tableView dequeueReusableCellWithIdentifier:@"Cell1"];
if (cell == nil) {
cell= [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Cell1"];
}
cell.textLabel.text= [tabledata objectAtIndex:indexPath.row];
cell.detailTextLabel.text =[tablesubtitles objectAtIndex:indexPath.row];
return cell;
}
다음 점은 볼 수 텍스트 상자의 몇 가지를 가지고의 ViewController에있는 tableview 행을 연결하는 것입니다. 가장 큰 아이디어는 TableItem을 선택할 때 ViewController를로드하고 선택한 항목을 기반으로 텍스트 상자를 자동으로 채우고 싶을 때 편집/저장 가능성을 갖는 것이 좋습니다.
예를 들면 : 나는 "닷지"새의 ViewController가 "와 같은 몇 가지 세부 사항에 가득 여러 텍스트 상자와 데이터를 가지고 나타납니다 눌러에 항목
닷지 크라이슬러 Chevrolete 포드
와의 TableView를 1900 년 이후 ". "1900 년 이후"텍스트 상자를 편집하고 저장 버튼을 누르면 컨트롤이 TableView가있는 viewcontroller로 돌아갑니다.
두 번째로 이전에 저장 한 항목이 표시되면 "Dodge"를 누릅니다.
나는 많은 변종을 시도해 봤고, 조합하는 법을 배웠다. 나는 Xcode를 처음 접했고 어떤 도움이 많이 요구된다.
미리 감사드립니다.