//
// ViewController.m
// 111
//
// Created by MS on 15-8-10.
// Copyright (c) 2015年 ___FULLUSERNAME___. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()<UITableViewDataSource,UITableViewDelegate>
{
NSMutableArray *listData;
UITableView *table;
}
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
table=[[UITableView alloc]initWithFrame:self.view.bounds style:UITableViewStylePlain];
table.delegate=self;
table.dataSource=self;
[self.view addSubview:table];
listData=[NSMutableArray new];
[self getDataList];
}
-(void)getDataList{
for (int i = 0; i<3; i++) {
NSString *str = [NSString stringWithFormat:@"%d",i];
[listData addObject:str];
}
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInS