开发者

different different height for each row in UITableView

开发者 https://www.devze.com 2023-01-13 04:30 出处:网络
how to make the first three row height should be 60 and remaining row height should be 25 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

精彩评论

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