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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:12:51+00:00 2026-05-25T20:12:51+00:00

I want two cells to log in (User and password). So I run the

  • 0

I want two cells to log in (User and password). So I run the app, everything is ok but when I click in the UITextField “playerTextField” the program received this signal: “EXC_BAD_ACCESS”. 🙁

Do u know why? I’ve tried and read a lot of different ways and it’s like this one how I’am closer to get it.

My code:

To disappear the keyboard if the button Next/Done is pushed.

- (BOOL) textFieldShouldReturn:(UITextField *)textField{
    [textField resignFirstResponder];
    return YES;
}

My UITextFields inside the cells.

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *kCellIdentifier = @"kCellIdentifier";

    UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:kCellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
                                       reuseIdentifier:kCellIdentifier] autorelease];
        cell.accessoryType = UITableViewCellAccessoryNone;



    if ([indexPath section] == 0) {
            playerTextField = [[UITextField alloc] initWithFrame:CGRectMake(110, 10, 185, 30)];
            playerTextField.adjustsFontSizeToFitWidth = YES;
            playerTextField.textColor = [UIColor blackColor];
            if ([indexPath row] == 0) {
                playerTextField.placeholder = @"ejemplo@gmail.com";
                playerTextField.keyboardType = UIKeyboardTypeEmailAddress;
                playerTextField.returnKeyType = UIReturnKeyNext;
                playerTextField.delegate = self;
            }
            else {
                playerTextField.placeholder = @"Requerida";
                playerTextField.keyboardType = UIKeyboardTypeDefault;
                playerTextField.returnKeyType = UIReturnKeyDone;
                playerTextField.secureTextEntry = YES;
                playerTextField.delegate = self;
            }       
            playerTextField.backgroundColor = [UIColor whiteColor];
            playerTextField.autocorrectionType = UITextAutocorrectionTypeNo; // no auto correction support
            playerTextField.autocapitalizationType = UITextAutocapitalizationTypeNone; // no auto capitalization support
            playerTextField.textAlignment = UITextAlignmentLeft;
            playerTextField.tag = 0;


            playerTextField.clearButtonMode = UITextFieldViewModeNever; // no clear 'x' button to the right
            [playerTextField setEnabled: YES];

            //cell.textLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:20.0];
            cell.textLabel.font = [UIFont fontWithName:@"Futura" size:16.0];
            cell.textLabel.textColor = [UIColor darkGrayColor];
            cell.textLabel.shadowOffset = CGSizeMake(0.5, 0.5);
            cell.textLabel.shadowColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:10];

            [cell.contentView addSubview:playerTextField];

            //[playerTextField release];
        }
    }
    if ([indexPath section] == 0) { // Email & Password Section
        if ([indexPath row] == 0) { // Email
            cell.textLabel.text = @"Email";
        }
        else {
            cell.textLabel.text = @"Contraseña";
        }
    }
    else { // Login button section
        cell.textLabel.text = @"Log in";
    }
    return cell;    
}
  • 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-25T20:12:51+00:00Added an answer on May 25, 2026 at 8:12 pm

    “EXC_BAD_ACCESS” errors occur when you try to access an object which has been deallocated. This means, somewhere, the last retained reference to your UITextField is released.

    I don’t see anything in the visible code which would cause such a problem.

    • alloc — retain 1
    • addSubView — retain 2
    • release (you should probably add this back in) — retain 1

    Instruments should help you figure out where the problem occurs. There is an instruments called ‘Zombies’ which is designed for exactly this purpose. When you reach a EXC_BAD_ACCESS it will show you every place in your code where that object was retained and released. From there you can figure out where you released too many times (or maybe forgot to retain it).

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

Sidebar

Related Questions

I want to merge two cells in excel using pyExcelerator , ws.write_merge(r1=0,r2=1,c1=0, c2=0, label='test1',
I want to move cells just as these two methods do: - (void)tableView:(UITableView *)tableView
I have a UITextView and I want have two buttons. When the user taps
I am building a toy app using core data for two entities Log (attributes
I want to sum two cells values. Like i want sum of A1 and
I have a table div that contains two cells. I want the cells to
i want to calculate time difference using excel, between two cells containing numbers in
I have two cells with a string of bits 0111010 and 0101011. I want
I have two cells MIN DATE: 2008-01-01 ($H10) MAX DATE: 2012-02-01 ($H11) I want
Is this even possible? Basically, I want to turn these two calls to sub

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.