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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:19:07+00:00 2026-05-29T05:19:07+00:00

My for statement seems to be returning more than it should be, and causing

  • 0

My for statement seems to be returning more than it should be, and causing an error. Here is the code…

for (BookCustomCell *bcc in [self.tableView subviews])
{
    if (bcc.rowIDTag == [bookID intValue])
    {
        //Do something here.
    }
}

As I step through this everything seems to be fine. It goes through the For statement four times, and each time bcc.rowIDTag exists and has a value. It then goes through it a fifth time. bcc.rowIDTag does not exist and as a result it crashes (SIGABRT).

  1. Why would it be going through a fifth time?
  2. Conceptually, what am I missing? (The way I understand things it finds all the
    BookCustomCells in the tableView subviews and then iterates through each of them. Is that correct?)
  3. Is there a better way to accomplish my goal? (I have a tableview with multiple rows. Each
    row has multiple buttons which are in a custom cell. When I click a button I need to act upon all of the other buttons within that one row/cell.)

(None of this programming stuff is coming easy for me, but I’m bound and determined to learn it. Thanks for your help.)

  • 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-29T05:19:08+00:00Added an answer on May 29, 2026 at 5:19 am

    Your code is wrong, UITableView contains some subviews that are not UITableViewCell‘s, that’s why you’re getting SIGABRT crashes.

    for (BookCustomCell *bcc in [self.tableView visibleCells])
    {
        if (bcc.rowIDTag == [bookID intValue])
        {
            //Do something here.
        }
    }
    

    This should do the trick.

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

Sidebar

Related Questions

This code does not work, returning the error: BEGIN CREATE VIEW [dbo].[dummy] AS SELECT
I can't believe that the following statement seems to be still true So, I
Is it possible to use the with statement directly with CSV files? It seems
SQL statement: INSERT INTO order (`ORDER_ID`,`SALE_CODE`,`CREATED_AT`,`UPDATED_AT`) VALUES ('2646253286','HPHS20','2009-07-11 12:07:40','2009-07-11 12:07:40') Error: You have an
I had the 1nd statement in my code and found it not giving an
I'm getting an error from a deterministic PG function that seems dependent based on
I'm having a problem understanding what I'm doing wrong here. I have the code
I was reading a piece of code from the XStreamingReader library (which seems like
Since this seems more of a syntax question, my search didn't produce any useful
I have an annoying SQL statement that seem simple but it looks awfull. I

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.