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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:14:15+00:00 2026-05-27T00:14:15+00:00

My application is freezing with a reason that I could not figure out, it

  • 0

My application is freezing with a reason that I could not figure out, it does not crash but it freezes.

basically what I did was having another view inside my view that is hidden at first place, after when I click a button this view will be appeared and it includes a UItextfield and a UIPickerView. the pickerview data is updating while I edt the UItextfield and I select one of the values from picker view then basically press addButton, when I add thi whole view will be hidden again and the selected value of the pickerview will be added another UITextfield in the main view.

when I do this first time it works fine. it sets the value of the UI textfield which is on the main view to the correct value. but when I try to change it, get that view unhidden and select another value in the pcikerview and press on addButton again the application freezes. No crash appears.

I want to inform you about this the value of the UITextfield on the main view is changing I checked it on the logs. and the method that do the clicking action completely works. But it freezes.

I couldnt figure it out, I need some help 🙂

EDIT:

I figure out that the UITextField on the main view cause this freeze, when I set the text

[myTextfield setText:@"somethng"];

the UI freeze. when I comment this out it works pretty fine. But It works fine at first time. does not work on the second time.

Any help will be appreciated.

EDIT 2 (I added some code):

-(IBAction)addButtonClicked:(id)sender
{
    leftBarButton = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStylePlain target:self action:@selector(pickerViewDoneClicked:)];

    [[self.navigationController.navigationBar.items objectAtIndex:0] setLeftBarButtonItem:leftBarButton];

    [self.pickerContainer setHidden:NO];
}

-(IBAction)pickerViewDoneClicked:(id)sender
{

    [[self.navigationController.navigationBar.items objectAtIndex:0] setLeftBarButtonItem:nil];
    NSLog(@"%@", self.myTextField);
    NSLog(@"old val %@", self.myTextField.text);


    // the text field on the main view.
    [self.myTextField setText: selectedText];

    NSLog(@"new val %@", self.myTextField.text);

    [self.pickerContainer setHidden:YES];
}

//in picker view source
selectedText = [pickerData objectAtIndex:row];

As I told the first time I add it works fine I can see the value on the textfield
but when I do the same action again and click done the app freezes.

I checked the reference of the textfield before after and no reference missing
I can see the new value and old value as well. but the UI freezes.

  • 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-27T00:14:15+00:00Added an answer on May 27, 2026 at 12:14 am

    I was using this piece of code for padding for my text field,

    UIView *paddingView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 15, 20)];
    self.myTextField.leftView = paddingView;
    self.myTextField.leftViewMode = UITextFieldViewModeAlways;
    

    I am not sure how it effects it but second time I change the text into the textfield I was getting my screen freezed.

    Thanks again for any effort to help me.

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

Sidebar

Related Questions

Application able to record error in OnError, but we are not able to do
I've just suffered a horrible time of having my application freezing after a few
I have an Application in C#/Winforms that is basically used to run test for
I have an application that uploads files to a server, but when I press
Application has an auxiliary thread. This thread is not meant to run all the
Application : HTA (therefore IE) This is an application that uses SendKeys to populate
In a WinForms application, I have a datagrid that is associated to a datasource.
I am experiencing an issue with activity indicator freezing when I move application to
I need to call this external command qconf from my application without freezing it
In my Silverlight application, I have an operation that takes a couple seconds 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.