标签:
最近做了iOS 9的适配,程序出现大量警告也做了些处理,写出来分先给大家。
一、iOS 9适配
问题一:
<Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
[[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleLightContent];
以前我们通过上面代码改变状态了颜色[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
问题二:
-canOpenURL: failed for URL: "weixin://app/wx9c8771d3c07dfd30/" - error: "This app is not allowed to query for scheme weixin"
解决办法:
1 - (void)layoutSubviews { 2 [super layoutSubviews]; 3 CGFloat availableLabelWidth = self.label.frame.size.width;
self.label.preferredMaxLayoutWidth = availableLabelWidth; 4 [super layoutSubviews]; 5 }
The first call to [super layoutSubviews]
will evaluate the constraints on the label (since it’s a direct subview) and change its frame accordingly. At this point the width is useful, but the height is not; the height was set using the label’s intrinsic content size, which in turn relied on a preferred max layout width value that is now stale.
[super layoutSubviews]
again.style=“plain"
2.修改<barButtonItem key="rightBarButtonItem" style="plain" id="juB-DL-F9i">
为
<barButtonItem key="rightBarButtonItem" id="juB-DL-F9i">
style=“plain"
标签:
原文地址:http://www.cnblogs.com/worldtraveler/p/4877694.html