UITableView 常用的几个方法

- (NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {

    

    return 1;

    

}


- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

    

    return 1;

    

}


- (UITableViewCell*) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    

    static NSString *Identifier = @"Cell";

   UITableViewCell *cell       = [tableView dequeueReusableCellWithIdentifier:Identifier];

    if (cell == nil) {

        cell = [[[UITableViewCellalloc]initWithStyle:UITableViewCellStyleDefaultreuseIdentifier:Identifier] autorelease];

    }

    

    

    

    return cell;

    

}


- (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

    

    

}

posted @ 2014-01-06 11:40  沙影无痕  阅读(94)  评论(0编辑  收藏  举报