Skip to content

Commit

Permalink
aleviate timing issues associated with presenting a sharer while the …
Browse files Browse the repository at this point in the history
…share menu is animating out by waiting for it to finish before presenting a sharer.
  • Loading branch information
steve committed Oct 17, 2012
1 parent ccf5502 commit 6de605f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Classes/ShareKit/UI/SHKShareMenu.h
Expand Up @@ -28,6 +28,7 @@
#import <UIKit/UIKit.h>
#import "SHK.h"

@class SHKSharer;
@protocol SHKShareItemDelegate;

@interface SHKShareMenu : UITableViewController
Expand All @@ -36,6 +37,7 @@
NSMutableArray *tableData;
NSMutableArray *exclusions;
id<SHKShareItemDelegate> shareDelegate;
SHKSharer* limboSharer;
}

@property (nonatomic, retain) SHKItem *item;
Expand Down
10 changes: 9 additions & 1 deletion Classes/ShareKit/UI/SHKShareMenu.m
Expand Up @@ -31,12 +31,17 @@
#import "SHKSharer.h"
#import "SHKShareItemDelegate.h"

@interface SHKShareMenu()
@property (retain) SHKSharer* limboSharer;
@end

@implementation SHKShareMenu

@synthesize item;
@synthesize tableData;
@synthesize exclusions;
@synthesize shareDelegate;
@synthesize limboSharer;

#pragma mark -
#pragma mark Initialization
Expand All @@ -47,6 +52,7 @@ - (void)dealloc
[tableData release];
[exclusions release];
[shareDelegate release];
[limboSharer release];
[super dealloc];
}

Expand Down Expand Up @@ -88,6 +94,8 @@ - (void)viewDidDisappear:(BOOL)animated

// Remove the SHK view wrapper from the window
[[SHK currentHelper] viewWasDismissed];
if(self.limboSharer != nil)
[self.limboSharer share];
}

- (void)setItem:(SHKItem *)i
Expand Down Expand Up @@ -302,7 +310,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
[[SHK currentHelper] hideCurrentViewControllerAnimated:YES];

if(doShare)
[sharer share];
self.limboSharer = sharer;
}
}

Expand Down

0 comments on commit 6de605f

Please sign in to comment.