【发布时间】:2012-04-10 14:10:42
【问题描述】:
最近我使用 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 >'
需要一些帮助,否则他们还有其他方式来实现共享属性吗?
【问题讨论】:
-
我认为我们需要查看更多代码才能正确调试它。但是,我认为您的第二个问题是您将 self 作为委托传递给 SHKActionSheet 但 SHKActionSheet 期望一个符合 UIActionSheetDelegate 协议的对象。尝试将 UIActionSheetDelegate 协议添加到您的接口定义中。
-
@parth 是的,这清除了警告.. 谢谢