Added customizable action sheets to the photo browser #75

Closed
wants to merge 2 commits into from

4 participants

@hoan

It adds this optional method to the delegate

  • (void) photoBrowser:(MWPhotoBrowser *)photoBrowser actionIndex:(NSUInteger)index;

Set the actions this way:

browser.displayActionButton = YES;
browser.actionButtons = [NSArray arrayWithObjects:@"Save", "Copy", "Flag", nil];

Thanks for the great library. This gives us the ability to customize the action sheets and implement whatever kind of things we want. I've updated the readme as well. Only bad thing is that the default "Copy" etc are not ever called.

@koenoe

Unfortunately it doesn't work in iOS6. App crashes right away. I need this function, so maybe I'll do an attempt to implement it.

@hoan

@koenoe I've got this to work on iOS6 where I'm testing my new app. Show me your code and maybe I can help

@koenoe

Sorry for the late reply, but I already managed to fix it. You can see my code here:
https://github.com/koenoe/kitties-ios/blob/master/kitties/MWPhotoBrowser/Classes/MWPhotoBrowser.m

@jonasman

This feature is great. specially to add options like "share to FB". when is it gonna be merged to master?
I didnt want to use forks :S

@bushbert77

Yeah this was the first thing I asked myself was I able to add custom actions. So fantastic work which I'm sure will be so helpful for so many. Unfortunately for me, it crashes in IOS6. If don't set the actionbuttons array it works with a blank action menu. Just wondered if anyone had come across this issue to save me a little time. I just updated my MWPhotoBrowser header and module files as suggested and I get a bad access and crash.Thanks!

@hoan
@mwaterfall mwaterfall added a commit that closed this pull request Oct 2, 2013
@mwaterfall Added UIActivityViewController on iOS >= 6 to handle actions. Actions…
… are now customisable by implementing a delegate method.

Closes #75
ebf3a06
@mwaterfall mwaterfall closed this in ebf3a06 Oct 2, 2013
@gongpengjun gongpengjun added a commit that referenced this pull request Apr 18, 2014
@mwaterfall Added UIActivityViewController on iOS >= 6 to handle actions. Actions…
… are now customisable by implementing a delegate method.

Closes #75
8fc4b12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment