iOS 经验笔记

作者: Sandy苗 | 来源:发表于2017-06-06 17:21 被阅读0次

    1、 CABasicAnimation 按home键切到后台之后,再按home键回来动画就停止了

    解决办法:

    CABasicAnimation *animation= [CABasicAnimation animationWithKeyPath:@"transform"]; 
    
    animation.removedOnCompletion = NO;
    

    2、iOS 10.3系统 用

    NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]
    

    给文本添加删除线没有效果,

    解决方法:添加

    NSBaselineOffsetAttributeName:[NSNumber numberWithInteger:NSUnderlineStyleSingle],
    

    可行。

    例:iOS 10.3 以前:

    NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle],
    
    NSForegroundColorAttributeName:[UIColor grayColor],
    
    NSFontAttributeName:[UIFont systemFontOfSize:15]};
    

    iOS 10.3以后:

    NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle],
    
    NSBaselineOffsetAttributeName:[NSNumber numberWithInteger:NSUnderlineStyleSingle],
    
    NSForegroundColorAttributeName:[UIColor grayColor],
    
    NSFontAttributeName:[UIFont systemFontOfSize:15]};
    

    3、iOS NSHomeDirectory() 下面上个文件夹的意义
    1、Documents :保存应用运行时生成的需要持久化的数据,iTunes同步设备时会备份该目录。例如,游戏应用可将游戏存档保存在该目录
    2、3、iOS NSHomeDirectory() 下面上个文件夹的意义
    1、Documents:保存应用运行时生成的需要持久化的数据,iTunes同步设备时会备份该目录。例如,游戏应用可将游戏存档保存在该目录
    2、Library/Caches:保存应用运行时生成的需要持久化的数据,iTunes同步设备时不会备份该目录。一般存储体积大、不需要备份的非重要数据
    3、Library/Preference:保存应用的所有偏好设置,iOS的Settings(设置)应用会在该目录中查找应用的设置信息。iTunes同步设备时会备份该目录
    4、tmp:保存应用运行时所需的临时数据,使用完毕后再将相应的文件从该目录删除。应用没有运行时,系统也可能会清除该目录下的文件。iTunes同步设备时不会备份该目录

    4、Xcode报错信息
    添加SDK报错:
    You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    解决:


    屏幕快照 2017-06-22 上午9.34.45.png

    设置为NO

    5、Xcode报错信息
    添加SDK报错:c++找不到
    解决:


    屏幕快照 2017-06-22 上午9.57.17.png

    6、集成SDK
    http://www.jianshu.com/p/92876a275f7f
    http://blog.csdn.net/dreamermjs/article/details/52127530
    http://www.jianshu.com/p/c131baae4307

    6.1 打开终端,用下面指令合成一下到桌面,方便使用。
    lipo -create 模拟器中.a的路径 真机中.a的路径 -output /Users/mac/Desktop/libXXX.a
    例如:
    lips(这里是空格,没括号)-create(这里是空格,没括号)/Users/mac/Library/Developer/Xcode/DerivedData/StaticLibraryNameSDK-fgfhddoykewmwkdnsmoesvcphdsk/Build/Products/Debug-iphonesimulator/libStaticLibraryNameSDK.a(这里是空格,没括号)/Users/mac/Library/Developer/Xcode/DerivedData/StaticLibraryNameSDK-fgfhddoykewmwkdnsmoesvcphdsk/Build/Products/Debug-iphoneos/libStaticLibraryNameSDK.a(这里是空格,没括号)-output(这里是空格,没括号)/Users/mac/Desktop/libStaticLibraryNameSDK.a
    输入后,回车即可,桌面上生成的.a就是所需要的了。

    相关文章

      网友评论

        本文标题:iOS 经验笔记

        本文链接:https://www.haomeiwen.com/subject/rncnfxtx.html