出现Assertion failure in -[***** layoutSublayersOfLayer:]
在自定义的view中使用了[self layoutIfNeeded]方法,在iOS8\9上都没有错误,但是在iOS7上出现了页面错乱,解决方案就是在自定义的view里面添加如下代码:
+ (void)load
{
Method existing = class_getInstanceMethod(self, @selector(layoutSubviews));
Method new = class_getInstanceMethod(self, @selector(_autolayout_replacementLayoutSubviews)); method_exchangeImplementations(existing, new);
} - (void)_autolayout_replacementLayoutSubviews
{
[super layoutSubviews];
[self _autolayout_replacementLayoutSubviews]; // not recursive due to method swizzling
[super layoutSubviews];
}
出现Assertion failure in -[***** layoutSublayersOfLayer:]的更多相关文章
- Assertion failure in -[UIView layoutSublayersOfLayer:]
Assertion failure in -[UIView layoutSublayersOfLayer:], /SourceCache/UIKit/UIKit-2935.137/UIView.m:8 ...
- Assertion failure layoutSublayersOfLayer:], /SourceCache
现象:代码在simulator上能够正常运行但是在真机上出现 Assertion failure in -[UIView layoutSublayersOfLayer:], /SourceCache/ ...
- Assertion failure in UITableViewCell layoutSublayersOfLayer解决办法
iOS6 设备在更新UITableViewCell的时候遇到了 Assertion failure in -[UITableViewCell layoutSublayersOfLayer:], /So ...
- Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]
今天遇到了Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]这个错误,一直也没有百度,不料想却弄了一个 ...
- Assertion failure in -[UITableView _classicHeightForRowAtIndexPath:], /SourceCache/UIKit_Sim/UIKit-3318/UITableView.m:10772
Assertion failure in -[UITableView _classicHeightForRowAtIndexPath:], /SourceCache/UIKit_Sim/UIKit-3 ...
- ios AFNetworking 3.0 报错 : *** Assertion failure in -[AFHTTPRequestSerializer requestWithMethod:URLString:parameters:error:],
AFNetWorking[:] *** Assertion failure -- :::] *** Terminating app due to uncaught exception 'NSInter ...
- *** Assertion failure in -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory
报错提示: *** Assertion failure in -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndex ...
- iOS Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.30.14/UITableView.m:7962
Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /BuildRoot/Library/Cac ...
- 解决:CWnd::SetWindowText报Assertion failure
参考资料: http://www.cnblogs.com/tiancun/p/3756581.html http://www.tc5u.com/mfc/2120698.htm http://forum ...
随机推荐
- 《理解 ES6》阅读整理:函数(Functions)(二)Unnamed Parameters
使用未命名参数(Working with Unnamed Parameters) JavaScript并不限制传递给函数的实参个数,你可以总是传递比形参个数多或者少的实参.在ES6中当向函数传递比形参 ...
- [C++] socket - 4 [线程同步 简单例子]
/*WINAPI 线程同步*/ #include<windows.h> #include<stdio.h> DWORD WINAPI myfun1(LPVOID lpParam ...
- centos 6.5卸载Mysql
yum remove mysql mysql-server mysql-libs mysql-server
- VirtualBox安装Ubuntu教程
1.VirtualBox虚拟机安装,及VirtualBox安装Ubuntu教程VirtualBox版本为VirtualBox-4.3.12-93733-Win.exe,Ubuntu版本为ubuntu- ...
- JavaScript 闯关记
DOM(文档对象模型)是针对 HTML 和 XML 文档的一个 API.DOM 描绘了一个层次化的节点树,允许开发人员添加.移除和修改页面的某一部分. 节点层次 DOM 可以将任何 HTML 或 XM ...
- Javascript--练习(包括主界面图片轮播效果)
练习一 例子1:做一个问题,如果输入的答案正确则弹出正确,错误弹出错误: 这里在text里面写了一个daan属性,里面存了答案的值,点击检查答案的时候cheak输入的内容和答案是否一样: Body中代 ...
- sublime text配置记录
代码编辑器有一直都有在尝试新的,如brackets/vs code/webstrom,最后还是用回sublime,每次要重新安装的时候都需要上网搜索相关配置资料,特些记录,以备下次使用: 下载地址 下 ...
- iOS开发---百度地图配置流程,2.6.0 版本 支持64位
1.首先需要在百度地图下载最新SDK:地址: http://developer.baidu.com/map/index.php?title=iossdk/sdkiosdev-download 2. ...
- iOS开发-友盟分享使用(2)
1.友盟SDK提供功能:分享喜欢的东西到新浪微博.qq空间.为微信朋友圈等等等等社交圈. 2.友盟分享前期准备 (1)注册账号 去官网 (2)创建应用获取appkey 类似5556a53667e*** ...
- vbscript调用WMI一键式式发布网站
作为.net开发,在window环境下,不得不熟悉些脚本语言,来减轻些日常开发中所遇到的一些繁杂的事情,比如自动发布网站,自动发布网站等等. WMI windows管理程序接口,可用各种与语言调用,方 ...