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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:44:09+00:00 2026-06-03T08:44:09+00:00

I want to show a custom checkmark and uncheckmark image for tableview cell when

  • 0

I want to show a custom checkmark and uncheckmark image for tableview cell when user select any row and when a new row is inserted cell is loaded with uncheckmark image.

Once I check the row then even after reloading table with new data I want to display a previously checked row as it is and new as unchecked.

How can I get all rows with checked mark at end.

I tried but I am not able to load first time with custom checkmark image I can change when row is deselected but its also having some issues as it is not consistently working as I mentioned above.

-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{

    return 1;

 }

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{

   return [cardData.mArrRecipient count];

 }

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

    static NSString * sCellIdentifier = @"cell";
    NSLog(@"cellforrow");


    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:sCellIdentifier];
    if (cell == nil) 
{
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:sCellIdentifier] autorelease];

    RecipientData *recipientData = [[cardData.mArrRecipient objectAtIndex:indexPath.row]autorelease];
    cell.textLabel.text = recipientData.sRecipientFName;
} 
cell.accessoryType=UITableViewCellAccessoryNone;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}

 -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
 {

    if (IndexPath) 
    {
        UIImageView *imageView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"img_checkmark_red.png"]] autorelease];
        [tableView cellForRowAtIndexPath:indexPath].accessoryView = imageView;
        IndexPath=FALSE;
    }
    else 
    {
        UIImageView *imageView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"img_uncheckmark_red.png"]] autorelease];
        [tableView cellForRowAtIndexPath:indexPath].accessoryView = imageView;
        IndexPath=TRUE; 
    }
  }


  -(void)viewWillAppear:(BOOL)animated
  {

[super viewWillAppear:animated];   
if ([cardData.mArrRecipient count]>0) 
{
    [IBTblNewRecipientDetail reloadData];        
}
 }

can any one help me on this??

  • 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-03T08:44:10+00:00Added an answer on June 3, 2026 at 8:44 am

    here is tutorial
    http://weheartgames.com/2009/06/simple-iphone-checkbox/

    or use this

      UIButton   * checkBox=[UIButton buttonWithType:UIButtonTypeCustom];
            checkBox.tag=indexPath.row;
            checkBox.frame=CGRectMake(270,15, 20, 20);
            [cell.contentView addSubview:checkBox];
            [checkBox setImage:[UIImage imageNamed:@"selectedBoxWith.png"] forState:UIControlStateNormal];
            [checkBox addTarget:self action:@selector(checkBoxClicked:) forControlEvents:UIControlEventTouchUpInside];
    
    -(void)checkBoxClicked:(id)sender{
    if(self.isChecked ==NO){
      self.isChecked =YES;
      [sender  setImage:[UIImage imageNamed: @"selectedBoxWithTik.png"] forState:UIControlStateNormal];
    }else
    {
       self.isChecked =NO;
      [sender setImage:[UIImage imageNamed:@"selectedBoxWith.png"]forState:UIControlStateNormal];
    
        }
    }
    
    
    and 
    
    -(void)checkBoxClicked:(id)sender{
    
        UIButton *tappedButton = (UIButton*)sender;
    
        if([tappedButton.currentImage isEqual:[UIImage imageNamed:@"selectedBoxWith.png"]]) {
            [sender  setImage:[UIImage imageNamed: @"selectedBoxWithTik.png"] forState:UIControlStateNormal];
        }
    
        else {
            [sender setImage:[UIImage imageNamed:@"selectedBoxWith.png"]forState:UIControlStateNormal];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to show a custom image with some data in it while clicking
I want to show my custom objects (images, formulas) in UITableView row name. Is
I've a table view. In each cell (row), i want to show two buttons.
I want to show my own custom image for facebook connect. How can I
i want to add custom EditingAccessoryView in cell, when user swipe in place of
When we simply want to show an image defined by a custom field (say
I am using Delphi, and I want to show custom text in the buttons
I want my Application to show Custom Dialog When an Uncatch Exception occur. For
I have a custom control (C#, visual studio). I want to show a tooltip
I want to show in my custom title bar on which Page i am

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.