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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:45:55+00:00 2026-05-13T13:45:55+00:00

I have one last problem that is killing me. I am playing around with

  • 0

I have one last problem that is killing me.
I am playing around with an older project which used the tableView:accessoryTypeForRowWithIndexPath method, of which i am trying to rewrite the app without it.

I have deleted the tableView:accessoryTypeForRowWithIndexPath method, but my solution isnt working just yet.

The problem is that now when I press the ‘Edit’ button on my DetailViewController View, the ‘editing’ accessory types dont show.

Below is my actual code, and I have also included the project file for this, because I am desperate for a solution that works.

My question is, what code do I have to change, to get the accessory to change, and no other effects. (I know the RootViewController works, but how can i get the DetailViewController table to do the same?)

Regards, @norskben

Project File Download: Get it here.

setEditing

- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
    [super setEditing:editing animated:animated];
    [self.navigationItem setHidesBackButton:editing animated:animated];

    [tableView reloadData];
}

cellForRowAtIndexPath

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

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
        cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
        cell.editingAccessoryType = UITableViewCellAccessoryCheckmark;
    }

    switch(indexPath.section) {
        case 0:
            cell.textLabel.text = coffeeObj.coffeeName;
            break;
        case 1:
            cell.textLabel.text = [NSString stringWithFormat:@"%@", coffeeObj.price];
            break;
    }

    return cell;
}

Project File Download: Get it here.

  • 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-13T13:45:55+00:00Added an answer on May 13, 2026 at 1:45 pm

    In your setEditing:animated: method you are doing two things that you are really not supposed to do. Reloading the table data there makes no sense. And if you have to change the buttons in your tab bar manually then you have not set them up properly. The system takes care of that for you. If you have properly setup an edit button then you don’t even manually have to call setEditing:animated: actually.

    I think you should review some UITableView sample code.

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

Sidebar

Related Questions

I have a script that works great, but I have one small problem. I
I am facing one problem from last one week. I have one list having
I'm nearly done with a trackback system for my website, but have one last
We are currently evaluating upgrading from XP to Windows 7, but have one last
I have first names stored in one table and last names stored in another.
I have been busy integrating Wordpress to one of a CakePHP application.Last Monday I
have one time consuming step that flattens a bunch of files. basically i'd like
I have one project with is developed in Php and javascript. How to open
I have one table that has sales records and another table that has additional
I have one database table which contains 8 columns. One of the columns is

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.