Witam,
Mam problem z przesłaniem informacji z jednego widoku do drugiego w TabBar, przy czym drugi widok to TableViewController.
Robię to tak:
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
tableView *tableViewController = [segue destinationViewController];
tableViewController.label = @"abc";
}
Następnie w "tableViewController":
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString* CellIdentifier = @"cell";
TableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
cell.napisLabel.text = self.label;
return cell;
}
Oczywiście w w tableViewController mam zaimportowane "tableViewCell" oraz "viewController"(z którego przesyłam dane).
Dopiero się uczę, a TabBar używam pierwszy raz. Czy tutaj też używa się metody "prepareForSegue"?