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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:15:25+00:00 2026-05-28T14:15:25+00:00

I have some textFields and when I write 11111111111 to the first textfield (TCKimlikText)

  • 0

I have some textFields and when I write 11111111111 to the first textfield (TCKimlikText) I set some strings to the other textfields. Also first text field’s (TCKimlikText) max lenght must be 11 character. I try this below code. But I have one problem. I can not delete which I write to TCKimlikText textfield.

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{


if (TCKimlikText.text.length <11) {

    if ([[TCKimlikText.text stringByReplacingCharactersInRange:range withString:string] isEqual:@"11111111111"])
    {   
        AdinizText.text = @"MEHMET";
        uyrukBtn.titleLabel.text = @"TC";
        BabaAdiText.text = @"HASAN";
        AnneAdiText.text = @"MELEK";
        SoyadinizText.text = @"AYDIN";
        AnneKizlikSoyadiText.text = @"OKUR";
        DogumTarihiText.text = @"01/01/1960";
        medeniDurumBtn.titleLabel.text = @"EVLİ";
        EsinizinAdiText.text = @"AYŞE";
        dogumYeriBtn.titleLabel.text = @"BURSA";
        kimlikTuruBtn.titleLabel.text = @"Nüfus Cüzdanı";
        KimlikVerilisNedeniText.text = @"YENİLEME";
        KimlikVerilisTarihi.text = @"12/01/2010";
        KimlikSeriNoText.text = @"16345";
        VergiKimlikNoText.text = @"45678";
        EvTelText.text = @"5443126274";
    }
    return  YES;


}

else  return NO;


}

How can I solve this?

  • 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-28T14:15:26+00:00Added an answer on May 28, 2026 at 2:15 pm

    The best way to is following:

    -(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
    
    NSString *resultStr = [TCKimlikText.text stringByReplacingCharactersInRange:range withString:string];
    
    if (resultStr.length < 12)
    {
    
        if ([resultStr isEqual:@"11111111111"])
        {   
            NSLog(@"In");
            AdinizText.text = @"MEHMET";
            uyrukBtn.titleLabel.text = @"TC";
            BabaAdiText.text = @"HASAN";
            AnneAdiText.text = @"MELEK";
            SoyadinizText.text = @"AYDIN";
            AnneKizlikSoyadiText.text = @"OKUR";
            DogumTarihiText.text = @"01/01/1960";
            medeniDurumBtn.titleLabel.text = @"EVLİ";
            EsinizinAdiText.text = @"AYŞE";
            dogumYeriBtn.titleLabel.text = @"BURSA";
            kimlikTuruBtn.titleLabel.text = @"Nüfus Cüzdanı";
            KimlikVerilisNedeniText.text = @"YENİLEME";
            KimlikVerilisTarihi.text = @"12/01/2010";
            KimlikSeriNoText.text = @"16345";
            VergiKimlikNoText.text = @"45678";
            EvTelText.text = @"5443126274";
        }
        return  YES;        
    
    }
    
    else  return NO;
    

    }

    This will also help you while someone paste the text into your text field.

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

Sidebar

Related Questions

I have created some TextFields . Now I have to set constraint to that
I have created some textFields dynamically: for (int a=0; a<10; a++) { UITextField *textField
I have some strings of xxh:yym format where xx is hours and yy is
I have several projects that need to write structured Textfiles, some with fixed size
I have a JPanel with two JTextFields. If the user writes some text into
I have some code to download a text file from a website. When the
I have a Canvas, some text fields and a context menu. When I start
I have a JSF page that has a h:form that has some textfields and
So I have a listbox on my page and some textfields. Through the textfields
i have some checkbox in my jsp page. there are some othe textfields in

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.