开发者

How to manually set UITableViewCell?

开发者 https://www.devze.com 2023-02-20 07:52 出处:网络
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;

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

精彩评论

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