I'm trying to create a Segue when tapping on a UIView that causes a segue to a new view controller that holds the UIView that was tapped on. Basically taking a UIView that was only half the screen and making it the size of the whole screen.
I think I should use prepareForSegue to pass the UIView I tapped on to the new view controller, rather than create a new view, but I'm not sure if prepareForSegue should be autogenerated, and where it should be. I linked the tap gesture to a "Show" segue that opens the new view controller. I thought that prepareForSegue was auto-generated in Objective-C, so I'm not sure if I should be using it or not.
Another thought is that it could be in the tap gesture's action function, but I'm not sure if this is better or worse than prepareForSegue. The problem I see with that is there is no way to get a reference to the new view controller I'm moving to.
Aucun commentaire:
Enregistrer un commentaire