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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:21:08+00:00 2026-05-19T12:21:08+00:00

In my iPhone app, I am using a single tableview to display different sets

  • 0

In my iPhone app, I am using a single tableview to display different sets of data based on the button clicked.

Now as I am using the same tableView I need to blank out the tableView contents everytime a new button is selected.

And this is quite normal requirement rite? As such it is inefficient to take 7 tables to show 7 different data sets.

Problem:

I have seen that table clears out but when we display some other data in the table then the previous data appears in background as in Screenshot AFTER.
I have tried setting the array as nil and reloading the tableView but then it doesnt seem to work.

What can be a fix for this issue?

I have checked the code and it seems proper to me.

You can refer to the Screen shot to get a better idea of what actually is happening.

BEFORE ( i.e. the first time Event is clicked)

alt text

AFTER (i.e. once the Event category button is clicked after some other category button)

You can clearly see a different image in background where as it should be same as image in above screenshot. This is not a button, I am adding a UIImageView to tableViewCell.

alt text

  • 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-19T12:21:08+00:00Added an answer on May 19, 2026 at 12:21 pm

    NSArray is not mutable, that is, you cannot modify it.

    Instead of using NSArray use NSMutableArray and use

    [mutArr removeAllObjects];

    and then reload the tableView. It worked for me.

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

Sidebar

Related Questions

I'm creating a simple Navigation-based app using core data for my iPhone and I'm
I'm using an NSTimer to do some rendering in an OpenGL based iPhone app.
I’m in the process of designing an iPhone app, using Core Data for data
I'm building an iPhone app that aggregates data from several different data sources and
I am trying to develop a iphone app by using cocos2d. I create a
I have a simple iphone app that's based on the CrashLanding sample app. So
I've tested my iPhone app on the iPhone. Now I want to test it
For an iPhone app that submits images to a server I need somehow to
I have a rather simple iPhone app consisting of numerous views containing a single,
I am creating an iphone app and wanted to know if using NIB files

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.