在iPhone应用程序上使用shareKit时出错?

时间:2012-04-09 05:37:55

标签: iphone sharekit

最近我使用shareKIt在我的iPhone应用程序上开发共享属性,并按照他们的指示添加了所需的框架,但是运行它们时没有错误,只有数字或编译器警告。当我从动作表单击Facebook / Twitter时,应用程序会卡住并崩溃..

我在SHKActionSheet.m上收到错误说badAccess

- (void)dealloc
{
[item release];
[sharers release];
[super dealloc];
}

上的编译器警告
SHKActionSheet *as = [[SHKActionSheet alloc] initWithTitle:SHKLocalizedString(@"Share")
                                                      delegate:self
                                             cancelButtonTitle:nil
                                    destructiveButtonTitle:nil
                                         otherButtonTitles:nil];

incomplete pointer type sending "Class" to parameter of type 'id< UIActionSheetDelegate >'

需要一些帮助,否则是他们以任何其他方式实现共享属性?

1 个答案:

答案 0 :(得分:0)

使用SHKActionSheet的错误alloc方法,请使用以下代码。

SHKItem *item = [SHKItem text:@"test"];
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];

[actionSheet showFromRect:CGRectMake(0, 0, 320, 250) inView:self.view animated:YES];