特殊控件 - 使用 PSCyclingImageView 实现自动循环轮播图
变更记录
序号
录入时间
录入人
备注
1
2016-03-16
Alfred Jiang
-
方案名称特殊控件 - 使用 PSCyclingImageView 实现自动循环轮播图
关键字特殊控件 \ PSCyclingImageView \ 自动轮播 \ 循环 \ 走马灯
需求场景
需要实现轮播图展示时
参考链接
GitHub - PSCyclingImageView
GitHub - DCPicScrollView
GitHub - SDCycleScrollView
GitHub - NinaCycleBannerView
GitHub - KDCycleBannerView
详细内容类似 UITableView 的使用方法,通过 PSCyclingImageViewDataSource 和 PSCyclingImageViewDelegate 实现控件的显示和行为获取@required
(NSInteger)numberOfImagesInCyclingImageView:(nullable PSCyclingImageView *)cyclingImage ...
Xcode - 使用 Instruments 的 Core Animation 工具进行 UIKit 性能调优
变更记录
序号
录入时间
录入人
备注
1
2016-01-26
Alfred Jiang
-
方案名称Xcode - 使用 Instruments 的 Core Animation 工具进行 UIKit 性能调优
关键字Xcode \ Instruments \ Core Animation \ UIKit \ 性能调优
需求场景
需要对 App 页面显示性能进行优化提高时
参考链接
简书 - UIKit性能调优实战讲解
iOS App性能优化
《Instruments 用户指南》
详细内容1. 使用方法在真机环境下打开 Instrument, 选择 Core Animation 工具进行调试
2. 调试项说明
调试项
功能
说明
备注
Color Blended Layers
检测图层混合
图层混合层会显示为红色,调优的方向是减少红色显示区域
-
Color Hits Green and Misses Red
检测光栅化
如果命中缓存则显示为绿色,否则显示为红色,显然绿色越多越好,红色越少越好
光栅化是将一个layer预先渲染成位图(bitmap ...
音视频 - 使用 TheAmazingAudioEngine 框架实现 iOS 音频开发中的各种音效实现
变更记录
序号
录入时间
录入人
备注
1
2016-02-02
Alfred Jiang
-
方案名称音视频 - 使用 TheAmazingAudioEngine 框架实现 iOS 音频开发中的各种音效实现
关键字音视频 \ 音频制作 \ 音效 \ 播放 \ 录音 \ 录制
需求场景
实现iOS音频开发中的各种音效的实现
参考链接(见详细内容)
详细内容
简书 - iOS第三方音频框架TheAmazingAudioEngine使用及音效实现介绍
GitHub - TheAmazingAudioEngine
效果图(无)
备注(无)
Xcode - 运行时环境变量( Environment Variables )
变更记录
序号
录入时间
录入人
备注
1
2016-02-05
Alfred Jiang
-
方案名称Xcode - 运行时环境变量( Environment Variables )
关键字Xcode \ 运行时 \ 环境变量 \ Environment Variables
需求场景
添加环境变量可以帮助提高调试效率,如调试僵尸对象
参考链接
运行时环境变量
Stack Overflow - List of environment variable in Objective C?
iOS环境变量设置
GitHub Gist - OBJC_HELP=1 on Lion
Apple documentation - Mac OS X Debugging Magic
详细内容添加方法:Project -> Scheme -> Edit Scheme ,在 Arguments 下可以添加运行时的环境变量( Environment Variables )
查看列表:打开终端执行以下命令可查看完整列表
$ export OBJC_HELP=1
...
时间 - 使用 Benchmarking 精确测量的代码运行时间
变更记录
序号
录入时间
录入人
备注
1
2016-02-19
Alfred Jiang
-
方案名称时间 - 使用 Benchmarking 精确测量的代码运行时间
关键字Benchmarking \ 测量 \ 代码运行时间
需求场景
需要对函数进行运行时间测量时
需要比较两个函数运行时间时
参考链接
NSHipster - Benchmarking
详细内容1. 使用 CFAbsoluteTimeGetCurrent和 NSDate 或 CFAbsoluteTimeGetCurrent() 偏移量不同的是,mach_absolute_time() 和 CACurrentMediaTime() 是基于内建时钟的,能够更精确更原子化地测量,并且不会因为外部时间变化而变化(例如时区变化、夏时制、秒突变等)
123456789101112131415161718CFTimeInterval startTime = CACurrentMediaTime();{ static size_t const count = 1000; static size ...
地图 - 使用 Eviltransform 进行火星坐标转换(大陆地区地理坐标偏移问题)
变更记录
序号
录入时间
录入人
备注
1
2016-02-29
Alfred Jiang
-
1
2016-03-08
Alfred Jiang
更新 OC 调用
方案名称地图 - 使用 Eviltransform 进行火星坐标转换(大陆地区地理坐标偏移问题)
关键字地图 \ Eviltransform \ 坐标 \ 偏移
需求场景
需要解决中国大陆地图坐标偏移问题
参考链接
Why You Can’t Trust GPS in China
GitHub - Eviltransform
详细内容Swift Version : 更新版,支持 OC 调用123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 ...
其他 - RESTful API 设计与最佳实践介绍
变更记录
序号
录入时间
录入人
备注
1
2016-02-04
Alfred Jiang
-
方案名称其他 - RESTful API 设计与最佳实践介绍
关键字其他 \ RESTful API \ 接口 \ 网络
需求场景
指定网络接口规则时
参考链接(见详细内容)
详细内容
10 Best Practices for Better RESTful API
10个有关RESTful API良好设计的最佳实践
Best Practices for Designing a Pragmatic RESTful API
REST API Resources(推荐)
RESTFUL API 安全设计指南
RESTful API 设计指南
博客园 - 我所理解的RESTful Web API [Web标准篇]
博客园 - 我所理解的RESTful Web API [设计篇]
阮一峰的网络日志 - RESTful API 设计指南
阮一峰的网络日志 - 理解RESTful架构
效果图(无)
备注(无)
UIView - 代码设置 UIView 的阴影、圆角、边框效果
变更记录
序号
录入时间
录入人
备注
1
2016-03-08
Alfred Jiang
-
1
2017-01-20
Alfred Jiang
更新 CAGradientLayer 设置四周阴影的效果示例
方案名称UIView - 代码设置 UIView 的阴影、圆角、边框效果
关键字UIView \ 圆角 \ 阴影 \ 边框 \ CAGradientLayer
需求场景
需要为 UIView 等控件设置圆角、阴影、边框效果时
参考链接
简书 - iOS给UIview 加阴影加圆角加边框
CSDN - iPhone之为UIView设置阴影(CALayer的shadowColor,shadowOffset,shadowOpacity,shadowRadius,shadowPath属性)
详细内容1. 导入 #import <QuartzCore/QuartzCore>2. 设置阴影1234myview.layer.shadowOpacity = 0.5;// 阴影透明度myview.layer.shadowColor = [UIColor ...
Xcode - 使用 DWURecyclingAlert 进行 UITableView 和 UICollectionView 的绘图性能测试
变更记录
序号
录入时间
录入人
备注
1
2016-03-01
Alfred Jiang
-
方案名称Xcode - 使用 DWURecyclingAlert 进行 UITableView 和 UICollectionView 的绘图性能测试
关键字Xcode \ DWURecyclingAlert \ UITableView \ UICollectionView \ 绘图性能测试
需求场景
需要对 UITableView 和 UICollectionView 的绘图进行性能测试时
参考链接
GitHub - DWURecyclingAlert
详细内容使用方法在工程中添加 DWURecyclingAlert.m 文件即可
Objective-C1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 ...
语法 - Objective-C 与 Swift 互相调用
变更记录
序号
录入时间
录入人
备注
1
2016-03-08
Alfred Jiang
-
方案名称语法 - Objective-C 与 Swift 互相调用
关键字语法 \ Objective-C \ Swift
需求场景
swift、 Objective-C 混编
参考链接
KittenYang - 在Swift项目中使用OC,在OC项目中使用Swift
详细内容Objective-C 调用 Swift方法:
在工程的 Build Settings 中把 defines module 设为 YES 。
把 product module name 设置为项目工程的名字。
在需要调用 Swift 的 Objective-C 文件中导入 ProjectName-Swift.h 。
注意:
调用 Swift 类的话,需要在 Swift 的 class 前面加 @objc 修饰。
在 Objective-C 工程中首次创建 Swift 文件时,系统会自动帮你创建 Objective-C Bridging Header 。该文件主要用于 Swift 引用 Objecti ...