Created
January 26, 2015 16:45
-
-
Save goshmx/428e61a78fac5d88fac1 to your computer and use it in GitHub Desktop.
Codigo para integrar funciones de tablas de UI Table View
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
/********************************************************************************************** | |
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