Renz Tan
Renz Tan

Reputation: 245

How to perform segue when tapping a UIButton inside a XIB file

enter image description here

I have a XIB file (Right side of the image) with a button inside. Then added the XIB file (or UIView) to the Shop View controller (Far left side, red box).

I need to press the button inside the XIB file so that I can perform a segue from the Shop VC to the other VC (Middle VC on the image).

Any method of doing so?

Upvotes: 0

Views: 252

Answers (1)

Leo
Leo

Reputation: 24714

Call this method in Shop VC when button is clicked

 self.performSegueWithIdentifier("segueId", sender: nil)

Upvotes: 1

Related Questions