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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:18:21+00:00 2026-05-29T17:18:21+00:00

The self.tablePicture array only seems to repeat the first item star_white.png the other colours

  • 0

The self.tablePicture array only seems to repeat the first item “star_white.png” the other colours etc with the self.tableData array and cannot understand why… any ideas why?

- (id)init
{
self = [super init];
if (self) {
    // Custom initialization
    self.tableData = [NSArray arrayWithObjects:@"continent", @"region", @"country", @"city", @"town", @"district", @"borough", nil];
    self.tablePicture = [NSArray arrayWithObjects:@"star_white.png", @"star_blue.png", @"star_red.png", @"star_green.png", @"star_purple.png", @"star_orange.png", @"star_black.png", nil];
    CGRect frame = self.view.bounds;
    frame.size.height -= 100;
    self.tableView = [[UITableView alloc] initWithFrame:frame style:UITableViewStyleGrouped];
    [self.tableView setBackgroundColor:[UIColor clearColor]];
    [self.tableView setDataSource:self];
    [self.tableView setDelegate:self];
    [self.tableView setScrollEnabled:NO];

    [self.view addSubview:self.tableView]; 
}
return self;
}

and

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellIdentifier = @"ITSectionIdentifier";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (!cell) {
    cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIdentifier];
}

// modify cell
NSString *name = [self.tableData objectAtIndex:indexPath.section];
[cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
[cell.textLabel setText:name];
cell.imageView.image = [UIImage imageNamed:[tablePicture objectAtIndex:indexPath.row]];
cell.backgroundColor = [UIColor clearColor];

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-29T17:18:23+00:00Added an answer on May 29, 2026 at 5:18 pm

    They are all in section 0.

    NSString *name = [self.tableData objectAtIndex:indexPath.section];
    

    Try

    NSString *name = [self.tableData objectAtIndex:indexPath.row];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need someones help to declare the following array:- self.tablePicture = [NSArray arrayWithObjects:@pic1.png, @pic2.png,
self.boxesOnLift = [NSMutableArray array]; [self init]; [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@Animation.plist]; NSMutableArray *walkAnimFrames = [NSMutableArray array];
self.refreshControl.tintColor = [UIColor blueColor];//this just only change it color Can I change the drop-down
[self.scrollView addSubview:[self.minkyImageView initWithImage:[UIImage imageNamed:@monkey_1.png]]]; I am adding an image to a scrollview like the
self.background = [CCSprite spriteWithFile:@LetterBrick.png]; CCLOG(@background contentSize: (w: %d, h: %d), self.background.contentSize.width, self.background.contentSize.height); CCLOG(@background boundingBox:
self.button = gtk.Button(stock=gtk.STOCK_DELETE) Only Shows: Delete
Pretty self-explanatory. The array is of an integral type, the contents are known and
Using self.GetParent().FindWindowById(wx.ID_FORWARD).Disable() I am able to disable the next button altogether, but I only
.m self.elements=[myElements getElements]; imagesElements = [[NSMutableArray alloc]init]; for(ElemetsList *item in self.elements) { UIImageView *oneelement
Pretty self explanatory question. Is there any reason to use one or the other?

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.