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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:08:09+00:00 2026-06-12T18:08:09+00:00

In viewDidLoad I check if two UITextFields have a valid input (text length >

  • 0

In viewDidLoad I check if two UITextFields have a valid input (text length > 0) and then I set the enabled property of an UIButton. Using the debugger I figured out that

self.loginButton.enabled = YES;

is executed, but when I print the boolean value with

print self.loginButton.enabled

I get NO before (which is okay) but also NO after the statement is executed. I also checked multiple times if the UIButton property of self is connected to the UIButton in my storyboard with an IBOutlet and that is the case. I can also print the text of the titleLabel with the console. When I tap one of the UITextFields and change the text

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

is being called and there I will check the text again. Here

self.loginButton.enabled = YES;

seems to work normally. With iOS 5 I don’t have any problems, but I didn’t found any relevant changes for iOS 6 in the documentation for this problem.

Any ideas?

Edit: The issue is something different. I also have a UITableView in that UIViewController and the tableView is bigger then expected (bigger then set in the Storyboard) at that point (until know I don’t know why) and seems to override the UIButton. Changing the frame of the UIButton or UITableView before executing

self.loginButton.enabled = YES;

works. There might be a delay when setting the enabled property, because printing the boolean value of still returns NO.

NSLog(@"%i",self.loginButton.isEnabled);
self.loginButton.enabled = YES;
NSLog(@"%i",self.loginButton.isEnabled);

2012-10-13 16:11:43.460 [1524:c07] 1
2012-10-13 16:11:43.462 [1524:c07] 1
  • 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-12T18:08:10+00:00Added an answer on June 12, 2026 at 6:08 pm

    The problem is that the UITableView is being resized from the initial size declared in the storyboard, because of autoresizing and then it covers the UIButton area. And a button hit was interpreted as interaction with the UITableView. Changing the UIButton frame, the UITableView frame or the autoresizing settings solves the problem.

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

Sidebar

Related Questions

Solved....Check at bottom of Body.. I am using XCODE 4 I have an Money
In viewDidLoad, I have this code: ProvRec *provRec = [[ProvRec alloc]init]; provRec.status = [NSString
In my viewDidLoad method of my iPhone app I have the following code: zombie[i].animationImages
I am using following code in viewDidLoad method CLLocationManager *locationManager = [[CLLocationManager alloc] init];
I am using gesture recognizers: Initialize in viewDidLoad : UILongPressGestureRecognizer *longPressRecognizer = [[UILongPressGestureRecognizer alloc]
I have two UIbuttons,and I want to implement Longpressgesture on both. So I wrote
I have a pretty funny problem which involves loadView , viewDidLoad , viewWillAppear and
I have a textview that downloads the text from a .txt on my server.
i have trouble with calling one view controller to another view controller using segue
Possible Duplicate: iOS - Passing variable to view controller I have two Viewcontrollers (ViewController1

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.