1

I am a newbie in IOS. I am creating an Authorization Scene in a Storyboard. It consists of textFields (username, password) and buttons (Log In, Sign Up). When login and password are correct, UIAlertView is displayed with text "Success". After this, MainScene should be displayed. But I can't create a segue in Interface Builder. How can I implement it via code?

3
  • 1
    Are you using Interface Builder or Storyboard? Sep 16, 2013 at 16:53
  • @SviatoslavYakymiv I am using Storyboard.
    – ios_dev
    Sep 16, 2013 at 17:22
  • Yas Kuraishi has already given right answer. Sep 16, 2013 at 17:24

1 Answer 1

3

Here is what you can do:

  1. Create a Segue from your source ViewController (not control) to the destination ViewController.

  2. Give Segue a name on the Interface Builder storyboard file.

  3. Perform Segue programmatically: [self performSegueWithIdentifier:@"MySegueIdentifier" sender:nil];

Note: To create Segue from a ViewController, hold control down and drag source ViewController instead of a control as you would normally do, to the destination controller.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.