IOS:AutoLayout UITableView -> UITableViewCell 未显示正确的大小

标签 ios uitableview autolayout

基本上,我试图弄清楚为什么单元格不会一直走到设备宽度的末端。在 iPhone6 上,它的宽度仍然显示为 320 而不是 375。这里 http://1drv.ms/1E7Nrqp是我创建的示例项目。

谢谢, 嘿嘿

最佳答案

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {

         self = [[[NSBundle mainBundle] loadNibNamed:@"TableViewCell" owner:self options:nil] lastObject];


    }
    return self;
}

在TableViewCell.m中写入上面的代码

关于IOS:AutoLayout UITableView -> UITableViewCell 未显示正确的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26175405/

相关文章:

ios - 现有应用在使用 Size Classes 时需要 UIScrollView

iphone - iOS:具有单个选择器的多个 UIMenuItems

ios - UITableView 使用 beginUpdates()/endUpdates()/performBatchUpdates() 意外反弹

ios - 使用动画移动 UiTableView

ios - 具有 iOS 自动布局的 uiscrollview 的全宽 subview

ios - 自动布局动画问题

ios - 使用 TestFlight 的 iOS 应用程序大小意外增加

iOS 5.1 UIView调用 super ViewController的选择器

iphone - 删除 UITableView 中 UINavigationController 上方的灰色条

ios - Swift 从 UITableView 呈现弹出窗口运行速度非常慢