0
다음은 appcontrol에 제공된 plist 정보를 사용하는 viewcontroller에있는 코드입니다. plist가 채워진 표가있는 다른보기 컨트롤러를 밀어 넣으십시오.
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [self.tableDataSource count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
NSDictionary *dictionary = [self.tableDataSource objectAtIndex:indexPath.row];
cell.text = [dictionary objectForKey:@"myobject"];
이
은 AppDelegate에에서 사용되는 PLIST를 사용하고 내 PLIST에이 정확히 얼마나 많은 입구와 내 테이블의 셀을 채 웁니다.내가하고 싶은 일은 해당 "키"로 채워진 각 셀에 대한 비 동적 뷰 콘 솔러를 푸시하는 것입니다.
따라서 myobject 셀 (선택하면)은 myobject viewcontroller를 푸시합니다. yourobject 셀 (선택하면)은 yourobject viewcontroller를 푸시합니다.
All the way down.
어떻게하면됩니까?