0

最近、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 >'

助けが必要ですか、それ以外に共有プロパティを実装する他の方法はありますか?

4

1 に答える 1

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];
于 2012-04-09T06:37:06.803 に答える