Skip to content

Commit

Permalink
Pass the responsibility to dismiss the view controller to its delegate.
Browse files Browse the repository at this point in the history
  • Loading branch information
lxcid committed Oct 31, 2011
1 parent 2682a1b commit 0488226
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions SVShareViewController/SVShareViewController.h
Expand Up @@ -38,5 +38,6 @@ typedef enum SVShareType SVShareType;
@protocol SVShareViewControllerDelegate

- (void)shareViewController:(SVShareViewController*)controller sendMessage:(NSString*)string forService:(SVShareType)shareType;
- (void)shareViewController:(SVShareViewController *)controller didDismissForService:(SVShareType)shareType;

@end
2 changes: 1 addition & 1 deletion SVShareViewController/SVShareViewController.m
Expand Up @@ -88,7 +88,7 @@ - (void)setDefaultMessage:(NSString *)aString {
#pragma mark Actions

- (void)dismiss {
[self.parentViewController dismissModalViewControllerAnimated:YES];
[self.delegate shareViewController:self didDismissForService:self.shareType];
}


Expand Down

0 comments on commit 0488226

Please sign in to comment.