01-19-2011, 12:01 PM
#1 (permalink )
Registered Member
Join Date: Jan 2011
Posts: 1
UITableView with ViewController
Hi, well I followed
this tutorial and everything works fine.
But when I try to do the same, but replacing everything that has to do with the word book with Klas (dutch word for class), and put the things I need to place in the RootView in the BooksViewController it works,
accept for the 3rd view to appear.
This is my code:
Quote:
- (void)viewWillAppear BOOL)animated {
if ([self.title isEqualToString:@"1ste Jaars Gymnasium"]) {
klassen = [[NSArray alloc ] initWithObjects:@"G11", @"G12", nil];
} if ([self.title isEqualToString:@"2de Jaars Gymnasium"]) {
klassen = [[NSArray alloc ] initWithObjects:@"G21", @"G22", @"G23", nil];
} if ([self.title isEqualToString:@"3de Jaars Gymnasium"]) {
klassen = [[NSArray alloc ] initWithObjects:@"G31", @"G32", @"G33", nil];
} if ([self.title isEqualToString:@"4de Jaars Gymnasium"]) {
klassen = [[NSArray alloc ] initWithObjects:@"G41", @"G42", @"G43", @"G44", @"G45", @"G46", nil];
} if ([self.title isEqualToString:@"5de Jaars Gymnasium"]) {
klassen = [[NSArray alloc ] initWithObjects:@"G51", @"G52", @"G53", @"G54", @"G55", nil];
} if ([self.title isEqualToString:@"6de Jaars Gymnasium"]) {
klassen = [[NSArray alloc ] initWithObjects:@"G61", @"G62", @"G63", @"G64", @"G65", nil];
} if ([self.title isEqualToString:@"1ste Jaars Atheneum"]) {
klassen = [[NSArray alloc ] initWithObjects:@"A11", @"A12", @"A13", @"A14", nil];
} if ([self.title isEqualToString:@"2de Jaars Atheneum"]) {
klassen = [[NSArray alloc ] initWithObjects:@"A21", @"A22", @"A23", @"A24", nil];
} if ([self.title isEqualToString:@"3de Jaars Atheneum"]) {
klassen = [[NSArray alloc ] initWithObjects:@"A31", @"A32", @"A33", @"A34", @"A35", nil];
} if ([self.title isEqualToString:@"3de Jaars Atheneum"]) {
klassen = [[NSArray alloc ] initWithObjects:@"A31", @"A32", @"A33", @"A34", @"A35", nil];
} if ([self.title isEqualToString:@"4de Jaars Atheneum"]) {
klassen = [[NSArray alloc ] initWithObjects:@"A41", @"A42", @"A43", @"A44", @"A45", @"A46", nil];
} if ([self.title isEqualToString:@"5de Jaars Atheneum"]) {
klassen = [[NSArray alloc ] initWithObjects:@"A51", @"A52", @"A53", @"A54", @"***", nil];
} if ([self.title isEqualToString:@"6de Jaars Atheneum"]) {
klassen = [[NSArray alloc ] initWithObjects:@"A61", @"A62", @"A63", @"A64", @"A65", nil];
} if ([self.title isEqualToString:@"1ste Jaars Havo"]) {
klassen = [[NSArray alloc ] initWithObjects:@"H11", @"H12", @"H13", nil];
} if ([self.title isEqualToString:@"2de Jaars Havo"]) {
klassen = [[NSArray alloc ] initWithObjects:@"H21", @"H22", @"H23", @"H24", nil];
} if ([self.title isEqualToString:@"3de Jaars Havo"]) {
klassen = [[NSArray alloc ] initWithObjects:@"H31", @"H32", @"H33", @"H34", @"H35", nil];
} if ([self.title isEqualToString:@"4de Jaars Havo"]) {
klassen = [[NSArray alloc ] initWithObjects:@"H41", @"H42", @"H43", @"H44", @"H45", @"H46", nil];
} if ([self.title isEqualToString:@"5de Jaars Havo"]) {
klassen = [[NSArray alloc ] initWithObjects:@"H51", @"H52", @"H53", @"H54", nil];
} if ([self.title isEqualToString:@"3de Jaars VMBO-T"]) {
klassen = [[NSArray alloc ] initWithObjects:@"M31", @"M32", @"M33", nil];
} if ([self.title isEqualToString:@"4de Jaars VMBO-T"]) {
klassen = [[NSArray alloc ] initWithObjects:@"M41", @"M42", @"M43", nil];
}
[super viewWillAppear:animated];
[self.tableView reloadData];
}
So what i tought was is it the problem that I need to put the name of the selected row in the first view (the first view contains: Gymnasium, Atheneum, Havo and VMBO-T instead of Clancy, Tom and Lehane, David)?
but what do i need to inster there?(I'm referring to:
if ([self.title isEqualToString:@"1ste Jaars Gymnasium"]) {
klassen = [[NSArray alloc ] initWithObjects:@"G11", @"G12", nil];
Dante.
Thread Tools
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
» Advertisements
» Online Users: 359
12 members and 347 guests
7twenty7 , blueorb , dre , iAppDeveloper , jeroenkeij , Mah6447 , Morrisone , mottdog , sacha1996 , Sami Gh , stanny , toon4413
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,667
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, host number one