x2on / fsimageviewer Goto Github PK
View Code? Open in Web Editor NEWPhoto viewer (gallery) for iOS with AFNetworking and caching.
Home Page: x2on.de/FSImageViewer
License: MIT License
Photo viewer (gallery) for iOS with AFNetworking and caching.
Home Page: x2on.de/FSImageViewer
License: MIT License
Hi,
Can you confirm the process for allowing rotation on pictures only.
I know with iOS7 I have declared the "autoRotate" but is their anymore that needs to be done?
Thanks,
Is there a way to make sure the full photo title is displayed, and not truncated?
Hi all,
This is a great library! I was wondering. What would be the best way to add a tap event to a photo? My idea is to display an UIActionSheet when the user taps on the photo, with two actions, delete and set as default.
Thanks!
[photoController moveToImageAtIndex:[[FSImageViewerViewController alloc] currentImageIndex] animated:YES];
I am using the currentImageIndex but it's crashing?
Sorry if it's a rookie question, but I'm basically starting to develop for iOS, and what i'd like to do is to add a small button to the lower-right corner of the image view so once tapped i wold segue to a view with the information about that image.
In "FSImageLoader.m" on line 79 [NSString hash] method is used to create a cache key:
NSString *cacheKey = [NSString stringWithFormat:@"FSImageLoader-%lu", (unsigned long)[[aURL description] hash]];
This causes problems with long image URLs, because "hash" method of NSString only uses 96 characters to generate the hash (first 32, last 32 and middle 32). Basically if your URLs are over 96 chars in length, there is a good chance of getting the same cacheKey for two different URLs. I run into this problem because I had a bunch of long, similar URLs where the only difference was the product id (starting at char 39).
This article describes the problem in detail.
Would it be possible to use a more robust hash function? Here is an implementation using MD5 hash:
- (NSString *)getMD5ValueForURL:(NSURL*)aURL {
const char *urlString = [[aURL absoluteString] UTF8String];
unsigned char hashBytes[CC_MD5_DIGEST_LENGTH];
CC_MD5(urlString, strlen(urlString), hashBytes);
NSMutableString *hashString = [NSMutableString stringWithCapacity:CC_MD5_DIGEST_LENGTH * 2];
for ( NSInteger i = 0; i < CC_MD5_DIGEST_LENGTH; i++ ) {
[hashString appendFormat:@"%02x", hashBytes[i]];
}
return hashString;
}
I guess iOS7 view's defaults impacts the way how photos are positioned. When presenting the controller the photo is shifted a bit down. After interaction it gets to the center. Is it related to UIEdgeInsets if the view if view is behind the bars?
Hi,
Thanks for fixing the crash bug.
Also, I am using this to reference which index it was last on;
[photoController moveToImageAtIndex:[photoController currentImageIndex] animated:YES];
But it crashes with this?
* Terminating app due to uncaught exception 'NSRangeException', reason: '* -[__NSArrayM objectAtIndex:]: index 2147483648 beyond bounds [0 .. 6]'
*** First throw call stack:
Any ideas?
Thanks,
When zooming into an image and trying to slide around, as you reach the borders, the parent scrollview will try to scroll to the previous / next image.
To reproduce this behaviour:
Add multiple images, zoom into an image (using swipe NOT double tap, using double tap, everything looks fine), slide around.
Once FSImageViewerViewController is popped, the hidden tabbar will appear again?
Hi, I'm trying to use the Viever with local images, with
[NSURL fileURLWithPath:imageName]
and no issues but when I try to share the image I get the error
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The image must be loaded to share.'
Can this work with AFNetworking 3.1+? I have code that uses 3.1, and when I tried to add your pod, it complains that 2.5 is not available.
When zooming-IN to an image using double tap leads to a graphics glitch (flicker)
Hi all,
With FSImageViewer, before the update to AFNetworking 2.0, I could use the following code to add a content type:
[AFImageRequestOperation addAcceptableContentTypes:
[NSSet setWithObject:@"application/x-www-form-urlencoded"]];
But on AFNetworking 2.0, AFImageRequestOperation has been "replaced" by AFImageResponseSerializer. However I cannot find a class method to add this from my code, without modifying FSImageViewer directly.
Any ideas on how this can be achieved in the latest version?
Thanks.
It there anyway to display a grid for all images before picking one of them?
That would be something really great. Thanks for the library @x2on !
when the sixth image is loading , I touch the first image to show fullscreen , then scroll to the sixth image , the sixth imageView is showing the first image before its finish loading. Could you help to fix this problem ?
Hi,
My gallery consist of high resolution images with size about 20-30 mb. Continuous sliding in between images cased a memory pressure and application gets terminated.
Is there any way to resize my image according to the device resolution at the time of download success or later ?
Help appreciated.
if i creat my image object like this :
NSString *photoStr = [[NSBundle mainBundle] pathForResource:@“XXX” ofType:@"png"];
UIImage *firstPhoto = [UIImage imageWithContentsOfFile:photoStr];
If I want to use the picture in the project,how can i do it.
Now FSImageView set scrollView frame according to real image proportions, and my question is how to set scrollview frame fullscreen and UIImageView contentMode = UIViewContentModeScaleAspectFill. Is it possible?
Error when action button pressed during loading
I seem to have images that are show up rotated 90 degrees, especially photos taken in portrait mode (they show up landscape). I also have a portrait pic that shows up rotated 180 degrees. Any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.