Hi guys,
I have a UIViewController (which sits inside a tabUIController). Within this UIViewController, I want to present a modelviewcontroller when a user clicks on a button. I cannot get this to work. With the code I have (see below) i get to the stage where i press the button but i get the strange error of "unable to read unknown load command 0x80000022".
Any ideas? (for the BrowserUIViewController i havent added anything in there yet, but it shouldnt matter, with any controller i just want to get the syntax right).
@interface AboutDoronUIViewController : UIViewController
<UITableViewDelegate, UITableViewDataSource> {
NSDictionary *values;
NSArray *keys;
BrowserUIViewController *browser;
AboutDoronUIViewController *about;
}
@property (retain, nonatomic) NSDictionary *values;
@property (retain, nonatomic) NSArray *keys;
@property (retain, nonatomic) BrowserUIViewController *browser;
@property (retain, nonatomic) AboutDoronUIViewController *about;
@end
...
- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSInteger section = [indexPath section];
NSUInteger row = [indexPath row];
NSString *getSection = [keys objectAtIndex:section];
NSArray *valuesForSection = [values objectForKey: getSection];
NSString *selectedLink = [valuesForSection objectAtIndex:row];
NSString *urlAddress = @"http://www.google.com";
//Create a URL object.
NSURL *url = [NSURL URLWithString:urlAddress];
//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; //unused for now
BrowserUIViewController *temp = [[BrowserUIViewController alloc] initWithNibName:@"BrowserUIViewController" bundle:nil];
self.browser = temp;
[self presentModalViewController:browser animated:YES];
[urlAddress release];
[valuesForSection release];
[selectedLink release];
[getSection release];
[temp release];
}