とは相互にリンクされている2つのビューがAlllocationsViewController
あります。LoactionsViewController
ストーリーボードでは次のように表示されます。
AlllocationsViewController
へのリンクの各セルはLocationsViewController
、tableViewで表示するデータを送信します。AlllocationsViewController.m
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
LocationsViewController *locationsViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"LocationsViewController"];
//Will send the data from the cell to the next view into 'locationlink', which is set as property in LocationsViewController.h to retrieve the data
locationsViewController.locationlink = cell.detailTextLabel.text;
[self.navigationController pushViewController:locationsViewController animated:YES];
}
次に、これらのビューにTabBarを配置します。
データを挿入した後、以下のコードをそのままにしておくと、TableCellはユーザーをTableView(LocationsViewController)に送信しますが、TabBarは表示されません。TabBarも表示されるように、以下のコードで何を変更する必要がありますか?今、locationsViewControllerではなくTabBarにリンクする必要がありますか?または、LocationsViewControllerでTabBarを設定する必要がありますか?助けていただければ幸いです。