Được TopGit lập chỉ mục từ metadata GitHub: pinterest/PINRemoteImage có 4.0k sao, viết chủ yếu bằng Objective-C. A thread safe, performant, feature rich image fetcher
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Fast, non-deadlocking parallel image downloader and cache for iOS
PINRemoteImageManager is an image downloading, processing and caching manager. It uses the concept of download and processing tasks to ensure that even if multiple calls to download or process an image are made, it only occurs one time (unless an item is no longer in the cache). PINRemoteImageManager is backed by GCD and safe to access from multiple threads simultaneously. It ensures that images are decoded off the main thread so that animation performance isn't affected. None of its exposed methods allow for synchronous access. However, it is optimized to call completions on the calling thread if an item is in its memory cache.
PINRemoteImage supports downloading many types of files. It, of course, supports both PNGs and JPGs. It also supports decoding WebP images if Google's library is available. It even supports GIFs and Animated WebP via PINAnimatedImageView.
PINRemoteImage also has two methods to improve the experience of downloading images on slow network connections. The first is support for progressive JPGs. This isn't any old support for progressive JPGs though: PINRemoteImage adds an attractive blur to progressive scans before returning them.
PINRemoteImageCategoryManager defines a protocol which UIView subclasses can implement and provide easy access to
PINRemoteImageManager's methods. There are built-in categories on UIImageView, PINAnimatedImageView and UIButton, and it's very easy to implement a new category. See [UIImageView+PINRemoteImage](/Pod/Classes/Image Categories/UIImageView+PINRemoteImage.h) of the existing categories for reference.
PINRemoteImageManager.shared().setAuthenticationChallenge { (task, challenge, completion) in
completion?(.performDefaultHandling, nil)
}
Support for high resolution images
Currently there are two ways PINRemoteImage is supporting high resolution images:
If the URL contains an _2x. or an _3x. postfix it will be automatically handled by PINRemoteImage and the resulting image will be returned at the right scale.
If it's not possible to provide an URL with an _2x. or _3x. postfix, you can also handle it with a completion handler:
// cache is an instance of PINCache as long as you haven't overridden defaultImageCache
PINCache *cache = (PINCache *)[[PINRemoteImageManager sharedImageManager] cache];
// Max memory cost is based on number of pixels, we estimate the size of one hundred 600x600 images as our max memory image cache.
[[cache memoryCache] setCostLimit:600 * [[UIScreen mainScreen] scale] * 600 * [[UIScreen mainScreen] scale] * 100];
// ~50 MB
[[cache diskCache] setByteLimit:50 * 1024 * 1024];
// 30 days
[[cache diskCache] setAgeLimit:60 * 60 * 24 * 30];
Installation
CocoaPods
Add PINRemoteImage to your Podfile and run pod install.
If you'd like to use WebP images, add PINRemoteImage/WebP to your Podfile and run pod install.
Carthage
Add github "pinterest/PINRemoteImage" to your Cartfile . See Carthage's readme for more information on integrating Carthage-built frameworks into your project.
Manually
Download the latest tag and drag the Pod/Classes folder into your Xcode project. You must also manually link against PINCache.
Install the docs by double clicking the .docset file under docs/, or view them online at cocoadocs.org
Git Submodule
You can set up PINRemoteImage as a submodule of your repo instead of cloning and copying all the files into your repo. Add the submodule using the commands below and then follow the manual instructions above.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/pinterest/PINRemoteImage là nguồn chính thức.
pinterest/PINRemoteImage có những chủ đề gì?
GitHub topics của pinterest/PINRemoteImage: "gifs", "image", "ios", "objective-c", "progressive-jpgs", "webp". TopGit xếp repo vào nhóm Image Tools.
pinterest/PINRemoteImage có phải mã nguồn mở không?
Có — pinterest/PINRemoteImage phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/pinterest/PINRemoteImage.
pinterest/PINRemoteImage có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho pinterest/PINRemoteImage. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
pinterest/PINRemoteImage còn đang phát triển không?
Commit gần nhất trên pinterest/PINRemoteImage là 5 ngày trước (theo timestamp GitHub). Repo có 518 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
pinterest/PINRemoteImage dùng license gì?
pinterest/PINRemoteImage phát hành theo license Apache-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về PINRemoteImage?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về PINRemoteImage.