Wednesday, 11 September 2013

Table view cell Accessory type Check mark in custom place

Table view cell Accessory type Check mark in custom place

Here is my code,
UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"Cell"];
cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:@"Cell"];
if ([cell.textLabel.text isEqualToString:@"Small" ]) {
cell.imageView.image=nil;
cell.accessoryView = nil;
cell.accessoryType=UITableViewCellAccessoryCheckmark;
return cell;
}
But checkmark is adding to the right corner of the cell I want to add it
to another position inside the cell, place like below,
[[chkmrk alloc]initWithFrame:CGRectMake(200, -4, 100, 50)];

No comments:

Post a Comment