专题 - iOS 设备处理器指令集参考
变更记录
序号
录入时间
录入人
备注
1
2015-05-06
Alfred Jiang
-
2
2015-12-23
Alfred Jiang
-
方案名称专题 - iOS 设备处理器指令集参考
关键字专题 \ 处理器 \ 指令集 \ Architectures
需求场景
需要对所编译文件考虑指令集设置需求时
编译静态库需求
参考链接
CocoaChina - Apple移动设备处理器指令集 armv6、armv7、armv7s及arm64
详细内容armv6 设备:
iPhone, iPhone2, iPhone3G
第一代、第二代 iPod Touch
armv7 设备:
iPhone3GS, iPhone4, iPhone4S
iPad, iPad2, iPad3(The New iPad), iPad mini
iPod Touch 3G, iPod Touch4
armv7s设备:
iPhone5, iPhone5C
iPad4(iPad with Retina Display)
arm64 设备:
iPhone6 Plus, iPhone6, ...
应用间通信 - 通过 URL 检测是否安装并打开应用
变更记录
序号
录入时间
录入人
备注
1
2015-05-07
Alfred Jiang
-
2
2015-12-23
Alfred Jiang
-
方案名称应用间通信 - 通过 URL 检测是否安装并打开应用
关键字应用间通信 \ URL \ Web \ 邮件打开App \ Schema
需求场景
需要通过 URL 检测是否安装应用,如果已安装则打开应用,如果未安装则跳转到下载页面
参考链接
iOS使用schema协议调起APP
在mobile safari中巧妙实现检测应用安装就打开,否则进App Store下载
CSDN - IOS在一个程序中启动另一个程序
详细内容1. App 设置在 .plist 文件添加如下字段
1234567891011<key>CFBundleURLTypes</key><array> <dict> <key>CFBundleURLName</key> <string></string> ...
UILabel - 计算文本高度
变更记录
序号
录入时间
录入人
备注
1
2015-05-07
Alfred Jiang
-
2
2015-08-18
Alfred Jiang
更新OC版本iOS6情况
3
2015-12-23
Alfred Jiang
-
方案名称UILabel - 计算文本高度
关键字UILabel \ 高度 \ 文本高度 \ UILable 高度
需求场景
需要根据文本内容动态修改控件高度时
参考链接
CSDN - iOS 7下计算文本高度注意事项
详细内容Objective-C 调用示例
1234567891011121314151617181920212223- (CGSize)string:(NSString *)string rectSize:(CGSize)upperSize font:(UIFont *)aFont{ CGSize labelsize = CGSizeMake(0, 0); BOOL isIOS7 = ([getOsVersion() floatValue] >= 7.0); if (isIOS7) ...
专题 - 后台模式开发指南
变更记录
序号
录入时间
录入人
备注
1
2015-05-11
Alfred Jiang
-
2
2015-12-23
Alfred Jiang
-
方案名称专题 - 后台模式开发指南
关键字专题 \ 音频播放 \ 接收位置更新 \ 执行有限长任务等 \ 后台获取
需求场景
需要实现 iOS 后台需求时
参考链接
GitHub - iOS后台模式开发指南
详细内容
iOS后台模式开发指南
原文链接 : Background Modes Tutorial: Getting Started
原文作者 : Ray Fix
译者 : MollyMmm
校对者:David Hu
状态 : 已完成
更新说明:这个教程被Ray Fix更新为关于iOS和Swift的.原著作者为Gustavo Ambrozio.
自从古老的iOS4以来,当用户点击home建的时候,你可以使你的APP们在内存中处于suspended(挂起)状态.即使APP仍停留在内存中,它的所有操作是被暂停的直到用户再次运行它.
当然这个规则中有例外情况.在特定的情况下,这个APP仍然可以在后台中 ...
设计模式 - 单例模式
变更记录
序号
录入时间
录入人
备注
1
2015-03-02
Alfred Jiang
-
2
2015-12-23
Alfred Jiang
-
方案名称设计模式 - 单例模式
关键字设计模式 \ 单例 \ GCD \ dispatch_once \ 设计模式
需求场景
单例场景,如某个全局使用的管理类
参考链接(无)
详细内容
Swift 解决方案
12345678910class var sharedInstance : SettingManager { struct Static { static var onceToken : dispatch_once_t = 0 static var instance : SettingManager? = nil } dispatch_once(&Static.onceToken) { Static.instance = SettingManager() } return Static ...
UIButton - badge 显示的实现(使用 UIBarButtonItem-Badge)
变更记录
序号
录入时间
录入人
备注
1
2015-04-22
Alfred Jiang
-
2
2015-05-11
Alfred Jiang
增加 RKNotificationHub
3
2015-12-23
Alfred Jiang
-
方案名称UIButton - badge 显示的实现(使用 UIBarButtonItem-Badge)
关键字UIButton \ badge \ UIBarButtonItem
需求场景
需要在按钮左上角显示未读数目
参考链接
CocoaControls Badges
GitHub - UIBarButtonItem-Badge
GitHub - RKNotificationHub
详细内容1. 引入头文件1#import "UIBarButtonItem+Badge.h"
2. 添加 UIBarButtonItem1234567UIImage *image = [UIImage imageNamed:@"someImage"];UIBarButtonItem *navLe ...
通知 - 本地推送通知(Local Notification)的测试与实现
变更记录
序号
录入时间
录入人
备注
1
2015-04-23
Alfred Jiang
-
2
2015-12-23
Alfred Jiang
-
方案名称通知 - 本地推送通知(Local Notification)的测试与实现
关键字通知 \ 推送 \ UILocalNotification \ 本地推送 \ 本地通知 \ 闹钟
需求场景
需要实现类似闹铃功能的本地推送通知需求
参考链接
GitHub - JRNLocalNotificationCenter
CSDN - iOS本地推送与取消本地通知
CSDN - 闹钟app小结(ios)
《本地和推送通知编程指南》
详细内容######1. JRNLocalNotificationCenter
JRNLocalNotificationCenter.h
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 ...
专题 - 可视控件介绍与可定制替代方案推荐
变更记录
序号
录入时间
录入人
备注
1
2015-04-24
Alfred Jiang
-
2
2015-12-23
Alfred Jiang
-
方案名称专题 - 可视控件介绍与可定制替代方案推荐
关键字专题 \ 系统控件 \ 控件 \ UIKit \ 自定义系统控件
需求场景
需要对 SDK 所提供系统控件梳理了解时
需要自定义系统控件时
参考链接
Code4App
Apple documentation
详细内容iPhone 与 iPad 共有可视控件
序号
控件
Class
替代增强方案
说明
1
View
UIView
视图控件
2
Search Bar
UISearchBar
搜索控件
3
Tab Bar
UITabBar
底部标签控件
4
Tab Bar Item
UITabBarItem
底部标签控件按钮项
5
Toolbar
UIToolbar
底部工具栏控件
6
Navigation Bar
UINavigationBar
导航控件
7
Navigation Item
UINavigationI ...
专题 - 控制器介绍
变更记录
序号
录入时间
录入人
备注
1
2015-04-25
Alfred Jiang
-
2
2015-12-23
Alfred Jiang
-
方案名称专题 - 控制器介绍
关键字专题 \ Controller \ 控制器
需求场景
需要对 SDK 所提供系统控制器梳理了解时
参考链接
Apple documentation
详细内容
序号
控制器
Class
说明
1
View Controller
UIViewController
页面视图控制器
2
Navigation Controller
UINavigationController
导航视图控制器
3
Table View Controller
UITableViewController
列表视图控制器
4
Tab Bar Controller
UITabBarController
标签视图控制器
5
Split View Controller
UISplitViewController
拆分视图控制器
6
Page View Controller
UIPageVi ...
UINavigationController - 使用 SlideNavigationController 实现侧滑需求
变更记录
序号
录入时间
录入人
备注
1
2015-04-22
Alfred Jiang
-
2
2015-12-23
Alfred Jiang
-
方案名称UINavigationController - 使用 SlideNavigationController 实现侧滑需求
关键字UINavigationController \ 侧滑显示
需求场景
需要实现侧滑需求时
参考链接
GitHub - SlideNavigationController
详细内容######1. SlideNavigationController.h
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354//// SlideNavigationController.h// SlideMenu//// Created by Aryan Gh on 4/24/13.// Copyright (c) 2013 Aryan Ghassemi ...