I am getting compile warning: "Imcompatable pointer types sending UIToolbar to Parameter type UITabBar" at line "[actionSheet showFromTabBar:self.navigationController.toolbar];".
I know this is wrong but it works and I don't know how to make it work without the warning.
- (void)share
{
// 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 ac开发者_StackOverflowtion sheet
[actionSheet showFromTabBar:self.navigationController.toolbar];
}
The clue seems to be here;
[actionSheet showFromTabBar:self.navigationController.toolbar];
Shouldn't you be saying;
[actionSheet showFromToolBar:self.navigationController.toolbar];
ToolBars and TabBars are different types, hence your warning.
精彩评论