LMAlertView
LMAlertView copied to clipboard
message sent to deallocated instance error
Hi,
I'm calling segue on click of the other button, and this throws "message sent to deallocated instance" error on line #532 in LMAlertView.m file. The line is shown below. if ([self.delegate respondsToSelector:@selector(alertView:didDismissWithButtonIndex:)]) { [self.delegate alertView:(UIAlertView *)self didDismissWithButtonIndex:buttonIndex]; }
This is my code on alertview delegate. -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{ if(buttonIndex==1){ [alertView dismissWithClickedButtonIndex:-1 animated:true]; alertView=nil; [self performSegueWithIdentifier:@"xxxx" sender:self]; } }
Any suggestions please advice ?