0
當按下一排表視圖時我想在我的故事板的另一個屏幕中移動。從tableview移動到故事板的另一個uiviewcontroller
1)我不想使用導航控制器,還是我必須?
所以,我想這個代碼:內
UIStoryboard * storyBoard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
UIViewController *vc=[storyBoard instantiateViewControllerWithIdentifier:@"CenterMain"];
[vc setModalPresentationStyle:UIModalPresentationFullScreen];
[self presentedViewController:vc animated:YES];
我(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
我得到這樣的警告:在運行時
Instance method '-presentedViewController:animated:' not found (return type defaults to 'id')
與此錯誤:
MainMap presentedViewController:animated:]: unrecognized selector sent to instance 0x72a2070
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MainMap presentedViewController:animated:]: unrecognized selector sent to instance 0x72a2070'
2)如果使用navigationController與此代碼:
UIStoryboard * storyBoard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
[[self navigationController] pushViewController:[storyBoard instantiateViewControllerWithIdentifier:@"CenterMain"] animated:YES];
它的工作原理,但問題是我不希望看到在頂部導航控制器的吧。
所以我想無論是用1〜HELO,或者告訴如何刪除頂欄的sollution 2
謝謝!
謝謝! thas比試圖刪除我的導航控制器更容易。 – ghostrider