开发者

How to reload and animate specific cell in UITableView in iPhone sdk

开发者 https://www.devze.com 2023-03-15 05:55 出处:网络
In my application, I am using tableview with some rows. In each row I am displaying some part of text.In that row below text there is a Expandbtn. If we click that we will display the whole

In my application, I am using tableview with some rows. In each row I am displaying some part of text.In that row below text there is a Expandbtn. If we click that we will display the whole text.

For that I want to use reloadRowsAtIndexPaths: WithAnimation: method . I want to apply this method when I click Expandbtn in each cell.

I am using that above method for expanding text in cell. My Problem If I expand text in first and go to 2nd cell it appears to be expanding and it is overlaping with first cell. If I scroll the table to the top, then first cell appears to 开发者_如何学Cbe NOT Expanding.

Can Anyone Help me in this. Thanks in Advance.


Relating to "If I scroll the table to the top, then first cell appears to be NOT Expanding." It sounds like you are not dynamically determining the height of the rows.

Are you implementing the delegate method - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath in your NSTableViewController? If so, make sure you are returning a different value before and after you expand the row.

0

精彩评论

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