Created
July 5, 2011 16:39
-
-
Save beelsebob/1065219 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString *title = [self loggedIn] ? [self titleForIndexPathAfterLogin:indexPath] : [self titleForRowBeforeLogin:indexPath.row]; | |
NSLog(@"Got back text: %@", title); | |
... | |
- (NSString *)titleForIndexPathAfterLogin:(NSIndexPath *)path | |
{ | |
switch ([path section]) | |
{ | |
case 0: | |
{ | |
switch ([path row]) | |
{ | |
case 0: | |
return @"Play"; | |
default: | |
return @""; | |
} | |
} | |
case 1: | |
{ | |
NSLog(@"Getting title for row %d", [path row]); | |
switch ([path row]) | |
{ | |
case 0: | |
return @"Visit Barracks"; | |
case 1: | |
return @"Visit Marketplace"; | |
default: | |
return @""; | |
} | |
} | |
case 2: | |
{ | |
switch ([path row]) | |
{ | |
case 0: | |
return @"Log Out"; | |
default: | |
return @""; | |
} | |
} | |
default: | |
return @""; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2011-07-05 17:37:35.787 FS Battles[488:707] Getting title for row 0 | |
2011-07-05 17:37:35.789 FS Battles[488:707] Got back text: (null) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment