我的UIActionSheet
. 当我单击任何按钮时,它会崩溃。我激活了NSZombieEnabled
。然后,我收到以下错误消息。
[FacebookConfigurationController actionSheet:clickedButtonAtIndex:]: 消息发送到 释放实例 0x84d4430
我在我的方法中放了一个断点
-(void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger) index
但在它停止之前崩溃。这是我的代码,如果你能帮助我
FacebookConfigurationController.h
@interface FacebookConfigurationController: UIViewController<UIActionSheetDelegate,...>
FacebookConfigurationController.m
-(void) LaunchFacebookMenu
{
if([Commentaire isEqual:@""])
{
NSLog(@"You must enter a comment");
}
else
{
UIActionSheet *action = [[UIActionSheet alloc] initWithTitle: [self getLanguageValue: @"facebook_popup_title"]
delegate: self
cancelButtonTitle: nil
destructiveButtonTitle:
[self getLanguageValue: @"facebook_popup_cancel"]
otherButtonTitles:
[self getLanguageValue: @"facebook_popup_userwall"],
[self getLanguageValue: @"facebook_popup_friendwall"],
[self getLanguageValue: @"facebook_popup_deconect"],nil];
action.actionSheetStyle =UIActionSheetStyleBlackTranslucent;
[action showInView:m_CurrentView.view];
[action release];
}
}
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)Index
{
switch (Index)
{
case 0:
{
[m_CurrentView dismissModalViewControllerAnimated:YES];
break;
}
case 1:
{
...
...
...