This may be a simple question, but I have searched for hours but was unable to find the answer.
Is
The reason is that I need to calculate the height of using NSAttributedString BoundingRectWithSize and obstruct the width of the cell.
BoundingRectWithSize and obstruct the width of the cell.
Currently I'm calculating it in the cellForRowAtIndexPath method and then reloading the row.
cellForRowAtIndexPath method and then reloading the row.
This is causing every row to be refreshed after calculating its height, which is not a very good user experience.
Do I have both heightForRowAtIndexPath UITableView , both grouped and plain.
heightForRowAtIndexPath UITableView , both grouped and plain.
In grouped table views, the number of cells is smaller than the width of the table view, which means that You should get t he width in your -cellForRowAtIndexPath: method to NSLog or NSLog (@ "% f", cell.contentView.frame.size.width) By running; . You can then use it to determine the height. There are cells in the table table that have the same width UITableView , and therefore, you can use the width of the table view i.e. the self.tableView Frame.size.width . Anything else can be found here:
In grouped table views, the number of cells is smaller than the width of the table view, which means that You should get t he width in your -cellForRowAtIndexPath: method to NSLog or NSLog (@ "% f", cell.contentView.frame.size.width) By running; . You can then use it to determine the height.
-cellForRowAtIndexPath: method to NSLog or NSLog (@ "% f", cell.contentView.frame.size.width) By running; . You can then use it to determine the height.
NSLog or NSLog (@ "% f", cell.contentView.frame.size.width) By running; . You can then use it to determine the height.
NSLog (@ "% f", cell.contentView.frame.size.width) By running; . You can then use it to determine the height.
There are cells in the table table that have the same width UITableView , and therefore, you can use the width of the table view i.e. the self.tableView Frame.size.width .
UITableView , and therefore, you can use the width of the table view i.e. the self.tableView Frame.size.width .
self.tableView Frame.size.width .
Anything else can be found here:
No comments: Post a Comment
Newer Post Older Post Home Subscribe to: Post Comments (Atom)
No comments:
Post a Comment