Need help on implement action button with SHAREKIT for xcode?
I am implement my app with Facebook with Share kit. I am using Action button in the toolbar with below code. I have error on below line when I click the action button or when the share method got called. Please enlighten me!
- (IBAction)share:(id)sender {
NSString *text;
NSLog(@"myButtonHandlerAction");
if (TextView.selectedRange.length > 0)
text = [TextView.text substringWithRange:TextView.selectedRange];
else
text = TextView.text;
SHKItem *item = [SHKItem text:text];
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
//this line is causing error
[actionSheet showFromToolbar:self.navigationController.toolbar];
}
Error message is * Terminating app due to uncaught exception 'NSInternalInconsistencyExcep开发者_Go百科tion', reason: 'Invalid parameter not satisfying: view != nil'
Check if HKItem *item = [SHKItem text:@"TEST TEXT"]; works
if it does, then you know whats the problem!
精彩评论