开发者

A question related to cell of UITabelview

UIButton * butt开发者_如何学JAVAon; I have put cell.accessoryView = button;

In didSelectRowAtIndexPath i have written above code,but it doesn't show UIButton on cell of UITabelView


You need to put this in the delegate method -tableView:cellForRowAtIndexPath: that initializes and returns cells for the table view:

- (UITableViewCell *) tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    // initialize cell and contents here, for the specified indexPath value
}

You might want to read the Table View Programming Guide for iPhone OS, which explains this in detail.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜