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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:57:00+00:00 2026-05-16T23:57:00+00:00

iPhone/iPad SimpleTableViewCells: What replaces the deprecated setImage setText on table cells? The below code

  • 0

iPhone/iPad SimpleTableViewCells: What replaces the deprecated setImage setText on table cells?

The below code gives warnings that setImage and setText are deprecated. So what replaced them? What is the new better way to get this simple behavior?

static NSString *SimpleTableIdentifier = @"SimpleTableIdentifier";
UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier: SimpleTableIdentifier];

if (cell == nil) {
  cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero
       reuseIdentifier: SimpleTableIdentifier] autorelease];
}
cell.image=[UIImage imageNamed:@"Wazoo.png"];;
cell.text = @"Wazoo";

So what is the simplest way to have the same affect as image/text of a cell without doing a lot of work or getting warnings?

  • 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-16T23:57:01+00:00Added an answer on May 16, 2026 at 11:57 pm

    With new release of iOS SDK, setText and setImage properties are deprecated and they are replaced by textLabel.text for setText and imageView.image for setImage…
    With this new properties, your code would be:

    static NSString *SimpleTableIdentifier = @"SimpleTableIdentifier";
    UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier: SimpleTableIdentifier];
    
    if (cell == nil) {
      cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero
           reuseIdentifier: SimpleTableIdentifier] autorelease];
    }
    cell.imageView.image = [UIImage imageNamed:@"Wazoo.png"];;
    cell.textLabel.text = @"Wazoo";

    This properties are usually used when the cell uses preimpostated styles like UITableViewCellStyleDefault, UITableViewCellStyleSubtitle, UITableViewCellStyleValue1 and UITableViewCellStyleValue2 or CGRect…
    If you will display also a subtitle, the code to be used is:

    cell.detailTextLabel.text = @"Your Subtitle Here!";
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an iPhone/iPad app that supports dragging items between table views. Since all
I have the following code being run if an iphone/ipad/ipod is detected: $('.tooltip-trigger').tooltip({offset: [20,
I have a iPhone/iPad app (universal binary) with a regular UIWebView that displays webpages
When thinking about iPhone/iPad applications security, I can notice that there is: Widely available
Possible Duplicate: iPhone/iPad App Code Obfuscation - Is it Possible? Worth it? I have
I am developing a iphone/ipad app. Problem is that when i change the orientation
I have an iPhone/iPad app that I want to port to MacOSX. Most of
If I submit an iPhone/iPad app that downloads HTML based post bodies, that could
On the iPhone/iPad in the general settings they have a list of itms that
I am looking to make an iPhone/iPad/OSX/Windows capable application that wirelessly tracks inventory (primarily

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.