Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How does the UIButton background support the GIF? #2192

Closed
lewis15 opened this issue Jan 26, 2018 · 2 comments
Closed

How does the UIButton background support the GIF? #2192

lewis15 opened this issue Jan 26, 2018 · 2 comments
Labels

Comments

@lewis15
Copy link

lewis15 commented Jan 26, 2018

How does the UIButton background map support the GIF ? I use this method [myButton sd_setImageWithURL:[NSURL URLWithString:@"http://xx/xx.gif" ]forState:UIControlStateNormal placeholderImage:placeImage],but it's show only the first frame。

@lewis15 lewis15 changed the title How does the UIButton background map support the GIF? How does the UIButton background support the GIF? Jan 26, 2018
@dreampiggy
Copy link
Contributor

dreampiggy commented Jan 26, 2018

UIButton only support UIImage's built-in animated images. By default, we do not add GIF coder(FLAnimatedImage is one library which does not use UIImage's built-in animated images) . You should add this manually and start using.

// in AppDelegate or somewhere, once is enough
[[SDWebImageCodersManager sharedManager] addCoder:[SDWebImageGIFCoder sharedCoder]];

@dreampiggy
Copy link
Contributor

I just close this issue because there are already some solution here and lack of response. Feel free to reopen it if you still facing this issue 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants