I created UIButtons in a UITableViewCell. It displays correctly on iphone. But when I update this app for iPad, UIbuttons shifts to the right and leaves the table border. Here is my code
UIButton *button2 = [UIButton buttonWithType:UIButtonTypeCustom];
[button2 setFrame:CGRectMake(47.0f, 100.0f, 16, 16.0f)];
[button2 setImage:[UIImage imageNamed:@"Delete.png"] forState:UIControlStateNormal];
[button2 addTarget:self action:@selector(delete:) forControlEvents:UIControlEventTouchUpInside];
[cell addSubview:button2];
return cell;
source
share