Katedral Pillon
Katedral Pillon

Reputation: 14844

Cannot segue from UILabel to ViewController

in the storyboard, I am trying to segue from a label to a view controller. For whatever reason, it's not going. Has anyone else experience this?

Upvotes: 3

Views: 1944

Answers (2)

C Williams
C Williams

Reputation: 859

Style the UIButton to appear like a Label and then perform your navigation, just a quick hack.

Upvotes: 1

pedros
pedros

Reputation: 1197

Its not possible. You can only segue from UIControls or subclasses of it, like UIButtons.

UILabels don't have target-action methods for activating the segue. An alternative is to use UITapGestureRecognizer on the label and run the segue yourself.

But simply using a button is simpler.

Upvotes: 6

Related Questions