Reputation: 11340
I'm new to XCode/iOS and I'm trying to create a segue between two different screens (one with the letter A on it (a label) and the other with the letter B). I created two basic view controllers on the storyboard and then I added a button to one of them. I then control click and dragged from the button to the other view controller. I choose push. However, when I run it, it doesn't segue. Why not? I've heard about Navigation Controllers, but I don't want a naviagtion bar (with back for example) at the top of my screen, thus I didn't use one.
Upvotes: 0
Views: 9582
Reputation: 2267
You absolutely need a UINavigationController
if you want your push segue to work.
However, if you don't want to see the Navigation Bar, you can simply disable it in your navigation controller with the property navigationBarHidden
If you are using Xcode, this property can be unchecked in the Utilities Bar, Attribute Inspector under the name "Shows Navigation Bar"
Upvotes: 2
Reputation: 2686
Try geeky Lemon video tutorial like this on storyboard basis: http://www.geekylemon.com/WEBPROTECT-xcodestoryboard. You can see them in the site registering or on you tube. I'm too pretty new to x code and i find this series of tutorials vero useful.
Upvotes: 0
Reputation: 8917
Here is a very good tutorial on segues. You need to purchase the book/PDF to get the second part of this tutorial, but its a good resource to have if you want to do iOS 5.0 programming.
http://www.raywenderlich.com/5138/beginning-storyboards-in-ios-5-part-1
Upvotes: 0
Reputation: 11537
You need a modal segue if you don't want to use Navigation Controller. Also you probably want to write your custom segue to control the transition between two view controller. You can refer to my post that explain how to segue from one scene to an other here:
How do you perform a customized segue (modal segue) from a UIButton in storyboard
Upvotes: 0
Reputation: 17732
In order to utilize a push segue, your root view controller needs to be a navigation controller. The only segue you can use without a "master" controller of sorts like that, is a modal segue
Upvotes: 3