在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:Flipboard/FLAnimatedImage开源软件地址:https://github.com/Flipboard/FLAnimatedImage开源编程语言:Objective-C 98.1%开源软件介绍:FLAnimatedImage is a performant animated GIF engine for iOS:
It's a well-tested component that powers all GIFs in Flipboard. To understand its behavior it comes with an interactive demo: Who is this for?
Installation & UsageFLAnimatedImage is a well-encapsulated drop-in component. Simply replace your If using CocoaPods, the quickest way to try it out is to type this on the command line: $ pod try FLAnimatedImage To add it to your app, copy the two classes pod 'FLAnimatedImage', '~> 1.0' If using Carthage, add the following line into your
If using Swift Package Manager, add the following to your dependencies: [
.package(url: "https://github.com/Flipboard/FLAnimatedImage.git", .upToNextMajor(from: "1.0.16"))
],
targets: [
.target(name: "TestProject", dependencies: ["FLAnimatedImage""])
] In your code, FLAnimatedImage *image = [FLAnimatedImage animatedImageWithGIFData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif"]]];
FLAnimatedImageView *imageView = [[FLAnimatedImageView alloc] init];
imageView.animatedImage = image;
imageView.frame = CGRectMake(0.0, 0.0, 100.0, 100.0);
[self.view addSubview:imageView]; It's flexible to integrate in your custom image loading stack and backwards compatible to iOS 9. It uses ARC and the Apple frameworks It is capable of fine-grained logging. A block can be set on // Set up FLAnimatedImage logging.
[FLAnimatedImage setLogBlock:^(NSString *logString, FLLogLevel logLevel) {
// Using NSLog
NSLog(@"%@", logString);
// ...or CocoaLumberjackLogger only logging warnings and errors
if (logLevel == FLLogLevelError) {
DDLogError(@"%@", logString);
} else if (logLevel == FLLogLevelWarn) {
DDLogWarn(@"%@", logString);
}
} logLevel:FLLogLevelWarn]; Since FLAnimatedImage is licensed under MIT, it's compatible with the terms of using it for any app on the App Store. Release process
To Do
This code has successfully shipped to many people as is, but please do come with your questions, issues and pull requests! Select apps using FLAnimatedImage(alphabetically)
If you're using FLAnimatedImage in your app, please open a PR to add it to this list! |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论