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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:20:17+00:00 2026-06-06T03:20:17+00:00

I am using the UIAlertView to show the text field over a popup. But

  • 0

I am using the UIAlertView to show the text field over a popup. But the problem I am facing is that I am not able to validate and restrict the entries in UITextField over a popup, i.e. I want to accept only 3 numeric values.

Here i am providing the block of code that I have implemented.

popup = [[UIAlertView alloc] initWithTitle:@"Please enter 3 numeric values"
                                   message:@"\n\n"
                                  delegate:self
                         cancelButtonTitle:@"Cancel"
                         otherButtonTitles:@"Ok", nil];         

txtFld = [[UITextField alloc] initWithFrame:CGRectMake(12, 50, 260, 25)];
[txtFld setBackgroundColor:[UIColor whiteColor]];
[txtFld setKeyboardType:UIKeyboardTypeNumberPad];
[popup addSubview:txtFld];

[popup show];

[txtFld becomeFirstResponder];

So can anyone help me out to resolve this issue? 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-06T03:20:19+00:00Added an answer on June 6, 2026 at 3:20 am

    here I can see that you have not set textfield.delegate=self , please check it in your code

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to show a UIALertView every 4 days. But getting a crash because:
I've added a UIAlertView in my application that grabs user input but I'm unsure
I hope to access UIAlertView using tag. The codes show below UIAlertView *a=(UIAlertView *)[self.view
I am using a UIAlertView in my code in iOS5, but rather than the
I am using modal views in my iphone application. The problem is that the
Using below code, I am trying to show a uialertview, it is being shown
I'm currently using this UIAlertView to do a login popup, UIAlertView *alert = [[UIAlertView
I have an application where I am showing an alert message using UIAlertView. By
I have created an alert view with two buttons using the following code: UIAlertView
I've a small issue here. I am using an if statement with UIAlertView and

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.