0
這是我的問題。 我在一個包含一個按鈕的UIView。我想按下這個按鈕出現在下一個UIViewController。我能怎麼做?iOS從UIView切換到UIViewController
這是我的問題。 我在一個包含一個按鈕的UIView。我想按下這個按鈕出現在下一個UIViewController。我能怎麼做?iOS從UIView切換到UIViewController
我建議你看看一些教程如何使用UIButton
和UINavigationController
。你可以在SDK中找到一些代碼,或者只需要Google 2的請求:「UIButton教程」和「UINavigationController」教程。
我試過了,但沒有成功: 'UIStoryboard * storyboard = [UIStoryboard storyboardWithName:@「MainStoryboard」bundle:nil]; NextViewController * nextViewController = [storyboard instantiateViewControllerWithIdentifier:@「Next」]; PreviousViewController * previousViewController = [storyboard instantiateViewControllerWithIdentifier:@「Previous」]; UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController:previousViewController]; nav.modalPresentationStyle = UIModalPresentationFullScreen; [nav pushViewController:nextViewController animated:YES];' – sancho