Add pin animated image view - #453
Conversation
garrettmoon
commented
Apr 24, 2018
- Add support for GIFs (natively) and animated WebP
|
🚫 CI failed with log |
Adlai-Holler
left a comment
There was a problem hiding this comment.
Just some general nits and qs, nothing blocking 👍
| override func viewWillAppear(_ animated: Bool) { | ||
| super.viewWillAppear(animated) | ||
|
|
||
| imageView.pin_setImage(from: URL(string: "https://i.pinimg.com/originals/f5/23/f1/f523f141646b613f78566ba964208990.gif")) |
There was a problem hiding this comment.
Wonder why this example uses viewWillAppear: and the other uses viewDidLoad?
| </subviews> | ||
| <animations/> | ||
| <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
| <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
There was a problem hiding this comment.
These storyboards seem nice 😍
| - (void)viewDidAppear:(BOOL)animated | ||
| { | ||
| [super viewDidAppear:animated]; | ||
| [self.animatedImageView pin_setImageFromURL:[NSURL URLWithString:@"https://i.pinimg.com/originals/f5/23/f1/f523f141646b613f78566ba964208990.gif"]]; |
There was a problem hiding this comment.
Now we're doing viewDidAppear: wat
There was a problem hiding this comment.
😁 I was just copying the other view controllers in each project. This is what happens when each example project is built by someone else…
There was a problem hiding this comment.
But did appear seems decidedly wrong and so does load…
| if (_animatedImage) { | ||
| return _frameImage; | ||
| } else if ([super image]) { | ||
| return (CGImageRef)CFAutorelease(CFRetain([[super image] CGImage])); |
There was a problem hiding this comment.
Nit: worth eliminating the multiple [super image] calls?
| { | ||
| PINAssertMain(); | ||
| _frameInterval = frameInterval; | ||
| } |
There was a problem hiding this comment.
Gotta have that assert :)
Generated by 🚫 Danger |