摘要:class clusterIn a class cluster, only an abstract superclass is public. Allocating an instance actually createsan object of a private subclass. As suc...
阅读全文
摘要:Primitive Method"When it comes to subclassing, knowing which methods are ‘primitive’ methods is important.The notion of primitive methods are those me...
阅读全文
摘要:API Design for iOS/Mac (Objective-c Edition)1. UI Control Library API的设计和已有组件保持一致(例如: 使用标准的API, 模型,模式)可以使Developer更易理解。Class interfaceRule1: 使用该平台常用/通...
阅读全文
摘要:1.cultofmachttp://www.cultofmac.com/2. imorehttp://www.imore.com/3. osxdailyhttp://osxdaily.com/
阅读全文
摘要:UIWindow1. UIWindow2. UIWindow的使用场景2.1 额外添加的Window需要手动进行旋转最近有遇到一个UIWindow的使用场景:在ApplicationDelegate.window之外额外创建了一个UIWindow对象(下文称为:otherWin)。otherWin的...
阅读全文
摘要:Inside Code Signing 1. Code Signing需要的基础组件: 证书,私钥 As an iOS developer, chances are you have a certificate, a public key, and a private key on your dev
阅读全文
摘要:1. [__NSArrayM objectForKeyedSubscript:]: unrecognized selector sent to instance - source code and screenshot attached http://stackoverflow.com/questi
阅读全文
摘要:当Project越来越复杂,模块间的依赖就会很复杂,不合理的依赖就出现:不必要的依赖,双向依赖等等。在iOS Application Project中可以将依赖定义为:对某个头文件的import。例如: 1 /** 2 * DSUser.m 3 */ 4 5 #import "DSUser....
阅读全文
摘要:Custom View Which Support AutoLayout 创建支持AutoLayout的Custom View AutoLayout 通过使view更加的自组织来减轻controller类的负担。 当实现custom view类时,需要提供足够的信息来使AutoLayout系统能够正
阅读全文
摘要:系统iOS 8.x, ARC。CrashCase:在UIViewController中有一个类型为UIScrollView的实例变量scrollView,点击UIViewController中的某个按钮时调用"[self.navigationController popViewControllerA...
阅读全文
摘要:基于位置区域的服务1. 背景Ref[1]在iOS设备锁屏的状态下,App的icon会出现在屏幕的左下角。iOS 8 Feature: Location-based Lockscreen App Shortcuts Appearing on iPhonehttp://www.igeeksblog.co...
阅读全文
摘要:FBTweak的源码分析1. FBTweak提供了以下功能A): 可以动态的修改某个变量的值,这些变量的类型包括: ...B): 可以以plist的形式将Tweak以key-value的形式进行导出2. FBTweak中的类2.1 FBTweak 类类FBTweak:代表唯一的命名的tweak(tw...
阅读全文
摘要:1. 原子操作 (Atomic Operations) 编写多线程代码最重要的一点是:对共享数据的访问要加锁。 Shared data is any data which more than one thread can access. 原子操作(Atomic Operations)满足只有一个线程
阅读全文
摘要:1. Customizing Xcode File Templates http://blog.highorderbit.com/2009/03/15/customizing-xcode-cocoa-touch-file-templates/ 2. 关于Xcode中工程设置的说明,点击右键,可以看到
阅读全文
摘要:1.Technical Q&A QA1398Mach Absolute Time Unitshttps://developer.apple.com/library/mac/qa/qa1398/_index.html2.Kernel Programming Guidehttps://developer...
阅读全文
摘要:1. xcodebuild xcodebuild: 构建Xcode project和workspace。 2. TN2339: Building from the Command Lline with Xcode FAQ https://developer.apple.com/library/ios
阅读全文
摘要:Foundation Framework 定义了 NSObject(NSKeyValueCoding),- (void)setValue:(id)value forKey:(NSString *)key;该接口的说明1. 先在message receiver的class中搜索方法 -set:2. 如...
阅读全文
摘要:1. CocoaPods CocoaPods 是Objective-C (iOS and OS X) projects 的依赖管理器。 A CocoaPod (singular) is a specification for a library, usually open source. Cocoa
阅读全文
摘要:1. Core PlotCore Plot is a plotting framework for OS X and iOS. It provides 2D visualization of data, and is tightly integrated with Apple technologie...
阅读全文
摘要:CAMediaTiming ProtocolCALayre 和 CAAnimation 实现了CAMediaTiming 接口。CAMediaTiming 定义了8个属性。speed属性:Controlling the speed of an animation or a layer can als...
阅读全文