Ola Mundo com UITableVIew-Cocoa Touch TutorialPosted by: Matheus on 14th September 2009Este tutorial explica os conceitos básicos de uma UITableView, seus métodos, instruções e conceitos para fazer a sua primeira programação utilizando Table Views
Classes: “RootViewController.h” @interface RootViewController : UITableViewController { }
@end
“RootViewController.m” #import “RootViewController.h” @implementation RootViewController - (void)viewDidLoad { [super viewDidLoad]; [self setTitle:@"Table"]; } #pragma mark Table view methods - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 5; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 2; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @”Cell”; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } [cell setText:@"Minha primeira célula"];
return cell; }
- (void)dealloc { [super dealloc]; }
@end
|
ClickakiBuscaParceirosCategorias
Twitter Updates |
One Response for "Ola Mundo com UITableVIew-Cocoa Touch Tutorial"
Genial os videos ! .. estão me ajudando pra caramba ! .. sou designer, estou iniciando na programação!
Abs.
Leave a reply