Reputation: 29064
I am new to both sharekit and ios development. Would like to have some help in implementing sharekit from a button instead of a toolbar..
For example, I sharing an link:
- (IBAction) btnShareClicked :(id)sender;
{
SHKItem *item = [SHKItem URL:webView.request.URL title:[webView pageTitle]];
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
[actionSheet showFromToolbar:self.navigationController.toolbar];
}
How do change this example code to include the button instead of a toolbar.. Need some guidance.. Sorry if it is a stupid question...
Upvotes: 0
Views: 175
Reputation: 19789
Just check the UIActionSheet
documentation...
e.g.
[actionSheet showInView:[sender view];
or:
[actionSheet showFromRect:[[sender view] frame] inView:[[sender view] superview] animated:YES];
assuming that the sender is your button, which it should be.
Upvotes: 1
Reputation: 29064
- (IBAction) btnShareClicked :(id)sender;
{
NSString *text = @"Hello";
SHKItem *item = [SHKItem text:text];
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
[actionSheet showInView:self.view];
}
Upvotes: 1