原因:自定义的viewcontroller不是继承自uitableviewcontroller的,而是<UITableViewDelegate,UITableviewDataSource>,
所以在.m文件中需设置: tableview.delegate = self;
tableview.dataSource = self;(especially this line)
因为- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
和- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
是protocol UITableViewDataSource 的方法。