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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:34:35+00:00 2026-05-26T22:34:35+00:00

I am trying to code a reset button, so that when I click on

  • 0

I am trying to code a reset button, so that when I click on that button all the tableview cells’ accessory type get set to none.

I have a clear concept of how to do it, but I am pretty new to iPhone development so I just need help with what methods to call.

The steps I think I need to take: I am iterating through all the rows using a for loop – so I am counting the number of cells (successfully done). My problem is, I have no clue how to check for each of those rows/cells if the accessory type is CheckMark and set it to none.

Alternatively, I can set all of my cells to AccessoryNone, but I am already doing some calculations inside the:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

So I am not sure how can I achieve 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-26T22:34:35+00:00Added an answer on May 26, 2026 at 10:34 pm

    No need to check what the accessoryType is first, just assign UITableViewCellAccessoryNone to all of them. This should work for what you are trying to do:

    // replace clickedResetButton with your action handler method for that button
    - (IBAction)clickedResetButton:(id)sender {
        for (int section = 0, sectionCount = self.tableView.numberOfSections; section < sectionCount; ++section) {
            for (int row = 0, rowCount = [self.tableView numberOfRowsInSection:section]; row < rowCount; ++row) {
                UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:row inSection:section]];
                cell.accessoryType = UITableViewCellAccessoryNone;
                cell.accessoryView = nill;
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have some simple jquery that Im trying to execute on a button click. For
I have an ASP.NET 4.0 page that I'm trying to reset to the top
I am having an issue converting type. I was trying code like this (minimal,
I´m trying to code a tooltip (Yes I know, I have my reasons to
I've been trying to code a Perl script to substitute some text on all
I am trying to adapt the underlying structure of plotting code (matplotlib) that is
I have the following code that will count the elapsed time and print the
I'm trying to reset my form using javascript on client side. The code looks
I am trying to do this. I have 3 radio buttons, If click on
I have the following code that simply uses a jquery ui modal dialog to

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.