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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T07:01:31+00:00 2026-05-17T07:01:31+00:00

I try this code but it’s a mistake because i have a repetition of

  • 0

I try this code but it’s a mistake because i have a repetition of title and description…
Someone can help me please?

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

static NSString *CellIdentifier = @"Cell";

CustomCell *cell=(CustomCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];

if(cell==nil){
    cell=[[[CustomCell alloc]initWithFrame:CGRectZero reuseIdentifier:CellIdentifier]autorelease];
    cell.accessoryType = UITableViewCellAccessoryNone;
}
else{
    AsyncImageView* oldImage = (AsyncImageView*)
    [cell.contentView viewWithTag:999];
    [oldImage removeFromSuperview];


}
NSString *mediaUrl = [[[[self rssParser]rssItems]objectAtIndex:indexPath.row]mediaUrl];
NSString *noimage=@"http://www.notizie-informatiche.com/wp-content/themes/arthemia/images/imagelogo.png";

if([mediaUrl isEqualToString:noimage] == FALSE){
    //DISEGNO IL FRAME PER L'IMMAGINE
    CGRect frameimmagine;
    frameimmagine.size.width=100; frameimmagine.size.height=120;
    frameimmagine.origin.x=0; frameimmagine.origin.y=0;
    AsyncImageView* asyncImage = [[[AsyncImageView alloc] initWithFrame:frameimmagine] autorelease];
    UIImage *myImage = [UIImage imageNamed:@"uknown.jpg"];
    UIImageView *imageView = [[UIImageView alloc] initWithImage:myImage];
    [cell setAccessoryView:imageView];


    //SCARICO L'IMMAGINE

    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
    asyncImage.tag = 999;
    NSURL *url = [NSURL URLWithString: mediaUrl];    
    [asyncImage loadImageFromURL:url];
    [cell.contentView addSubview:asyncImage];
    [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; 
}


//OTTENGO IL TITOLO
//cell.lbltitolo = [[[[self rssParser]rssItems]objectAtIndex:indexPath.row]title];
NSString *titolo = [[[[self rssParser]rssItems]objectAtIndex:indexPath.row]title];
//OTTENFO LA DESCRIZIONE
//cell.lblsottotitolo.text = [[[[self rssParser]rssItems]objectAtIndex:indexPath.row]description];
NSString *descrizione = [[[[self rssParser]rssItems]objectAtIndex:indexPath.row]description];


UILabel *cellatitoloconimmagine=[[UILabel alloc]init];
[cellatitoloconimmagine removeFromSuperview];

UILabel *cellatitolo=[[UILabel alloc]init];
[cellatitolo removeFromSuperview];

UILabel *celladescrizione=[[UILabel alloc]init];
[celladescrizione removeFromSuperview];

UILabel *celladescrizioneconimmagine=[[UILabel alloc]init];
[celladescrizioneconimmagine removeFromSuperview];
/*

[celladescrizioneconimmagine removeFromSuperview];
[celladescrizione removeFromSuperview];
*/
if([mediaUrl isEqualToString:noimage] == FALSE){


    CGRect frametitoloconimmagine = CGRectMake(105.0f, 5.0f, 210, 40);
    cellatitoloconimmagine.frame=frametitoloconimmagine;
    cellatitoloconimmagine.text=titolo;
    cellatitoloconimmagine.textAlignment = UITextAlignmentLeft;
    cellatitoloconimmagine.font = [UIFont boldSystemFontOfSize:16];
    cellatitoloconimmagine.numberOfLines = 2;
    [cell.contentView addSubview:cellatitoloconimmagine];


    CGRect framedescrizioneconimmagine = CGRectMake(105.0f, 55.0f, 210, 50);

    celladescrizioneconimmagine.frame=framedescrizioneconimmagine;
    celladescrizioneconimmagine.text=descrizione;

    celladescrizioneconimmagine.textAlignment = UITextAlignmentLeft;
    celladescrizioneconimmagine.font = [UIFont systemFontOfSize:14];
    celladescrizioneconimmagine.numberOfLines = 3;

    [cell.contentView addSubview:celladescrizioneconimmagine];    

}
else {

 CGRect frametitolo = CGRectMake(5.0f, 5.0f, 310, 40);
 cellatitolo.frame=frametitolo;
 cellatitolo.text=titolo;


 cellatitolo.textAlignment = UITextAlignmentLeft;
 cellatitolo.font = [UIFont boldSystemFontOfSize:16];
 cellatitolo.numberOfLines = 2;

 [cell.contentView addSubview:cellatitolo];


 CGRect framedescrizione = CGRectMake(5.0f, 55.0f, 310, 50);

 celladescrizione.frame=framedescrizione;

 celladescrizione.textAlignment = UITextAlignmentLeft;
 celladescrizione.font = [UIFont systemFontOfSize:14];
 celladescrizione.numberOfLines = 3;

 celladescrizione.text=descrizione;
 [cell.contentView addSubview:celladescrizione];

}

return cell;

}

  • 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-17T07:01:31+00:00Added an answer on May 17, 2026 at 7:01 am

    the cell identifier must be unique for unique cells. It seems you have repeated cells because they are all dequed with name @”cell”. Also remove the “static” word.

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

Sidebar

Related Questions

If you try this code.. you can see the problem I have.. class Embedded(EmbeddedDocument):
I want to make this 1332251639632 to this 1332251639 I try this code, but
This code works when I try it from a .py file, but fails in
This Java code compiles fine, but when I try to run it I get:
I have this code try { //AN EXCEPTION IS GENERATED HERE!!! } catch {
I have this code: try { var _o, _l, i, _d = new Array(),
I want to move image to another x,y position. I try this code but
i have some question. I try this code and recieve Segmentation fault error: #include
I have code that basically looks like this (it isn't actually object, but rather
I have this code. It wasn't obvious at the time, but the code as

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.