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

  • Home
  • SEARCH
  • 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 8845391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:43:43+00:00 2026-06-14T11:43:43+00:00

I have a table displaying items. Each cell has a button that is used

  • 0

I have a table displaying items. Each cell has a button that is used to display something else about the item. In order to track what is being displayed (used in the parent view as the table is in a modal), I set the button to be selected.

My issue is that I want to ensure only ONE button is “selected” at a time. So if user taps button A, then later taps button B, how can I “deselect” button A?

Again, the buttons are embedded in each cell, so how can I iterate through each cell and disable the buttons (WITHOUT reloading the table data)?

  • 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-14T11:43:45+00:00Added an answer on June 14, 2026 at 11:43 am

    I guess you save the information about wether a button is pressed or not out of the button. You have to do so, because the cells can be reused, and so if you only save this info in the selected property of a button, it will be lost if the cell is being reused.

    Taking into account that you have the index of the selected button cell saved somewhere, you can iterate through all the visible cells in the UITableView using visibleCells
    method. For each UITableViewCell, you disable the button if its index is not the one you want. Use indexPathForCell: to check the index.

    And you should be good. Of course, everytime the dataSource asks for a cell, check if the indexPath is the selected and if so, set the button.selected to YES.

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

Sidebar

Related Questions

I'm missing something fundamental here. I have a table view with each cell displaying
I have table of data that is sorted as follows: Item | Sample |
I have an HTML <TABLE> displaying a list of items in the rows of
I have a CATEGORIES table that links to an ITEMS table (one to many).
I have a table called States and i am displaying values of states in
I have an NSFetchedResultsController displaying places in a table view, but when I update
I have a View controller displaying some information (not table views). I have an
Anyone have sugestion or example on how displaying Google Datastore records table with pagination
I have table with around 70 000 rows. There is 6000 rows that i
Possible Duplicate: Displaying a table in PHP with repeated columns I want to display

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.