YYAsyncLayer — iOS utility classes for asynchronous rendering and display.
YYCategories — A set of useful categories for Foundation and UIKit.
Demo Project
See Demo/YYKitDemo.xcodeproj
Installation
CocoaPods
Add pod 'YYKit' to your Podfile.
Run pod install or pod update.
Import <YYKit/YYKit.h>.
Carthage
Add github "ibireme/YYKit" to your Cartfile.
Run carthage update --platform ios and add the framework to your project.
Import <YYKit/YYKit.h>.
Notice: carthage framework doesn't include webp component, if you want to support webp, use CocoaPods or install manually.
Manually
Download all the files in the YYKit subdirectory.
Add the source files to your Xcode project.
Add -fno-objc-arc compiler flag to NSObject+YYAddForARC.m and NSThread+YYAdd.m.
Link with required frameworks:
UIKit
CoreFoundation
CoreText
CoreGraphics
CoreImage
QuartzCore
ImageIO
AssetsLibrary
Accelerate
MobileCoreServices
SystemConfiguration
sqlite3
libz
Add Vendor/WebP.framework(static library) to your Xcode project if you want to support WebP.
Import YYKit.h.
Documentation
Full API documentation is available on CocoaDocs.
You can also install documentation locally using appledoc.
Requirements
This library requires iOS 6.0+ and Xcode 8.0+.
Notice
I want to use the APIs as if it was provided by system, and I don't add prefix in
these categories. I do not recommend using the YYKit directly, you should try the separated components first.
License
YYKit is provided under the MIT license. See LICENSE file for details.
我希望调用 API 时,有着和调用系统自带 API 一样的体验,所以我并没有为 Category 方法添加前缀。我已经用工具扫描过这个项目中的 API,确保没有对系统 API 产生影响,但即使这样没有前缀的 Category 也可能会带来其他麻烦。因此我不太推荐直接使用 YYKit 这个库,你应该先尝试一下上面那些拆分出来的独立组件。
请发表评论