//
//  TableViewsViewController.m
//  TableViews
//
//  Created by Axit Patel on 9/3/10.
//  Copyright Bayside High School 2010. All rights reserved.
//

#import "TableViewsViewController.h"

@implementation TableViewsViewController

#pragma mark -
#pragma mark Synthesizers

@synthesize table;


#pragma mark -
#pragma mark View lifecycle

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
}

#pragma mark -
#pragma mark Table View datasource methods

// Required Methods

// Return the number of rows in a section
-(NSInteger) tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section
{
	return 1;
}

// Returns cell to render for each row
-(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
	static NSString *CellIdentifier = @"CellIdentifier";
	
	UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
	
	if (cell == nil) {
		cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
	}
	
	NSLog(@"Row: %i", indexPath.row);
	
	return cell;
}


#pragma mark -
#pragma mark Memory management

- (void)didReceiveMemoryWarning {
	NSLog(@"Memory Warning!");
    [super didReceiveMemoryWarning];
}

- (void)viewDidUnload {
	self.table = nil;
	[super viewDidUnload];
}


- (void)dealloc {
	[table release];
    [super dealloc];
}

@end
