Anyone have any ideas what this means and how to sort it out?
* Assertion failure in -[UIActionSheet showInView:], /SourceCache/UIKit_Sim/UIKit-1912.3/UIActionSheet.m:4630 2012-03-02 17:12:34.643 Strategy & Risk[66854:15803] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: view != nil'
Update: It only happens sporadically:
Update 2: I don't have a tab bar or tool bar in my app
Update 3: I have changed the code to use showInView: and I get the exact same error message.
- (void)displayAddEntityActionSheet {
//Convert the tap location to this view's coordinate systems
CGRect buttonTappedRect = [self.currentNodeView convertRect:self.currentNodeView.frame toView:self.view];
UIActionSheet *actionSheet;
switch (self.currentNode.nodeType) {
case NodeTypeEntity:
actionSheet = [[[UIActionSheet alloc]initWithTitle:nil delegate:self cancelButtonTitle:nil
destructiveButtonTitle:nil otherButtonTitles:@"Entity", @"Objective", nil] autorelease];
[actionSheet showFromRect:buttonTappedRect inView:self.view animated:YES];
break;
case NodeTypeObjective:
actionSheet = [[[UIActionSheet alloc]initWithTitle:nil delegate:self cancelButtonTitle:nil
destructiveButtonTitle:nil otherButtonTitles:@"Risk", @"KPI", nil] autorelease];
[actionSheet showFromRect:buttonTappedRect inView:self.view animated:YES];
break;
case NodeTypeRisk:
actionSheet = [[[UIActionSheet alloc]initWithTitle:nil delegate:self cancelButtonTitle:nil
destructiveButtonTitle:nil otherButtonTitles:@"KRI", @"Control", nil] autorelease];
[actionSheet showFromRect:buttonTappedRect inView:self.view animated:YES];
break;
case NodeTypeControl:
actionSheet = [[[UIActionSheet alloc]initWithTitle:nil delegate:self cancelButtonTitle:nil
destructiveButtonTitle:nil otherButtonTitles:@"KCI", nil] autorelease];
[actionSheet showFromRect:buttonTappedRect inView:self.view animated:YES];
break;
default:
break;
}
}