Skip to content

Instantly share code, notes, and snippets.

@goshmx
Created January 26, 2015 16:45
Show Gist options
  • Save goshmx/428e61a78fac5d88fac1 to your computer and use it in GitHub Desktop.
Save goshmx/428e61a78fac5d88fac1 to your computer and use it in GitHub Desktop.
Codigo para integrar funciones de tablas de UI Table View
/**********************************************************************************************
Table Functions
**********************************************************************************************/
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
//-------------------------------------------------------------------------------
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [datos count];
}
//-------------------------------------------------------------------------------
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 64;
}
//-------------------------------------------------------------------------------
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
//NSLog(@"ScoresList");
static NSString *CellIdentifier = @"ScoresList";
ScoresList *cell = (ScoresList *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[ScoresList alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
NSMutableArray *dato = datos[indexPath.row];
cell.score.text = [dato objectAtIndex:0];
cell.fechahora.text = [dato objectAtIndex:1];
return cell;
}
//-------------------------------------------------------------------------------
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment