YYKit README

The project's README from github.com/ibireme/YYKit. As one markdown file: README.md.

YYKit

License MIT  Carthage compatible  CocoaPods  CocoaPods  Support  Build Status

YYKit is a collection of iOS components.

It's so huge that I split it into several independent components:

Demo Project

See Demo/YYKitDemo.xcodeproj


Installation

CocoaPods

  1. Add pod 'YYKit' to your Podfile.
  2. Run pod install or pod update.
  3. Import <YYKit/YYKit.h>.

Carthage

  1. Add github "ibireme/YYKit" to your Cartfile.
  2. Run carthage update --platform ios and add the framework to your project.
  3. Import <YYKit/YYKit.h>.
  4. Notice: carthage framework doesn't include webp component, if you want to support webp, use CocoaPods or install manually.

Manually

  1. Download all the files in the YYKit subdirectory.
  2. Add the source files to your Xcode project.
  3. Add -fno-objc-arc compiler flag to NSObject+YYAddForARC.m and NSThread+YYAdd.m.
  4. Link with required frameworks:
    • UIKit
    • CoreFoundation
    • CoreText
    • CoreGraphics
    • CoreImage
    • QuartzCore
    • ImageIO
    • AssetsLibrary
    • Accelerate
    • MobileCoreServices
    • SystemConfiguration
    • sqlite3
    • libz
  5. Add Vendor/WebP.framework(static library) to your Xcode project if you want to support WebP.
  6. 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.



中文介绍

YYKit 是一组功能丰富的 iOS 组件。

为了尽量复用代码,这个项目中的某些组件之间有比较强的依赖关系。为了方便其他开发者使用,我从中拆分出以下独立组件:

演示项目

查看并运行 Demo/YYKitDemo.xcodeproj


安装

CocoaPods

  1. 在 Podfile 中添加 pod 'YYKit'。
  2. 执行 pod install 或 pod update。
  3. 导入 <YYKit/YYKit.h>。

Carthage

  1. 在 Cartfile 中添加 github "ibireme/YYKit"。
  2. 执行 carthage update --platform ios 并将生成的 framework 添加到你的工程。
  3. 导入 <YYKit/YYKit.h>。
  4. 注意: carthage framework 并没有包含 webp 组件。如果你需要支持 webp,可以用 CocoaPods 安装,或者手动安装。

手动安装

  1. 下载 YYKit 文件夹内的所有内容。
  2. 将 YYKit 内的源文件添加(拖放)到你的工程。
  3. 为 NSObject+YYAddForARC.m 和 NSThread+YYAdd.m 添加编译参数 -fno-objc-arc。
  4. 链接以下 frameworks:
    • UIKit
    • CoreFoundation
    • CoreText
    • CoreGraphics
    • CoreImage
    • QuartzCore
    • ImageIO
    • AssetsLibrary
    • Accelerate
    • MobileCoreServices
    • SystemConfiguration
    • sqlite3
    • libz
  5. 如果你需要支持 WebP,可以将 Vendor/WebP.framework(静态库) 加入你的工程。
  6. 导入 YYKit.h。

文档

你可以在 CocoaDocs 查看在线 API 文档,也可以用 appledoc 本地生成文档。

系统要求

该项目最低支持 iOS 6.0 和 Xcode 8.0。

注意

我希望调用 API 时,有着和调用系统自带 API 一样的体验,所以我并没有为 Category 方法添加前缀。我已经用工具扫描过这个项目中的 API,确保没有对系统 API 产生影响,但即使这样没有前缀的 Category 也可能会带来其他麻烦。因此我不太推荐直接使用 YYKit 这个库,你应该先尝试一下上面那些拆分出来的独立组件。

许可证

YYKit 使用 MIT 许可证,详情见 LICENSE 文件。

相关文章

iOS 保持界面流畅的技巧

YYKit (ibireme/YYKit)

Searching Database…

14K ·GitHub
这是什么?YYKit 是一套庞大的 iOS 组件合集,打包了多个独立的库,提供高性能的模型映射、缓存、图片加载与解码、富文本渲染、键盘追踪以及异步绘制功能。
这是一个统一的框架,还是一组独立库的合集?它是一组独立组件(YYModel、YYCache、YYImage、YYWebImage、YYText、YYKeyboardManager、YYDispatchQueuePool、YYAsyncLayer、YYCategories)打包在一起的合集,不过作者建议单独使用这些拆分后的组件,而不是整个套件。
怎么把它添加到 Xcode 项目中?在 Podfile 中添加 'pod YYKit' 并运行 pod install,或者在 Cartfile 中添加 'github ibireme/YYKit' 并运行 carthage update --platform ios;你也可以手动下载源文件,然后拖入项目中。
我需要链接哪些系统框架?需要链接 UIKit、CoreFoundation、CoreText、CoreGraphics、CoreImage、QuartzCore、ImageIO、AssetsLibrary、Accelerate、MobileCoreServices、SystemConfiguration、sqlite3 和 libz,另外如果是手动安装,还需要为两个文件设置一个特殊的非 ARC 编译标志。
安装时有什么需要注意的坑吗?Carthage 构建默认不包含 WebP 组件,因此要获得 WebP 支持,需要使用 CocoaPods 或手动安装;手动安装时还需要为两个特定源文件添加 -fno-objc-arc 标志。
它支持哪些 iOS 和 Xcode 版本?它要求 iOS 6.0 或更高版本,以及 Xcode 8.0 或更高版本。
作者为什么不建议直接使用 YYKit?作者提醒,由于分类方法没有前缀,即使已经扫描过是否存在冲突,它们仍可能与其他代码发生冲突;因此他建议尝试单独的独立组件(如 YYImage 或 YYCache),而不是整个套件。
YYWebImage 是做什么的?它是一个异步图片加载框架,与专注于显示、编码和解码动态 WebP、APNG 和 GIF 格式的 YYImage 是分开的。
YYText 是用来做什么的?YYText 是一个功能强大的 iOS 富文本组件,用于渲染和编辑带样式的属性文本。
有可以试用的演示吗?有的,仓库中包含 Demo/YYKitDemo.xcodeproj,你可以打开并运行它,直接看看这些组件的实际效果。
Creator
ibireme
Size
55.6 MB
Stars
14K
Updated
CommitAug 06
Age
13y
Commits · 90 Days