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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:13:42+00:00 2026-06-01T01:13:42+00:00

I have an interesting trouble: I have a NSArray which is populated with some

  • 0

I have an interesting trouble:

I have a NSArray which is populated with some animals name (strings). And I use this array to populate UITableView. When you press on any cell (animal), you move in a detail view and you read more about this animal. Then, I improved my app and now in UITableView the first cell is the cell which just says how many animals in the UITableView. Its like:

Animals found: 4 (first cell)

  • Dog (second cell)
  • Cat (third cell and etc.)
  • Hamster
  • Snake

The problem is, that when you press on the first cell (Animals found: 4) you move in the detail view of a random animal. It happens because in the array at index 0 there is an animal. Therefore, you move in the detail view of this animal. I don’t want to do anything when user presses the first cell. How can I reach it ?

  • 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-01T01:13:43+00:00Added an answer on June 1, 2026 at 1:13 am

    I think the better solution is to represent in your model what you want to see in your views. So I would do it like this:

    myModel = [NSMutableArray arrayWithObjects:@"3 animals", @"dog", @"cat", @"chicken", nil];
    // here, wherever else my model is altered:
    [myModel replaceObjectAtIndex:0 withObject:[NSString stringWithFormat:@"%d animals", myModel.count-1]];
    

    Now no special logic is required anywhere else except as @Praveen-K suggests when configuring cell at indexPath.row = 0…

    cell.userInteractionEnabled = NO;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one interesting problem. I must parse mail body (regular expression), get some
I have some interesting problem for an hour.. In my flex project, all width
I have run into trouble trying to implement functionality for serializing some classes in
I have some trouble using an Ajax query in a Rails + JQuery ecosystem.
I have an interesting situation - I have a table row which, currently, shows
This is probably stupid simple, but for some reason I'm having trouble getting it
Googled out- could use some help here. I followed this excellent tutorial here (http://www.malteahrens.com/#/blog/howto-onenote-dev/)
I have an interesting conundrum which I believe can be solved in purely SQL.
I'm adding a Facebook Like Box on my webpage and have some trouble with
I have somewhat interesting development situation. The client and deployment server are inside a

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.