Я пытаюсь конвертировать это приложение, которое у меня есть, с iPhone на iPad. Я правильно настроил логику, но получаю излишнюю ошибку. Вот код.
SortingILove *controller = nil;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
controller = [[SortingILove alloc] initWithNibName:@"SortingILove-iPad" bundle:[NSBundle mainBundle]];
}
else
{
myTableView = [[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame] style:UITableViewStylePlain];
myTableView.delegate = self;
myTableView.dataSource = self;
itemsList = [[NSMutableArray alloc] init];
[itemsList addObject:@" attracted to Places"];
[itemsList addObject:@" in love with Shopping"];
[itemsList addObject:@" alive for Food"];
self.navigationItem.title = @"";
self.view = myTableView;
self.tableView.rowHeight=123;
self.tableView.autoresizesSubviews = YES;
self.tableView.scrollEnabled = YES;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.backgroundColor = [UIColor blackColor];
UIImage *backgroundImage = [UIImage imageNamed:@"Background.jpg"];
UIImageView *backgroundViews = [[[UIImageView alloc] initWithImage:backgroundImage] autorelease];
[self.tableView setBackgroundView:backgroundViews];
}
[self.navigationController pushViewController:controller animated:YES];
[controller release];
//tableView.backgroundView = backgroundViews;
//[self configureCell:cell atIndexPath:indexPath];
}