Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

iPhone SDK. Tutorial 11. TableViews. (Español Latino).

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
1,293
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on May 1, 2011

Apoya el canal bajando mi App: http://itunes.apple.com/us/app/cifra./id469340790?l=es&ls=1&mt=8
Tutorial 11. Entendiendo como funcionan los TableViews.
Y el codigo.

#pragma mark -
#pragma mark Table View Data Source Methods
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{

return [self.listData count];
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexpath{

static NSString *SimpleTableIdentifier = @"SimpleTableIdentifier";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: SimpleTableIdentifier];
if (cell == nil)
cell = [[[UITableViewCell alloc]initWithFrame:CGRectZero reuseIdentifier: SimpleTableIdentifier] autorelease]; NSUInteger row = [indexpath row];
cell.textLabel.text = [self.listData objectAtIndex:row];
cell.textLabel.font = [UIFont boldSystemFontOfSize:31];

UIImage *cupcake = [UIImage imageNamed:@"cakekawaii.png"];
cell.imageView.image = cupcake;

return cell;
}

#pragma mark -
#pragma mark Table Delegate Methods

-(NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath{
NSUInteger row = [indexPath row];
if (row == 0)
return nil;

return indexPath;

}

- (void)tableView:(UITableView *)tableView didSelecRowAtIndexPath:(NSIndexPath *)indexPath{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle: @"Hey, do you see the disclosure button?" message:@"If you're trying to drill down, touch that instead" delegate:nil cancelButtonTitle:@"Won't happen again" otherButtonTitles:nil]; [alert show]; [alert release];

}

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (LKronecker)

  • no pusiste len los coments lo que pegaste

  • @nemoaldape Ya esta el codigo. Saludos.

see all

All Comments (5)

Sign In or Sign Up now to post a comment!
  • Bueno, ese codigo si esta de loco!

  • Hola Polo, podrias por favor hacer nuevamente este ejemplo pero con elSDK que posee el 4.3? :(

  • yeah!! esos cupcakes!!!! un@

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more