Подтвердить что ты не робот

Исключение исключения UITableViewCell

Я обновляю проект до iOS 8 и работаю над этой проблемой с одной из моих реализаций UITableViewCell. В настоящее время на симуляторе, а не на устройстве, он установлен на "iPhone 6".

*** Assertion failure in -[UITableViewCell _setHostsLayoutEngine:], /SourceCache/UIKit_Sim/UIKit-3318/NSLayoutConstraint_UIKitAdditions.m:2754
2014-09-15 10:43:52.890 BasketballStatTracker[10662:304085] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Must translate autoresizing mask into constraints to have _setHostsLayoutEngine:YES.'

Нечетная часть заключается в том, что я использую этот пользовательский подкласс UITableViewCell во всех моих других UITableViews, и он отлично работает без каких-либо утверждений.

Вот реализация cellForRowAtIndexPath: реализация.

MyTableCell *cell =(MyTableCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
    cell =[[MyTableCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}

Вот трассировка стека

0   CoreFoundation                      0x000000010844e3f5 __exceptionPreprocess + 165
1   libobjc.A.dylib                     0x00000001080e7bb7 objc_exception_throw + 45
2   CoreFoundation                      0x000000010844e25a +[NSException raise:format:arguments:] + 106
3   Foundation                          0x0000000107ac228f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4   UIKit                               0x0000000106de2e1c -[UIView(AdditionalLayoutSupport) _setHostsLayoutEngine:] + 188
5   UIKit                               0x00000001069e7d92 -[UITableViewCell _setupTableViewCellCommon] + 333
6   UIKit                               0x00000001069e84d7 -[UITableViewCell initWithCoder:] + 109
7   UIKit                               0x0000000106b8a996 UINibDecoderDecodeObjectForValue + 705

Любые идеи?

4b9b3361

Ответ 1

Я нашел ошибочный UITableViewCell, который был помещен в иерархию представлений проблемного .xib. Исправлена ​​проблема.