简体   繁体   中英

UIViewImage push to new UIViewController IN STORYBOARD

From questions like this and this , I know how to have a UIViewImage push to a new UIViewController programatically.

But how can I do this in completely in Storyboard ? I like Storyboard and would like to not have multiple xib files everywhere.

I've already enable User Interaction through Storyboard , but I still can't create a transition...

在此处输入图片说明

  1. Drag UIViewController object onto your Storyboard canvas
  2. Select that ViewController and in the top menu bar, click Editor > Embed in > Navigation Controller.
  3. Drag another UIViewController onto the Storyboard
  4. Control drag from the first UIViewController to the new UIViewController and select push from the resulting options.
  5. Click on the Segue that is created and go to the Attributes inspector and enter an Identifier for the Segue.
  6. In the ViewController code where you're handling the UIImageView tap, call [self performSegueWithIdentifier:@"YourSegueIdentifier" sender:self];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM