Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7537995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:59:50+00:00 2026-05-30T06:59:50+00:00

Using iOS 5 storyboards, on a button I am performing a segue, what I

  • 0

Using iOS 5 storyboards, on a button I am performing a segue, what I want is to do validation on my textfield and if validation is failed I have to stop segue and throw an alert. Whats the way to do it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T06:59:52+00:00Added an answer on May 30, 2026 at 6:59 am

    If your deployment target is iOS 6.0 or later

    You can simply implement the shouldPerformSegueWithIdentifier:sender: method on your source view controller. Make this method return YES if you want to perform the segue, or NO if you don’t.

    If your deployment target is earlier than iOS 6.0

    You will need to change the way your segue is connected in the storyboard and write a little more code.

    First, set up the segue from the button’s view controller to the destination view controller, instead of directly from the button to the destination. Give the segue an identifier like ValidationSucceeded.

    Then, connect the button to an action on its view controller. In the action, perform the validation and either perform the segue or show an alert based on whether the validation succeeded. It will look something like this:

    - (IBAction)performSegueIfValid:(id)sender {
        if ([self validationIsSuccessful]) {
            [self performSegueWithIdentifier:@"ValidationSucceeded" sender:self];
        } else {
            [self showAlertForValidationFailure];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created an app using the iOS 5 Storyboard feature, and have decided I
I am just starting in my iOS development using xCode 4.2 and discovered storyboards.
I am converting over to iOS 5 and storyboards. When I have a table
I'm using iOS 4 and I have some memory management problems that I don't
Does anyone have any up-to-date statistics regarding percentage of users using iOS 4.3? I'm
Using iOS 4.3 on an ipad app I have a custom NSOperation that uses
I am developing an iOS app using iOS 4.2 SDK, but I want the
Using iOS, how would I go about creating a red delete button similar to
I'm working on some project for iOS 5 using Xcode 4.2. I have one
What is the best way to generate random numbers using Objective-C on iOS? If

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.