Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 5/XCode 4 Storyboard question - can't find "performSequeWithIdentifier:sender"

I'm trying out the new Storyboard feature in iOS 5/XCode, but I can't get the segue transitions between two scenes to work. I've tried to follow this tutorial but I'm stuck at stage 6:

Click one of the Switch View button so it is highlighted like below, then holding control then click the Switch View button and drag from the button until the blue line touches the other view. A black pop-up box will come up and select performSequeWithIdentifier:sender. Repeat for the other button.

So what I'm trying to do is create a transition from one scene to another with a button labeled "Switch View". According to the tutorial I should click on the button, then hold CTRL and drag from the button to the other View Controller and release; then a popup should appear with one option: performSequeWithIdentifier:sender. But I never get this option, instead I get these three options: Push, Modal and Custom. I've tried these options but nothing happens when I hit the button in the emulator.

Screenshot of my setup: http://i.solidfiles.net/0784.png

I'm running the latest XCode 4.2 preview 6 under Snow Leopard 10.6.7.

What am I doing wrong? Thanks in advance!

like image 772
Walter Berggren Avatar asked Aug 20 '11 14:08

Walter Berggren


4 Answers

Goto Editor on the Menu above and Embed a Navigationbar to View One. You need to Specify a NavBar first as it's using Stack. Then you can control drag View one to View Two to create a segue. Select "Push" segue. Btw, post NDA question about Xcode 4.2 Beta6 in Apple's Forum instead.

like image 145
Caspian Avatar answered Nov 13 '22 23:11

Caspian


As far as I know the performSequeWithIdentifier:sender method is used to perform a segue transitions that is already defined in the storyboard. Here we have to pass the Identifier of the segue that we set in the storyboard inside the method call. So by using this method we can implement the same segue transition for different controls in a view.

I have implemented it like [self performSegueWithIdentifier:@"Id" sender:sender]; where 'Id' is the identifier of an already existing segue in the storyboard.

like image 29
Narayanan Avatar answered Nov 14 '22 01:11

Narayanan


Choose a Modal style for your segue.

After creating the second view controller and implementing <UIActionSheetDelegate, UIAlertViewDelegate> it was working fine for me.

like image 27
bdudout Avatar answered Nov 13 '22 23:11

bdudout


Those tutorials were for the beta software. Obviously Apple has changed the Seque menu for final release.

Push Seque - pushing views on a stack controller such as Navigation controller Modal Seque - poping a new view on top of the original. Need to close modal view to go back to original.

like image 42
Steven Rock Avatar answered Nov 14 '22 00:11

Steven Rock