Я пытаюсь разработать стол для чтения RSS Reader с раскадровкой в приложении с вкладкой. Мне удалось заполнить мой RootTableViewController анализируемым XML. У меня возникла проблема с тем, как заставить каждую строку в моем RootTableViewController указывать и передавать данные из выбранной ячейки в другой DetailTableViewController.UITableView to detail UITableView сверлить с помощью раскадровки
Это часть моего кода для разбора XML и для заполнения RootTableViewController:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [stories count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"AdvCurrentCelly";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
int storyIndex = [indexPath indexAtPosition: [indexPath length] - 1];
NSString *description = [[stories objectAtIndex: storyIndex] objectForKey: @"description"];
NSString *title = [[stories objectAtIndex: storyIndex] objectForKey: @"title"];
//This populates the prototype cell 'AdvCurrentCelly'
cell.textLabel.text = title;
//cell.textLabel.text = date;
cell.detailTextLabel.text = description
return cell;
}
В раскадровке, название Segue из клетки RootTableViewContoller к DetailTableViewController является ShowADVDetail
Помощь много оценили
Jan