1
UIActionSheet
에 문제가 있습니다. 버튼을 클릭하면 충돌이 발생합니다. 나는 NSZombieEnabled
을 활성화했다. 그런 다음 다음과 같은 오류 메시지가 나타납니다. 멈출 전에 버튼을 클릭하면 UIActionSheet가 왜 충돌합니까?
[FacebookConfigurationController actionSheet:clickedButtonAtIndex:]: message sent to deallocated instance 0x84d4430나는 나의 방법
-(void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger) index
그러나 충돌에 중단 점을 넣어. 당신이 당신의 FacebookConfigurationController object
를 공개 했 당신이 나에게
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:
{
...
...
...