Skip to content

Instantly share code, notes, and snippets.

@ejknapp
Created December 14, 2009 23:55
Show Gist options
  • Select an option

  • Save ejknapp/256579 to your computer and use it in GitHub Desktop.

Select an option

Save ejknapp/256579 to your computer and use it in GitHub Desktop.
//Datasource array for table view
- (void)createDataSourceArray {
NSDictionary *credentials = [self.flakManager.settingsManager loginCredentials];
NSDictionary *loginDictionary = [[NSDictionary alloc] initWithObjectsAndKeys:
@"Logged in as:", @"sectionTitle",
[NSArray arrayWithObjects:
[credentials objectForKey:@"currentLoggedInUserByName"],
nil], @"rowArray",
nil];
NSDictionary *hostDictionary = [[NSDictionary alloc] initWithObjectsAndKeys:
@"Current Host:", @"sectionTitle",
[NSArray arrayWithObjects:
[self.flakManager.settingsManager currentHostURL],
nil], @"rowArray",
nil];
NSArray *dataArray = [[NSArray alloc] initWithObjects:loginDictionary, hostDictionary, nil];
self.dataSourceArray = dataArray;
[dataArray release];
[loginDictionary release];
[hostDictionary release];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment