Created
March 11, 2012 12:19
-
-
Save mchirico/2016239 to your computer and use it in GitHub Desktop.
prepareForSegue Template
This file contains 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
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender | |
{ | |
if ([segue.identifier hasPrefix:@"Create Label"]) { | |
AskerViewController *asker = (AskerViewController *)segue.destinationViewController; | |
asker.question = @"What"; | |
asker.delegate = self; | |
} | |
// This is really cool. | |
if ([segue.identifier hasPrefix:@"Segue Table0"]) { | |
NSLog(@"Going to table"); | |
SqliteDoer *sD = [ [SqliteDoer alloc] init]; | |
[sD setPath]; | |
//[sD drop: 0]; | |
[sD create: 0]; | |
[sD query: 0]; | |
[sD pr]; | |
NSMutableArray * n = [[NSMutableArray alloc] initWithObjects:nil]; | |
[sD pr: n]; | |
[segue.destinationViewController setDataArray:n]; | |
/* //Here's a basic example | |
NSMutableArray *dataArray; | |
dataArray = [[NSMutableArray alloc] init ]; | |
[dataArray addObject:@"brown"]; | |
[dataArray addObject:@"red"]; | |
[dataArray addObject:@"green"]; | |
[dataArray addObject:@"yellow"]; | |
[segue.destinationViewController setDataArray:dataArray]; | |
*/ | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment