问题
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
- Select that ViewController and in the top menu bar, click Editor > Embed in > Navigation Controller.
- Drag another UIViewController onto the Storyboard
- Control drag from the first UIViewController to the new UIViewController and select push from the resulting options.
- Click on the Segue that is created and go to the Attributes inspector and enter an Identifier for the Segue.
- In the ViewController code where you're handling the UIImageView tap, call
[self performSegueWithIdentifier:@"YourSegueIdentifier" sender:self];
来源:https://stackoverflow.com/questions/17974898/uiviewimage-push-to-new-uiviewcontroller-in-storyboard