开发者

different different height for each row in UITableView

how to make the first three row height should be 60 and remaining row height should be 25 in UITableView.

How can i 开发者_Python百科do this?

Thanks.


Check out this link you can get the idea how we have to do it

different-height-for-alternative-cell-in-uitableview

or you can use the below delegate function

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
     if (indexPath.row < 3)
     {
        return 60;
     }
     else
     {
        return 25;
     }
}

HAppy Coding...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜