#import "ViewController.h"
@interface ViewController ()
{
NSMutableArray *name;
}
@end
- (void)viewDidLoad
{
[super viewDidLoad];
name=[[NSMutableArray alloc]init];
[name addObject:@"ronak"];
[name addObject:@"vibha"];
[name addObject:@"shivani"];
[name addObject:@"nidhi"];
[name addObject:@"firdosh"];
[name addObject:@"himani"];
_tableview_outlet.delegate = self;
_tableview_outlet.dataSource = self;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [name count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *simpleTableIdentifier = @"cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier];
}
cell.textLabel.text = [name objectAtIndex:indexPath.row];
return cell;
}