首页 > 移动平台 > 详细

IOS各类奇葩问题

时间:2016-04-26 12:20:17      阅读:194      评论:0      收藏:0      [点我收藏+]

1、The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.

解决方法:

    在Info.plist中添加

    <key>NSAppTransportSecurity</key>
    <dict>
      <key>NSAllowsArbitraryLoads</key>
    <true/>
    </dict>

 

2、找不到cococapod添加的第三方框架

解决方法:

  在项目的Target的里设置一下,添加cocoapods头文件目录:目录路径直接写:${SRCROOT},后边选择recursive。

 

3、添加自定义模板

  在此路径下添加 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/iOS/Application/

 

4、<Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

在SDWebImageDecoder.m中添加:

if (!context) {
    if (unsupportedColorSpace) {
        CGColorSpaceRelease(colorspaceRef);
    }
    return image;
}
//after this call:
CGContextRef context = CGBitmapContextCreate(NULL, width,
height, CGImageGetBitsPerComponent(imageRef), 0,  colorspaceRef,kCGBitmapByteOrderDefault | kCGImageAlphaPremultipliedFirst);

 

IOS各类奇葩问题

原文:http://www.cnblogs.com/codelu/p/5434443.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!