开发者

change height of custom Dynamically problem iphone

开发者 https://www.devze.com 2023-02-16 10:06 出处:网络
Hi every one i have use two custom cell in a table view at a time . Cell one contains labels and 开发者_如何学Gobuttons
Hi every one i have use two custom cell in a table view at a time .

Cell one contains labels and 开发者_如何学Gobuttons 

Cell Two Contain next and previous Button 

i am adding cell Two at last index of the table view my question is that how can i change the height of cell 2 dynamically

Height of Cell one is 110 and i want the height of cell two is 80 what can i do any idea??


check out heightForRowAtIndexPath here

and return 110 or 80 depending on the indexPath.row


// considered your table have single section and multiple rows...  

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

    if(indexPath.row == [tableView numberOfRowsInSection:0]-1){
            return 80;
        }
        return 110;

    }
0

精彩评论

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

关注公众号