开发者

How to manually set UITableViewCell?

I created UITableVewCell subclas开发者_StackOverflow中文版s for my cell and I want set height of cell to 70px. It's possible? How can I do that?


I found solution;

- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 70;
}


You need to use the Delegate method of UITableView,similarly there are lot's of method for other purpose too.

- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {

    return 70;
}

For more details follow the below link:

http://developer.apple.com/library/ios/#documentation/uikit/reference/UITableViewDelegate_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40006942-CH3-DontLinkElementID_3

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜