Update README
This commit is contained in:
parent
93fbfb0928
commit
112a36b84d
16
README.md
16
README.md
|
@ -1,11 +1,9 @@
|
||||||
# ![Logo](https://github.com/kaishin/Gifu/raw/master/header.gif)
|
# ![Logo](https://github.com/kaishin/Gifu/raw/master/header.gif)
|
||||||
|
|
||||||
[![GitHub release](https://img.shields.io/github/release/kaishin/Gifu.svg)](https://github.com/kaishin/Gifu/releases/latest) ![Bitrise](https://www.bitrise.io/app/a0eae2c9b6aa754c.svg?token=dDlRyPi2aOlZnvbl4kL8Kw&branch=master) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Join the chat at https://gitter.im/kaishin/gifu](https://badges.gitter.im/kaishin/gifu.svg)](https://gitter.im/kaishin/gifu) ![Swift 3.0.x](https://img.shields.io/badge/Swift-3.0.x-orange.svg) ![platforms](https://img.shields.io/badge/platforms-iOS-lightgrey.svg)
|
[![GitHub release](https://img.shields.io/github/release/kaishin/Gifu.svg)](https://github.com/kaishin/Gifu/releases/latest) ![Bitrise](https://www.bitrise.io/app/a0eae2c9b6aa754c.svg?token=dDlRyPi2aOlZnvbl4kL8Kw&branch=master) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) ![Swift 4.0](https://img.shields.io/badge/Swift-4.0-orange.svg) ![platforms](https://img.shields.io/badge/platforms-iOS-lightgrey.svg)
|
||||||
|
|
||||||
Gifu adds protocol-based, performance-aware animated GIF support to UIKit. (It's also a [prefecture in Japan](https://goo.gl/maps/CCeAc)).
|
Gifu adds protocol-based, performance-aware animated GIF support to UIKit. (It's also a [prefecture in Japan](https://goo.gl/maps/CCeAc)).
|
||||||
|
|
||||||
⚠ The `master` branch works with Xcode 9 and iOS 11, which are both in beta. Use `v2.0` for the stable version.
|
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
### [Carthage](https://github.com/Carthage/Carthage)
|
### [Carthage](https://github.com/Carthage/Carthage)
|
||||||
|
@ -119,7 +117,9 @@ The simplest way to get started is initializing a `GIFAnimatable` class in code
|
||||||
|
|
||||||
~~~swift
|
~~~swift
|
||||||
let imageView = GIFImageView(frame: CGRect(x: 0, y: 0, width: 200, height: 100))
|
let imageView = GIFImageView(frame: CGRect(x: 0, y: 0, width: 200, height: 100))
|
||||||
imageView.animate(withGIFNamed: "mugen")
|
imageView.animate(withGIFNamed: "mugen") {
|
||||||
|
print("It's animating!")
|
||||||
|
}
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
You can also prepare for the animation when the view loads and only start animating after a user interaction.
|
You can also prepare for the animation when the view loads and only start animating after a user interaction.
|
||||||
|
@ -129,7 +129,9 @@ You can also prepare for the animation when the view loads and only start animat
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
imageView.prepareForAnimation(withGIFNamed: "mugen")
|
imageView.prepareForAnimation(withGIFNamed: "mugen") {
|
||||||
|
print("Ready to animate!")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@IBAction func toggleAnimation(_ sender: AnyObject) {
|
@IBAction func toggleAnimation(_ sender: AnyObject) {
|
||||||
|
@ -161,8 +163,8 @@ See the [full API documentation](http://kaishin.github.io/Gifu/).
|
||||||
## Compatibility
|
## Compatibility
|
||||||
|
|
||||||
- iOS 9.0+
|
- iOS 9.0+
|
||||||
- Swift 3.0
|
- Swift 4.0
|
||||||
- Xcode 8.0
|
- Xcode 9.0
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
BIN
header.gif
BIN
header.gif
Binary file not shown.
Before Width: | Height: | Size: 233 KiB After Width: | Height: | Size: 86 KiB |
Loading…
Reference in New Issue