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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:05:09+00:00 2026-05-15T07:05:09+00:00

I have a simple UITableView, and I want to add a checkmark whenever I

  • 0

I have a simple UITableView, and I want to add a checkmark whenever I select a row. I have only one section in my table.

SampleTable.h

@interface SampleTable : UITableView <UITableViewDelegate , UITableViewDataSource>
{
    NSMutableArray *itemArray;
    NSString *itemValue;



}

@property (nonatomic,retain) NSMutableArray *itemArray;
@property (nonatomic,retain) NSString *itemValue;
-(NSMutableArray *) displayItemArray;
@end

SampleTable.m

#import "SampleTable.h"


@implementation DropTableView

@synthesize itemArray,itemValue;


-(id)initWithFrame:(CGRect)frm  
{

    if(self=[super initWithFrame:frm])
    {


    [self displayItemArray];
    self.delegate=self;
    self.dataSource=self;
    self.separatorStyle=UITableViewCellSeparatorStyleNone;
}
return self;
}

-(NSMutableArray *) displayItemArray { 

if(itemArray==nil) { 

    itemArray=[[NSMutableArray alloc] initWithObjects:@"1",@"2",@"3",@"4",@"5",@"6",@"7",nil];

}

return itemArray;

}


#pragma mark Table view methods


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

return 1;

}


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

return [self.itemArray count];
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell= [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell==nil) {
    cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle
                                  reuseIdentifier:CellIdentifier];
    [cell autorelease];
}
[self flashScrollIndicators];
self.scrollEnabled=YES;
[self showsVerticalScrollIndicator];

cell.textLabel.text = [self.itemArray objectAtIndex:indexPath.row];

return cell;
}

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

//stuff

} 

-(void) dealloc
{

[itemValue release];
[itemArray release];
[super dealloc];
}
@end
  • 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-15T07:05:10+00:00Added an answer on May 15, 2026 at 7:05 am

    See both links and then you will get a solution for this problem.

    http://www.iphonedevsdk.com/forum/iphone-sdk-development/5112-checkbox-button-iphone-application.html

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

     I hope it will help you.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have simple regex \.*\ for me its says select everything between and ,
Should simple JavaBeans that have only simple getters and setters be unit tested?? What
I have a simple question. I have a normal UITableViewController displaying a UITableView. When
Hey Simple little app for educational purposes, its a simple uitableview and I want
I have a UITabbar with multiple view controllers. One of them is a UITableView.
I have a fairly simple iPhone app that downloads a set of UITableView results
It is my fervent dream to have a UITableView with different row sizes, determined
I have got an UITableView. How to simply fill it with three elements, for
Ok, i have simple scenario: have two pages: login and welcome pages. im using
In general, is it a best practice to have simple POJO Java classes implement

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.