[英]Navigating to a view controller modally and then navigation using push segue
我有2個故事板。 我有一種情況,我必須從情節提要1中的視圖控制器1導航到情節提要2中的視圖控制器2。將視圖控制器1作為子視圖添加到父視圖控制器。 在視圖控制器1中的表格視圖中單擊一行時,我必須導航到情節提要2。
最初,它沒有在表行中檢測到觸摸。 我設法通過單擊手勢來處理它。 現在,當我單擊一行時,我可以模態導航到storyboard2 viewcontroller 2。 但是導航之后,我無法在視圖控制器2中單擊按鈕的任何位置移動,因為它使用了那里的所有推鍵。
這是我曾經瀏覽過的示例代碼。
*NSString * storyboardName = @"OppotunityStoryboard";
NSString * viewControllerID = @"AgreementMainViewController";
UIStoryboard * storyboard = [UIStoryboard storyboardWithName:storyboardName bundle:nil];
AgreementMainViewController *controller = (AgreementMainViewController *)[storyboard instantiateViewControllerWithIdentifier:viewControllerID];
controller.productTransactionentity = productTransactionEntity;
[self presentViewController:controller animated:YES completion:nil];*
您必須將ViewController 2嵌入導航控制器中,以使其能夠在模態呈現時使用推鍵。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.