4

我正进入(状态:

Assertion failure in -[Cell layoutSublayersOfLayer:], /SourceCache/UIKit_Sim/UIKit-2372/UIView.m:5776
2013-01-06 14:58:42.951 Likely[4588:c07] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Auto Layout still required after executing -layoutSubviews. Cell's implementation of -layoutSubviews needs to call super.'

我写:

-(void)layoutSubviews{
    [super layoutSubviews];
}

在 Cell.m 文件中。但不起作用。我能做些什么?

4

1 回答 1

0

您可以尝试在调用 super 之后添加。

[self layoutIfNeeded];

这将导致:

- (void)layoutSubviews
{
    [super layoutSubviews]; 
    [self layoutIfNeeded]; 
}
于 2015-04-23T23:37:03.177 回答