Git Product home page Git Product logo

photoviewer's People

Contributors

amitsnyderman avatar crumpf avatar devindoty avatar farcaller avatar gavingmiller avatar hboon avatar joehewitt avatar jverkoey avatar shnhrrsn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

photoviewer's Issues

memory leak in EGOImageLoadConnection

  • (id)initWithImageURL:(NSURL*)aURL delegate:(id)delegate
    {
    if((self = [super init])) {
    _imageURL = [aURL retain];
    self.delegate = delegate;
    _responseData = [[NSMutableData alloc] init]; <<------- never released
    self.timeoutInterval = 30;

should add "[_responseData release];" to dealloc method?

issue on iOS7

each photo's seem like out of frame, while display photos.

I think it should be add some code in ViewDidLoad method , then it looks like fine.

thx

if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)])
{
    self.edgesForExtendedLayout = UIRectEdgeNone;
}

Maximum zoom scale is hard-coded

Ideally it should be possible to zoom an image to its actual resolution.

Currently, there's a hard-coded maximum zoom scale which means even if you have a high-resolution image, you may not be able to zoom it to its actual resolution.

PhotoViewer crash

Hello, Im using PhotoViewer in one of my projects, and I've just realized that if I use it a couple of times during the same session it eventually crashes like this:
010-07-24 17:34:26.018 MobiRealty[2698:307] -[**NSArrayI isLoading]: unrecognized selector sent to instance 0x626dab0
2010-07-24 17:34:26.417 MobiRealty[2698:307] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI isLoading]: unrecognized selector sent to instance 0x626dab0'
* Call stack at first throw:
(
0 CoreFoundation 0x35319303 __exceptionPreprocess + 114
1 libobjc.A.dylib 0x35b664c4 objc_exception_throw + 40
2 CoreFoundation 0x3531ce0f -[NSObject(NSObject) doesNotRecognizeSelector:] + 98
3 CoreFoundation 0x3531c2ab __forwarding
+ 506
4 CoreFoundation 0x352abc50 _CF_forwarding_prep_0 + 48
5 MobiRealty 0x0004fdd7 -[PVPhotoView imageViewDidLoadImage:] + 66
6 MobiRealty 0x0004ec23 -[PVImageView setImage:] + 894
7 MobiRealty 0x0004fd37 -[PVPhotoView setImage:] + 226
8 MobiRealty 0x0004e501 -[PVImageView requestDidFinishLoad:] + 84
9 MobiRealty 0x0006456d -[PVRequestLoader dispatchLoaded:] + 508
10 MobiRealty 0x00066579 -[PVURLRequestQueue loader:didLoadResponse:data:] + 268
11 MobiRealty 0x00064b59 -[PVRequestLoader connectionDidFinishLoading:] + 140
12 Foundation 0x30a21001 -[NSURLConnection(NSURLConnectionReallyInternal) sendDidFinishLoading] + 68
13 Foundation 0x30a20f83 _NSURLConnectionDidFinishLoading + 78
14 CFNetwork 0x31caf814 _ZN19URLConnectionClient23_clientDidFinishLoadingEPNS_26ClientConnectionEventQueueE + 264
15 CFNetwork 0x31c9d454 _ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl + 140
16 CFNetwork 0x31c9d2d0 _ZN19URLConnectionClient13processEventsEv + 100
17 CFNetwork 0x31c9d198 _ZN17MultiplexerSource7performEv + 192
18 CFNetwork 0x31c9d0d4 _ZN17MultiplexerSource8_performEPv + 12
19 CoreFoundation 0x352ed295 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 14
20 CoreFoundation 0x352ef0e3 __CFRunLoopDoSources0 + 382
21 CoreFoundation 0x352f0059 __CFRunLoopRun + 264
22 CoreFoundation 0x352970c3 CFRunLoopRunSpecific + 226
23 CoreFoundation 0x35296fd1 CFRunLoopRunInMode + 60
24 GraphicsServices 0x35e68f90 GSEventRunModal + 196
25 UIKit 0x32003b48 -[UIApplication _run] + 572
26 UIKit 0x32001fc0 UIApplicationMain + 972
27 MobiRealty 0x00002751 main + 80
28 MobiRealty 0x000026c8 start + 52
)
terminate called after throwing an instance of 'NSException'

Any idea why?

Gonso

Memory crash problem

I migrated my app to xcode5 and ios7 because apple required it.
If I run app on io7- it is ok but if I run app on io7+ I have this problem:

[EGOPhotoImageView setPhoto:]: message sent to deallocated instance 0x166b55d0

This is my code:

GetGalleryHomePhotoItem * item = [self.items objectAtIndex:indexPath.row];

NSMutableArray * photos = [[NSMutableArray alloc] init];
NSURL * url = ...
MyPhoto *photo = [[MyPhoto alloc] initWithImageURL:url name:@"." idPhoto:[item.IdFoto stringValue]];
[photos addObject:photo];

MyPhotoSource *source = [[MyPhotoSource alloc] initWithPhotos:photos];

MyGalleryViewController *photoController = [[MyGalleryViewController alloc] initWithPhotoSource:source];
photoController.title = @"";

self.navigationController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
self.navigationController.modalPresentationStyle = UIModalPresentationFullScreen;
[self.navigationController pushViewController:photoController animated:true];

[photoController moveToPhotoAtIndex:0 animated:FALSE];

can you help me please?

Thanks

Luca

NavigationBar Problem

I integrated PhotoViewer in my app but I have navigation bar problem.
PhotoViewer Controller opened from different my custom controller. In many scenarious, Photo Viewer open with trasparent navigation bar. Navigation bar is not visible but if I click on top left I can go to back because back button is present but trasparent.
How can I solve the problem?

thanks

when Scrolling images the image is shaking

While swiping the images image is shaking little bit, and goes up finally.But if i use arrows to swipe the images its fine

  • (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
  • (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView
    if i comment these two methods, there is no shaking. is there any problem now , and what is the use of these methods.

Terminating app due to uncaught exception 'CALayerInvalidGeometry'

Hi,
I'm having some trouble with EGOPhotoImageView (I think), see there crash log below.
I'm using iOS 4.2.1 GM on iPhone 4. Same code works on 3.1.3.

2010-12-01 20:36:30.293 myapp[1650:307] EGO PAGE INDEX LIB CONTROLLER 0
2010-12-01 20:36:30.454 myapp[1650:307] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'
*** Call stack at first throw:
(
0 CoreFoundation 0x33ac0987 exceptionPreprocess + 114
1 libobjc.A.dylib 0x3347b49d objc_exception_throw + 24
2 CoreFoundation 0x33ac07c9 +[NSException raise:format:arguments:] + 68
3 CoreFoundation 0x33ac0803 +[NSException raise:format:] + 34
4 QuartzCore 0x34104229 _ZL18CALayerSetPositionP7CALayerRKN2CA4Vec2IdEEb + 140
5 QuartzCore 0x34104197 -[CALayer setPosition:] + 38
6 QuartzCore 0x341040e3 -[CALayer setFrame:] + 390
7 UIKit 0x320670e9 -[UIView(Geometry) setFrame:] + 188
8 UIKit 0x320b2bd1 -[UIScrollView setFrame:] + 420
9 myapp 0x0006522f -[EGOPhotoImageView killScrollViewZoom] + 646
10 myapp 0x00060861 -[EGOPhotoViewController moveToPhotoAtIndex:animated:] + 812
11 myapp 0x0005e749 -[EGOPhotoViewController viewWillAppear:] + 1496
12 UIKit 0x320ac637 -[UINavigationController _startTransition:fromViewController:toViewController:] + 610
13 UIKit 0x320ac35f -[UINavigationController _startDeferredTransitionIfNeeded] + 182
14 UIKit 0x320a00c5 -[UINavigationController pushViewController:transition:forceImmediate:] + 640
15 UIKit 0x3209fe3b -[UINavigationController pushViewController:animated:] + 34
16 myapp 0x000533c3 -[NDetailViewController goToDisplayPictures:] + 2278
17 myapp 0x0005767b -[PhotosView tap:] + 154
18 myapp 0x00040e93 -[TapImageView touchesBegan:withEvent:] + 66
19 UIKit 0x320641e9 _UIGestureRecognizerSortAndSendDelayedTouches + 2200
20 UIKit 0x320638b5 _UIGestureRecognizerUpdateObserver + 696
21 CoreFoundation 0x33a50c59 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION
+ 16
22 CoreFoundation 0x33a50acd __CFRunLoopDoObservers + 412
23 CoreFoundation 0x33a480cb __CFRunLoopRun + 854
24 CoreFoundation 0x33a47c87 CFRunLoopRunSpecific + 230
25 CoreFoundation 0x33a47b8f CFRunLoopRunInMode + 58
26 GraphicsServices 0x33b0e4ab GSEventRunModal + 114
27 GraphicsServices 0x33b0e557 GSEventRun + 62
28 UIKit 0x32099329 -[UIApplication _run] + 412
29 UIKit 0x32096e93 UIApplicationMain + 670
30 myapp 0x00002bc7 main + 70
31 myapp 0x00002b7c start + 40
)
terminate called after throwing an instance of 'NSException'


I've a loop to populate an array of photo :

        MyPhoto * photo = [[MyPhoto alloc] initWithImageURL:[NSURL URLWithString:@"photo-url-here"] name:@"photo-name-here"];
        [imageViewArray addObject:photo];

and after this loop :

MyPhotoSource *source = [[MyPhotoSource alloc] initWithPhotos:imageViewArray];
EGOPhotoViewController * photoController = [[EGOPhotoViewController alloc] initWithPhotoSource:source];

and I after I do the pushViewController.

Stutter issue when moving around photos at first

There's a definite stutter issue going on with photos that weren't viewed recently when you are scrolling between pages. I think its related to updating subview layouts mid scroll. If no one knows anything, I might rewrite this based on the WWDC 2010 Scroll View Demo source code.

info.plist settings to run on ipod touch

Hi,
it seems that in order for universal apps to build for iphone, ipod touch and ipad you need the following info.plist settings:

Main nib file base name -> MainWindow-iphone
Main nib file base name (ipad) -> MainWindow-ipad

Using

Main nib file base name (iphone) -> MainWindow-iphone
Main nib file base name (ipad) -> MainWindow-ipad

doesn't allow the app to run properly on ipod touch...

EGOPhotoViewController isn't releasing completely (iPhone 5)

Using this on iPhone 5:

EGOPhotoViewController *photoController = [[EGOPhotoViewController alloc] initWithImageURLs:imageURLs];

[self.navigationController pushViewController:photoController animated:YES];

When I get back to the caller I can see the bottom bar... How should I solve this?

White Line under the navigation Bar (in PhotoviewController)

Hi,

i dont know how to solve this Problem. I have a Tab- and Navigation Bar (inlcuded the Photovieweer). In the PhotoviewController i get a white line under the Navigation bar.

When the User tapped the Screen and the Bars will hide and he tapped again, everything is fine.

Has somebody the Same Issue ?

Function very poorly in iOS5

Done button doesn't work.. Can't escape out from the [email/copy/save] dialog..

As well when only 1 photo in the source, the viewer open differently..

Any plans to support 3.1.3

Hi,

was wondering if this was anywhere on the roadmap? If not, any thoughts on how easy this would be to achieve?

Thanks.

Rotation works in iOS 5 but not in iOS 6

Tracing through the code now, but I suspect this has to do with new rotation logic in IOS 6 ... ?

I'm crossing my fingers regarding how this will rotate when using a Tab Bar Controller. Three20's photo viewer suffers from a won't-rotate affliction in iOS 6 as well. I've tried a number of things to resolve it, including some along the lines of the comments in issue #16, but none of them have helped so far.

Swiping does not work on iOS 5

Im currently testing my apps on iOS 5 and see a problem when using the EGOPhotoViewer in landscape mode.
The swiping between photos does not work anymore in landscape. All works fine in portrait.

Update 1: I looked in to it somewhat further and discovered that it only does not work if you try to swipe touching the photo's but if you use any black areas next to the photo it works fine.
Seems the scrollViewDidScroll events are nog coming when swiping the photo in landscape modus.

Update 2: If i disable the userInteraction of the EGOPhotoImageView it all works fine. But then you dont receive push events and cant hide / show the toolbars.

Memory problem with many pictures

Hello, I have a problem with the memory managment. I get a memory warning after scroll about 50 pictures. In total, they have about 270 of them, each weighing approximately 100 kb and is different from others. I tried to resolve this problem by issue # 6, but nothing helped. Please help me. Regards Kozik

No way to add pictures to the cache and a source?

There doesn't seem to be a way to update a PhotoSource with a new photo; the internal array is immutable, so even subclassing doesn't help. For example: You have a downloaded collection of photos and then the user takes a new picture and your app uploads it. Obviously you don't want to re-download the picture just to add it to the cache; you want to add it directly from memory.

Adding this locally taken picture to the cache isn't practical right now for another reason: keyForURL (which generates the hashed key used to tag images in the cache) resides in EGOImageLoader.m. Shouldn't this at least be in the header file instead, so client apps can use it?

Or am I missing some existing ways in which images can be added directly to the cache and photo sources?

Rotation doesn't work.

EGOPhotoViewController's shouldAutorotateToInterfaceOrientation gets called and returns YES, but none of the other rotation-related methods (including willRotateToInterfaceOrientation) gets called.

This could be an iOS SDK problem, but it's a pretty major crippling of the viewer's functionality.

iPad version - completely broken in popOvers

Number of issues:

Scrolling images on the iPad in popOvers is completely broken. It may work if all images are the same size but won't currently work with the way you calculate the centre of the image being scrolled to as the calculation is based on a fixed sized images.

Things are further aggravated by the copious amounts of hardcoded assumptions when using on an iPad. For example just because images are being shown in popOvers doesn't mean they need to be auto resized. It may be helpful to expose a few more of these private properties too.

iOS 7 : crash exiting from EGOPhotoViewer (fixed)

compiling with iOS7 (GM),

when I try to exit from the photo viewer, I get a crash : -[UIScrollView(UIScrollViewInternal) _notifyDidScroll] + 64

fixed using the following modification :
in EGOPhotoViewController.m
in dealloc ()
added : _scrollView.delegate = nil;
before [_scrollView release]

App crash

As i integrated Photo viewer in my app. it is working fine in simulator But when we check it on Iphone device(3G) the app gets crash while uploading the pictures . As i found (In Instruments) the object allocation increases while uploading the pictures in the Photo Viewer . Object allocation go beyond the 23.5 MB. As i checked while debugging the application , when we click on the picture the object allocation increases from (currently) 5 MB to 15 MB(after clicking on the picture). So i think just because of object allocation app gets crash .

iPad Present action from toolbar item

When viewing an image on the ipad, it would be nice if the action button would present from that toolbar item, rather than in the middle of the screen.

Implement PVThumbView

(Trying not to be an ass about this, just a request)

I'm not sure if you have the code lying about, but I'd love to have your implementation of PVThumbView.

Memory problem with EGOPhotoViewer

I use EGOPhotoViewer for my image local gallery. Number of images 152 and 1400x950px. I have problems with memory in device! Memory not release. I display one image 45mb + next 55mb + next 72mb.....and over 130mb app crash. In this code I added images:

NSMutableArray *photos = [[NSMutableArray alloc] init];
for (Picture *picture in [self fetchedResultsController].fetchedObjects) {
UIImage *img = [UIImage imageNamed:[NSString stringWithFormat:@"%@.jpg", picture.imgName]];
MyPhoto *photo = [[MyPhoto alloc] initWithImageURL:nil name:[NSString stringWithFormat:@"%@, %@, %@", picture.friendlyName, picture.type, picture.date] image:img painter:(Painter *)picture.painter];
[photos addObject:photo];
[photo release];
}
MyPhotoSource *source = [[MyPhotoSource alloc] initWithPhotos:[NSArray arrayWithArray:photos]];
EGOPhotoViewController *photoController = [[EGOPhotoViewController alloc] initWithPhotoSource:source];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:photoController];
navController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
navController.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentModalViewController:navController animated:YES];
[navController release];
[photoController release];
[source release];
[photos release];
I use EGOPhotoViewer as a modalView.
What could be the problem I'm having?

Caption goes under toolbar on iPad

I'm seeing the caption half disappear beneath the toolbar when the iPad goes into Landscape mode. Can anyone confirm this? Is there a way to adjust caption placement from PVPhotoViewController?

Small bug in EGOImageLoader

the keyForURL method returns the hash of the URL description string, which is probably a bad choice. I found examples of URL descriptions that were different but returned the same hash (and if I remember my comp sci well enough, I think this is typical of most hash code implementations).

Better to key the cached UIImage's with the URL's absoluteString, which is working for me so far.

Scrool Photos, verify if image is downloaded

Hello,

In my code, in function "- (void)layoutScrollViewAnimated:(BOOL)animated{" in file "EGOPhotoImageView.m" I add a verification if image exists: "if (self.imageView.image) {" :

  • (void)layoutScrollViewAnimated:(BOOL)animated{
    if (self.imageView.image) {

    if (animated) {
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:0.0001];
    }

    CGFloat hfactor = self.imageView.image.size.width / self.frame.size.width;
    CGFloat vfactor = self.imageView.image.size.height / self.frame.size.height;

    CGFloat factor = MAX(hfactor, vfactor);

    CGFloat newWidth = self.imageView.image.size.width / factor;
    CGFloat newHeight = self.imageView.image.size.height / factor;

    CGFloat leftOffset = (self.frame.size.width - newWidth) / 2;
    CGFloat topOffset = (self.frame.size.height - newHeight) / 2;

    self.scrollView.frame = CGRectMake(leftOffset, topOffset, newWidth, newHeight);
    self.scrollView.layer.position = CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2);
    self.scrollView.contentSize = CGSizeMake(self.scrollView.bounds.size.width, self.scrollView.bounds.size.height);
    self.scrollView.contentOffset = CGPointMake(0.0f, 0.0f);
    self.imageView.frame = self.scrollView.bounds;

    if (animated) {
    [UIView commitAnimations];
    }
    }

}

With this, the code is working very fine.
Can you add this in project because I'm using CocoaPods.

Congratulations for your work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.