изменить высоту кастома динамически проблемный iphone - PullRequest
1 голос
/ 10 марта 2011
Hi every one i have use two custom cell in a table view at a time .

Cell one contains labels and buttons 

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??

Ответы [ 2 ]

1 голос
/ 10 марта 2011

проверить heightForRowAtIndexPath здесь

и возвращаем 110 или 80 в зависимости от indexPath.row

0 голосов
/ 13 мая 2013
// 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;

    }
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...