I need to resize the cell height based on the content size/length.tried several methods, which one gives the exact height without overlapping?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
Sample you can edit and try
This is from my previous answer - Customizing UITableViewCell's height:
Use this method to get the text height of the text
This method will return the height of the text you are passing. Add this method in your class. And use the tableView:heightForRowAtIndexPath: delegate method to set the height for each cell
In your case you need to set the height of cell based on the label.
Check the link :
http://dcraziee.wordpress.com/2013/05/22/calculate-size-of-uillabel-base-on-text-in/
There is a function named
Use that function to calculate height as :
see this tutorial for change
UITableViewCell
Height Dynamically..Resizing-A-UITableViewCell
and also use this tutorial..
uitableviewcell-dynamic-height
also use tableView:heightForRowAtIndexPath: method for set height of cell with
indexpath