Comments (6)
@BharatAgarSoftTech My typo. Use [SDImageCache sharedImageCache]
&& SDWebImageContextCustomManager
in Objective-C. I updated the readme as well.
from sdwebimagephotosplugin.
I just add below three files inside my project and pushing to MasterViewController
MasterViewController.xib
MasterViewController.h
MasterViewController.m
info.plist information
Allow Arbitrary Loads YES
Privacy - Photo Library Usage Description is added
padlock info
- SDWebImage/Core (5.0.0-beta3)
- SDWebImagePhotosPlugin (0.1.0):
- SDWebImage/Core (~> 5.0.0-beta)
from sdwebimagephotosplugin.
@BharatAgarSoftTech Hi. From the NSURLErrorDomain
, it seems that the SDWebImagePhotosLoader
was not registered to your SDWebImageManager
during image loading. By default it use SDWebImageDownloader
and supports HTTP/HTTPS/FTP
image URLs only.
I update the readme and introduce detailed step by step tutorial for beginners. You can try to look at SDWebImagePhotosPlugin-Usage again.
If still have some issue, you can also run our demo to check is there anything wrong with your code or the configuration. Waiting for response.
from sdwebimagephotosplugin.
@dreampiggy Thanks for quick reply.
Right now i am changing default image loader to PhotosLoader using below code
SDWebImageManager.defaultImageLoader = [SDWebImagePhotosLoader sharedLoader];
And loading image like this.
[cell.customImageView sd_setImageWithURL:self.objects[indexPath.row]
placeholderImage:placeholderImage
options:SDWebImageFromLoaderOnly
context:@{SDWebImageContextStoreCacheType : @(SDImageCacheTypeNone)}];
When I tried to use SDImageCache and SDWebImageCustomManager its showing following errors.
Property 'sharedCache' not found on object of type 'SDImageCache'
Use of undeclared identifier 'SDWebImageCustomManager'
from sdwebimagephotosplugin.
@dreampiggy Thanks for the support its working now :)
Here is the working code
// Setup Photos Loader
SDWebImageManager.defaultImageLoader = [SDWebImagePhotosLoader sharedLoader];
// Setup Manager
SDWebImageManager *manager = [[SDWebImageManager alloc] initWithCache:SDImageCache.sharedImageCache loader:SDWebImagePhotosLoader.sharedLoader];
// Loading image
[cell.customImageView sd_setImageWithURL:self.assetArray[indexPath.row] placeholderImage:nil options:SDWebImageFromLoaderOnly context:@{SDWebImageContextCustomManager: manager}];
from sdwebimagephotosplugin.
@BharatAgarSoftTech That first line of code, will effect shared SDWebImageManager
to use Photos loader only. So when you load HTTP URLs using sd_setImageWithURL:
without using that SDWebImageContextCustomManager
context option, you will get error because you disable SDWebImageDownloader
.
The correct way, is to assign the SDImageLoadersManager
into defaultImageLoader
. It's a multiple loaders manager. You can supply one or more actual loaders into its' loaders
array.
// Supports HTTP URL as well as Photos URL globally
SDImageLoadersManager.sharedManager.loaders = @[SDWebImageDownloader.sharedDownloader, SDWebImagePhotosLoader.sharedLoader];
// Replace default manager's loader implementation
SDWebImageManager.defaultImageLoader = SDImageLoadersManager.sharedManager;
from sdwebimagephotosplugin.
Related Issues (14)
- Does not load image in the SDAnimatedImageView (intermittent issue) HOT 5
- Request completion block HOT 2
- Extremely high memory usage and slow scrolling HOT 3
- Support for URL instead of NSURL HOT 5
- Is it possible to have SDWebImagePhotosPlugin work with SDWebImage v.5.10.X using SPM? HOT 1
- I am seeing the same issue using SDWebImage version 5.3.2, cocoapods, Xcode 12. Crashes are appearing on iOS 14+, does not appear to be happening below iOS 14. HOT 2
- Github HOT 1
- Carthage build failed HOT 1
- reloaddata causes image flickering
- Test issue without template HOT 3
- Support for SDWebImage 4.X HOT 3
- Crashed with beta4 and beta6 HOT 6
- Only support image HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdwebimagephotosplugin.