CustomCell崩溃的UITableView [英] CustomCell crash in UItableView

查看:114
本文介绍了CustomCell崩溃的UITableView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用 customCell.xib 与自己的 customCellClass 中的的UITableView ,这是不使用内置的autoLayout 功能(因为我需要做出的平台上它的工作 iOS6的)。
在其数据源方法的UITableView 取这个定制的厦门国际银行的细胞。
我现在面临的困境是,在的UITableView 崩溃的我跑,但执行时突然次50%,并显示tabeview时代的完美休息..

我米目前使用X code ++ 4.5。

下面是崩溃日志我收到..


  

自动布局执行-layoutSubviews后仍然需要。
  的UITableViewCell的实施-layoutSubviews的需要调用
  超级



解决方案

这已经覆盖在一些细节在这里,它不是简单,只要简单地调用[超级layoutSubviews];

<一个href=\"http://stackoverflow.com/questions/12610783/auto-layout-still-required-after-executing-layoutsubviews-with-uitableviewcel\">"Auto布局执行-layoutSubviews&QUOT后仍然需要;与子类的UITableViewCell

尝试禁用translatesAutoresizingMaskIntoConstraints每个的观点。自动布局以某种方式被触发,并导致在UITableView的这个bug流行起来。

I have been using a customCell.xib with its own customCellClass within a UITableView,which is built without using autoLayout feature(since I need to make it work even on platforms prior to iOS6). The UITableView fetches this custom made xib cell in its dataSource method. The dilemma I'm facing is that the UITableView crashes abruptly 50 % of times I run it but executes and shows the tabeview perfectly rest of the times..

I m currently using XCode 4.5.

Here's the crash Log i receive ..

'Auto Layout still required after executing -layoutSubviews. UITableViewCell's implementation of -layoutSubviews needs to call super.'

解决方案

This has been covered in some detail here, and it is not as simple as simply calling [super layoutSubviews];

"Auto Layout still required after executing -layoutSubviews" with UITableViewCell subclass

Try disabling 'translatesAutoresizingMaskIntoConstraints' on each of your views. Auto Layout is somehow being triggered, and that causes this bug on UITableView to pop up.

这篇关于CustomCell崩溃的UITableView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆