iOS:在iOS 7.1上我的子类UITabBarController上有更多选项卡崩溃 [英] iOS: More tab crashes on my subclassed UITabBarController on iOS 7.1
本文介绍了iOS:在iOS 7.1上我的子类UITabBarController上有更多选项卡崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只是更新到iOS 7.1,我得到一个名为_layoutCells的函数无法识别的选择错误。
I simply updated to iOS 7.1 and I get an unrecognized selection error for a function called "_layoutCells".
我有一个简单的UITabBarController子类。
I have a simple subclass of UITabBarController.
推荐答案
请注意,在找到更好的解决方案或解释之前,这是一个避免严重崩溃的黑客攻击。我虽然应该分享它。
Note that this is a hack to avoid a bad crash until a better solution or explanation is found. I though I should share it.
只需将以下方法添加到您的UITabBarController子类实现中:
Simply add the following method to your UITabBarController subclass implementation:
- (void) _layoutCells
{
// HACK ALERT: on iOS 7.1, this method will be called from deep within the bowels of iOS. The problem is that
// the method is not implemented and it results in an unrecognized selected crash. So we implement it...
//
// What could go wrong?
}
这篇关于iOS:在iOS 7.1上我的子类UITabBarController上有更多选项卡崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文