Update README
This commit is contained in:
parent
93fbfb0928
commit
112a36b84d
16
README.md
16
README.md
@ -1,11 +1,9 @@
|
|||||||
# 
|
# 
|
||||||
|
|
||||||
[](https://github.com/kaishin/Gifu/releases/latest)  [](https://github.com/Carthage/Carthage) [](https://gitter.im/kaishin/gifu)  
|
[](https://github.com/kaishin/Gifu/releases/latest)  [](https://github.com/Carthage/Carthage)  
|
||||||
|
|
||||||
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…
x
Reference in New Issue
Block a user