-
Notifications
You must be signed in to change notification settings - Fork 11
Adding support for image downloading using other download sources #17
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
base: dev
Are you sure you want to change the base?
Conversation
…Progress updated sample app with three cases.
|
This looks really great! Welcome improvements. I have a few questions. New Dependency? So Naming I think the new methods would benefit from more self-explanatory names. Something more like this: And this: NSProgress Are there any potential conflicts when using an NSProgress to track progress? I don't understand from reading the docs how multiple unrelated NSProgress instances are resolved. |
and replaced with NSURLSessionDownloadTask for clarity purposes
|
Dependancy SDWebImage was intended as dependancy for sample app only of course as an example of why it is useful to have this custom progress initializer. However, I removed it entirely as I didn't want to add so many files to the repo and didn't want to create a podfile for just a sample app. Instead I modified the sample app to use NSProgress directly using NSURLSessionDownloadTask request and it's delegate methods to update progress. Naming I agree they needed to be more verbose and I commited your suggestions. NSProgress This object is simply used as a way to encapsulate the progression of a unit of work. It is used in AFNetworking which is what inspired this need. Read Matt Thompson's explanation |
|
Thanks for the clarifications. I'm AFK at the moment, but I'm looking forward to trying this pull request out for myself. :-) |
|
Adding a comment here. |
|
Hi @jaredsinclair , are you still merging that? |
|
I know this is old, but for those who are using JTSImageViewController and want to cache with SDWebImage, you can easily achieve it by using the JTSImageViewControllerDismissalDelegate to cache when the view dismisses. This is what I am doing right now:
If an image is returned, then you just pass it to JTSImageInfo and present the controller. If not, then you pass the URL and let JTSImageViewController handle the download.
Hope this helps. I do think keeping JTSImageViewController as light as possible is better. |
…wController Conflicts: Sample App/JTSImageVC/JTSImageVC.xcodeproj/project.pbxproj Sample App/JTSImageVC/JTSImageVC.xcodeproj/project.xcworkspace/xcshareddata/JTSImageVC.xccheckout Sample App/JTSImageVC/JTSImageVC/Base.lproj/Main.storyboard Sample App/JTSImageVC/JTSImageVC/JTSViewController.h Sample App/JTSImageVC/JTSImageVC/JTSViewController.m Source/JTSImageViewController.m
|
Is this PR still being considered for merging? I too am needing to download from a specialized source, and it would be nice to tap into the progress bar JTSImageViewController displays when it is in charge of downloading the image. |
For my project, I would like to use the same image caching solution between this image viewer and every other uiimageview in the project. This update allow me to do so. I've added two more samples to the sample app using SDWebimage for custom image caching.