【发布时间】:2011-05-07 07:06:55
【问题描述】:
我在 UITableViewCell 中创建了 UIButton。它在iphone中正确显示。但是当我为 iPad 升级这个应用程序时,UIbuttons 被移到右侧并从表格的边界出来。这是我的代码
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;
【问题讨论】:
标签: iphone objective-c ipad uitableview uibutton