Xcode - 使用条件搜索替换和正则搜索替换
变更记录
序号
录入时间
录入人
备注
1
2016-11-09
Alfred Jiang
-
方案名称Xcode - 使用条件搜索替换和正则搜索替换
关键字Xcode \ 条件搜索替换 \ 正则表达式搜索替换 \ 正则搜索替换 \ 条件查询替换 \ 正则查询替换
需求场景
需要进行正则表达式搜索和替换时
参考链接
CSDN - Xcode 中搜索任何条件文本(推荐)
详细内容以搜索为例,替换操作类似搜索操作
1. 条件搜索进入 Xcode 搜索标签页,选择 Find -> Text -> Containing , 点击搜索栏,使用快捷键 control + option + command + p , 从跳出的标志中选择即可
举例:查找 AFNetworking 中下面方法,使用条件搜索
2. 正则搜索进入 Xcode 搜索标签页,选择 Find -> Regular Expression , 点击搜索栏,输入查询正则表达式即可
举例:查找 AFNetworking 中下面方法,使用正则搜索
常用条件搜索与正则搜索对应表
条件搜索
...
NSArray \ NSDictionary \ NSSet - 遍历与倒序遍历
变更记录
序号
录入时间
录入人
备注
1
2016-11-23
Alfred Jiang
-
方案名称NSArray \ NSDictionary \ NSSet - 遍历与倒序遍历
关键字NSArray \ NSDictionary \ NSSet \ 遍历 \ 倒序遍历
需求场景
需要对数组进行遍历和倒序遍历时
参考链接
Sunnyxx - iOS 中集合遍历方法的比较和技巧(推荐)
NSHipster - NSFastEnumeration / NSEnumerator
详细内容倒序遍历1. 使用 reverseObjectEnumerator1234NSArray *strings = @[@"1", @"2", @"3"];for (NSString *string in [strings reverseObjectEnumerator]) { NSLog(@"%@", string);}
2. 使用 enumerateObjectsWi ...
网络 - 使用 nscurl 命令确认 HTTPS 服务器是否支持 ATS
变更记录
序号
录入时间
录入人
备注
1
2016-11-08
Alfred Jiang
-
方案名称网络 - 使用 nscurl 命令确认 HTTPS 服务器是否支持 ATS
关键字网络 \ nscurl \ HTTPS \ ATS \ App Transport Security Settings
需求场景
检测 HTTPS 服务器是否支持 ATS(App Transport Security Settings)
参考链接
知乎专栏 - iOS开发中的HTTPS(推荐)
详细内容使用 nscurl 命令确认 HTTPS 服务器是否符合 ATS (App Transport Security Settings) 特性的要求
1nscurl --ats-diagnostics --verbose https://example.com
效果图(无)
备注(无)
Xcode - CLANG 技术学习参考
变更记录
序号
录入时间
录入人
备注
1
2016-11-28
Alfred Jiang
-
方案名称Xcode - CLANG 技术学习参考
关键字Xcode \ CLANG
需求场景
学习 CLANG 相关技术
参考链接
Railsware - Creating and using Clang plugin with Xcode
CLANG技术分享系列一:编写你的第一个CLANG插件(推荐)
CLANG技术分享系列二:代码风格检查(A CLANG PLUGIN APPROACH)
CLANG技术分享系列三:API有效性检查
CLANG技术分享系列四:IOS APP无用代码/重复代码分析
详细内容(见参考链接)
效果图(无)
备注(无)
Git - 如何 clone git 项目到一个非空目录
变更记录
序号
录入时间
录入人
备注
1
2016-07-21
Alfred Jiang
-
方案名称Git - 如何 clone git 项目到一个非空目录
关键字Git \ clone git 非空目录
需求场景
对一个主工程的子工程进行单独的 Git 管理时
参考链接
开源中国 - 如何 clone git 项目到一个非空目录(推荐)
详细内容如果我们往一个非空的目录下 clone git 项目,就会提示错误信息:
1fatal: destination path '.' already exists and is not an empty directory.
解决的办法是:
进入非空目录,假设是 /workdir/proj1
执行以下命令1234git clone --no-checkout https://git.oschina.net/NextApp/platform.git tmpmv tmp/.git . #将 tmp 目录下的 .git 目录移到当前目录rmdir tmpgit reset --ha ...
编码规范 - 使用 Space Commander 实现 iOS 编码规范自动化
变更记录
序号
录入时间
录入人
备注
1
2016-08-05
Alfred Jiang
-
方案名称编码规范 - 使用 Space Commander 实现 iOS 编码规范自动化
关键字编码规范 \ Space Commander \ spacecommander \ 自动化
需求场景
统一团队编码风格,提高工程代码可读性与可维护性
简化编码规范校验过程
参考链接
JWDev - iOS 代码规范自动化(推荐)
GitHub - square/spacecommander
详细内容(见参考链接)
效果图(无)
备注(无)
专题 - iOS 开发调试代码集合
变更记录
序号
录入时间
录入人
备注
1
2016-07-22
Alfred Jiang
-
方案名称专题 - iOS 开发调试代码集合
关键字专题 \ iOS \ 开发调试代码
需求场景
提高 iOS 开发调试效率
参考链接(无)
详细内容1. 测试文件读写1234567891011NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory , NSUserDomainMask , YES);NSLog(@"Get document path: %@",[paths objectAtIndex:0]);NSString *filePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@" ...
界面设计 - iOS 设备屏幕分辨率
变更记录
序号
录入时间
录入人
备注
1
2016-08-25
Alfred Jiang
-
方案名称界面设计 - iOS 设备屏幕分辨率
关键字界面设计 \ 屏幕 \ 分辨率
需求场景
需要确认 iOS 设备屏幕分辨率时
参考链接(无)
详细内容
设备
分辨率(像素,px)
iPod touch 1 , 2 , 3
320 x 480
iPod touch 4
640 x 960
iPod touch 5 , 6
640 x 1136
iPhone 3GS
320 x 480
iPhone 4 , 4s
640 x 960
iPhone 5 , 5c , 5s
640 x 1136
iPhone 6 , 6s
750 x 1334
iPhone 6p , 6sp
1080 x 1920
iPad 1 , 2
1024 × 768
iPad 3 , 4 , Air 1 , Air 2
2048 × 1536
iPad Mini
1024 × 768
iPad Mini 2
2048 × 1536
Apple W ...
网络 - 判断连接类型
变更记录
序号
录入时间
录入人
备注
1
2016-08-18
Alfred Jiang
-
方案名称网络 - 判断连接类型
关键字网络 \ CTTelephonyNetworkInfo \ 移动网络类型 \ 运营商信息
需求场景
需要确认手机移动网络状态和运营商名称等信息
参考链接
Stack Overflow - CTTelephonyNetworkInfo detect data type(推荐)
Stack Overflow - Detect carrier connection type (3G / EDGE / GPRS)
详细内容方案一CTTelephonyNetworkInfo+CellularConnectionName.h
123456789#import <CoreTelephony/CTTelephonyNetworkInfo.h>#import <Foundation/Foundation.h>@interface CTTelephonyNetworkInfo (CellularConnectio ...
Xcode - 系统警告处理(清除和添加)
变更记录
序号
录入时间
录入人
备注
1
2016-09-19
Alfred Jiang
-
2
2017-04-09
Alfred Jiang
更新 CSDN - iOS编译过程的原理和应用 相关
方案名称Xcode - 系统警告处理(清除和添加)
关键字Xcode \ 添加警告 \ 清除警告 \ Warning
需求场景
消除系统中的编译警告
参考链接
CocoaChina - 怎么去掉Xcode工程中的某种类型的警告
董铂然的博客 - iOS警告收录及科学快速的消除方法(推荐)
CSDN - iOS编译过程的原理和应用(推荐)
Which Clang Warning Is Generating This Message?
NSHipster - attribute
CSDN - iOS 合理利用Clang警告来提高代码质量
详细内容可以通过以下三种方式添加警告1.使用 #warning TODO 在代码中添加逻辑相关警告2.使用 NS_DEPRECATED_IOS 添加方法版本相关警告3.使用 __attribtue__ 编译器指令
12345678910 ...