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 8123285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:07:54+00:00 2026-06-06T06:07:54+00:00

I have a UITextField in the event calls a function EditingDidEnd A to validate

  • 0

I have a UITextField in the event calls a function EditingDidEnd A to validate the contents of the field, then I have a button that calls a function B by passing the contents of text field and then brings me to another view which shows the results . The issue is that if the text field is empty by giving the button brings me to the view of results and then shows me the error that the field is empty … 🙂 Typical rookie with the theme events … What you suggest I use? Exit on I put a function that validates for not following that execution??!

Thanks in advance,

  • 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-06-06T06:07:56+00:00Added an answer on June 6, 2026 at 6:07 am

    Do your validation when the button is pressed

    -(void)buttonNextClicked:(id)sender
    {
         if(!self.textField.text || [self.textField.text isEqualToString:@""])
         {
              // Show an alert with validation message
              return;
         }
    
         //Proceed with the new view
    }
    

    If you want to validate as soon as the editing has stopped make a method for validation and call it in the both places

    -(BOOL)isInputTextValid:(NSString *)txt
    {
        if(!txt)
           return NO;
        if([txt isEqualToString:@""])
           return NO;
        if(other_invalid_values)
           return NO;
    
        return YES;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I Have an a touchesEnded event that checks for when a UITextField is pressed.
Possible Duplicate: Iphone UITextField only integer I want to place a text field that
I have one UITextField that has a value and one UILabel that has text.
I have a UITextField that I put into a UITableViewCell that I put into
I have a UITextField in my app that accepts decimal amounts for prices (i.e.,
I have an UITextField and I would like that for every tap on a
I have a UITextField that I would like to enable auto completion on by:
Well, I have a UITextField. Inside it is a property UITextField.text. Is it ok
I have an IBAction that I have connected to a UITextField element in Interface
I have a UITextField that responds to touch events when it is added as

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.