My project in short:- I added a Toolbar with a bar button item and set its identifier to "action" in Interface builder.
- In my .h I have: "-(IBAction)shareBtn: (id) sender;"
- In my .m (at top) I have: "#import "SHK.h"
- In my .m I have:
Code:
-(IBAction)shareBtn: (id) sender{
// Create the item to share (in this example, a url)
NSURL *url = [NSURL URLWithString:@"http://getsharekit.com"];
SHKItem *item = [SHKItem URL:url title:@"ShareKit is Awesome!"];
// Get the ShareKit action sheet
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
// Display the action sheet
[actionSheet showFromToolbar:navigationController.toolbar];
}
I get an error on the last line regarding the navigationController...
Quote:
|
'navigationController' undeclared (first use in this function)
|
The IBAction shareButton will open a simple alert (UIAlertView) no problem.