PhotoStack icon indicating copy to clipboard operation
PhotoStack copied to clipboard

willFlickAwayPhotoAtIndex not getting called

Open Charlienofun opened this issue 12 years ago • 5 comments

Hello, I noticed willFlickAwayPhotoAtIndex does not get called in the sample app or in my own app where I set the delegate in my viewdidload "photoStack.delegate = self;"

Charlienofun avatar Jul 19 '13 07:07 Charlienofun

Hello mate, I'm having trouble replicating this issue.

Just to clarify – you're referring to the protocol method photoStackView:willFlickAwayPhotoAtIndex that is implemented in PhotoStackViewController.m on line 74?

Are the other ones getting fired?

tomlongo avatar Jul 19 '13 08:07 tomlongo

Hello! That is correct the method on line 74 does not fire.

didRevealPhotoAtIndex, didSelectPhotoAtIndex and willStartMovingPhotoAtIndex do work.

I let Xcode update the project settings I don't think I tried it before that. I'm running 4.6.3

Charlienofun avatar Jul 19 '13 08:07 Charlienofun

hmm, are you able to check to make sure it goes through the if statement on line 108 of PhotoStackView.m, if ([self.delegate respondsToSelector:@selector(photoStackView:willFlickAwayPhotoAtIndex:)])

that line checks to see if the delegate responds to the selector, might help with troubleshooting. Happy to look at the code if you're willign to share.

tomlongo avatar Jul 19 '13 09:07 tomlongo

Oh I'm such an idiot!! I was looking at an older commit!

The protocol was changed from: photoStackView:willFlickAwayPhotoAtIndex:

To: photoStackView:willFlickAwayPhotoFromIndex:toIndex:

so, to fix this you need to update the delegate to implement this:

-(void)photoStackView:(PhotoStackView *)photoStackView willFlickAwayPhotoFromIndex:(NSUInteger)fromIndex toIndex:(NSUInteger)toIndex { // Do things here }

I have updated the ViewController in the demo with the new method if you need a reference (see latest commit). Sorry about the confusion!

tomlongo avatar Aug 04 '13 08:08 tomlongo

photostack-prashant

It's a android application created by me, i have a source code for this application. if you like to get it then contact me i'll give you FREE.

prashant31191 avatar Apr 03 '14 07:04 prashant31191