I’m working on “Getting started developing applications for the iPad,” and I hung up in Chapter 3, where I created a project that works with an action sheet.
As of now, my application loads into the simulator just fine, without errors that I know of, but as it launches it crashes with the following errors appearing in the debugger window:
2010-05-31 19: 44: 39.703 UsingViewsActionSheet [49538: 207] *** Approval denial - - [UIActionSheet showInView:], / SourceCache / UIKit _Sim / UIKit-1145.66 / UIAlert.m: 7073
2010-05-31 19: 44: 39.705 UsingViewsActionSheet [49538: 207] *** The application terminated due to the uncaught exception "NSInternalInconsistencyException", reason: "Invalid parameter not satisfying: view! = Nil
I am sure this is the block where the application breaks based on my use of breakpoints.
// viewDidLoadDeploy to perform additional configuration after loading the view, usually from nib.
- (void)viewDidLoad {
UIActionSheet *action = [[UIActionSheet alloc]
initWithTitle:@"This is my Action Sheet!"
delegate:self
cancelButtonTitle:@"OK"
destructiveButtonTitle:@"Delete Message!"
otherButtonTitles:@"Option 1", @"Option 2", @"Option 3", nil];
[action showInView:self.view]
[action release]
[super viewDidLoad]
} Code>
Am I missing something obvious, or is there a problem with something shown here? I looked through the abstract for showInView and I can not divine anything there.
I appreciate everything and everyone contesting.
Hi,
Steve O'Sullivan
source
share