anonymox
anonymox

Reputation: 419

Segue is not working in storyboard after creating navigation bar

Hi I created a single view project and i put a button in the scene that I embed in navigation bar with a bar button on the right to this scene and then I created the second screen which contain an image view, Then I dragged bar button to second scene using Crtl+Drag and choose show action for segue. which works fine.

Problem : Then I created third scene with some image view in it and I dragged the button from first scene with Crtl+Drag to the third scene and choose "show" for segue action.

but when I run the app only navigation bar segue works and the button do nothing.

UPDATE : I found why this problem occurs, it's because of stack view constrains. when i put a button or image view in stack view and give it constrain it won't work. but why ?

enter image description here

any suggestion?

Upvotes: 0

Views: 893

Answers (1)

hannad
hannad

Reputation: 822

As per the discussion, your first problems were solved by setting UserInteractionEnabled to true on the UIImageView, and as for the buttons, it seems they were set up incorrectly the first time.

Upvotes: 1

Related Questions