iOS 經驗筆記

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.itdecent.cn/p/92876a275f7f
http://blog.csdn.net/dreamermjs/article/details/52127530
http://www.itdecent.cn/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就是所需要的了。

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
【社區(qū)內容提示】社區(qū)部分內容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內容

友情鏈接更多精彩內容