嘗試將新視圖控制器推送到現有導航控制器時遇到問題。從彈出窗口中將UIViewController推送到UINavigationController
我試圖讓UIPopoverController
出現在推動導航UIBarButtonItem
,並從該「下拉」選擇一個菜單點,將關聯的視圖控制器推到「主」導航控制器。
我試過以下,它給出了一種模式。但我希望推送的視圖。 如果選擇push而不是modal,結果如下。
我也試圖使從我試過下面的代碼定製UITableViewController
(在酥料餅):
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UINavigationController *dash = [storyboard instantiateViewControllerWithIdentifier:@"dash_nav"];
UIViewController *students = [storyboard instantiateViewControllerWithIdentifier:@"students"];
if (indexPath.row == 0) {
[dash pushViewController:students animated:YES];
// [[dash navigationController] presentViewController:students animated:YES completion:nil];
}
NSLog(@"%@", [dash title]);
NSLog(@"index = %i", indexPath.row);
}
有沒有辦法做什麼,我試圖完成?
兩件事情..首先,你是如何在故事板中製作這些小型tableView的?其次,如果你使用master-detail,你可以使用*替換*而不是* push * – Marc