Take the 2-minute tour ×

I have two table views with the following declarations.

cAboutUs = [[UITableView alloc] initWithFrame:CGRectMake(85, 272, 227, 30)];

ctableView = [[UITableView alloc] initWithFrame:CGRectMake(85, 302, 227, 100)];    

when i try to add a custom accessory view using the below code, both comes at different locations in cell. (in cAboutUs it is more towards left(x) when compared to the ctableView cell accessory)

UIImage *image = [UIImage imageNamed:@"bullet.png"];

UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
CGRect frame = CGRectMake(0.0, 0.0, image.size.width, image.size.height);
button.frame = frame;

[button setBackgroundImage:image forState:UIControlStateNormal];
cell.accessoryView = button;

I tried the same by using the

cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator

it shows properly with well aligned.

Please help me in solving the bug.

share|improve this question
using the same image for both the table view, how can it create a problem. –  Hanuman May 11 '11 at 9:19
Are you showing both the table view together ? –  Jhaliya May 11 '11 at 9:27

2 Answers 2

It solved by increasing the height of cAboutUs table cell to 40. strange but no reason why it solved.

share|improve this answer

Check the height for the cells in the two table views.

// Make sure height for the cells is the same
share|improve this answer

Your Answer


