row-height

Dynamic Height Issue for UITableView Cells (Swift)

强颜欢笑 提交于 2019-11-27 00:25:39
Dynamic text of variable length are being injected into tableview cell labels. In order for the tableview cells' heights to be dynamically sized, I have implemented in viewDidLoad() : self.tableView.estimatedRowHeight = 88.0 self.tableView.rowHeight = UITableViewAutomaticDimension This works nicely for the cells that have yet to be scrolled to (as UITableViewAutomaticDimention is called upon scrolling to the cell), but not for the cells that are initially rendered onscreen upon loading the table with data. I have tried simply reloading the data (as suggested in many other resources): self

GridView row height

心已入冬 提交于 2019-11-26 19:36:07
问题 I have a GridView that displays images, which are, unfortunately, of different sizes. They are shown in between two lines of text: text1.1 text1.2 ImageView(IMAGE1) ImageView(IMAGE2) text2.1 text2.2 text3.1 ImageView(IMAGE3) text4.1 etc.... If IMAGE1 is the same height as IMAGE2, everything is fine, but if IMAGE1 is longer than IMAGE2, text2.1 will run into text3.1 (padding doesn't seem to help much, as there's too much of it when images are of the same height). I know there's a way to

why UITableViewAutomaticDimension not working?

倾然丶 夕夏残阳落幕 提交于 2019-11-26 18:43:59
Hi there is plenty of question answering the dynamic height for UITableViewCell of UITableView . However I find it weird when I did it. here's are some of the answer : here and here usually this would answer the dynamic height for cell tableView.estimatedRowHeight = 44.0 tableView.rowHeight = UITableViewAutomaticDimension but in my case I wonder this line wont do anything. my UITableView is being viewed after clicking tabbar inside the splitview. Is this helpful? Maybe I'm Missing something. Could anyone help me I spent 2 hours doing silly. These are my constraint for title the title could be

Dynamic Height Issue for UITableView Cells (Swift)

放肆的年华 提交于 2019-11-26 09:18:47
问题 Dynamic text of variable length are being injected into tableview cell labels. In order for the tableview cells\' heights to be dynamically sized, I have implemented in viewDidLoad() : self.tableView.estimatedRowHeight = 88.0 self.tableView.rowHeight = UITableViewAutomaticDimension This works nicely for the cells that have yet to be scrolled to (as UITableViewAutomaticDimention is called upon scrolling to the cell), but not for the cells that are initially rendered onscreen upon loading the

UITableViewCell with dynamic height iOS

孤人 提交于 2019-11-26 07:37:50
问题 I have implemented TableView with CustomCell in my app, I want dynamic height of my UITableViewCell according to text length in UITableViewCell , here is the snapshot of Customcell : and here is the snapshot of my UITableView : code snippet for heightForRowAtIndexPath #define FONT_SIZE 14.0f #define CELL_CONTENT_WIDTH 320.0f #define CELL_CONTENT_MARGIN 10.0f - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath; { NSString *text = [DescArr

why UITableViewAutomaticDimension not working?

≯℡__Kan透↙ 提交于 2019-11-26 06:31:29
问题 Hi there is plenty of question answering the dynamic height for UITableViewCell of UITableView . However I find it weird when I did it. here\'s are some of the answer : here and here usually this would answer the dynamic height for cell tableView.estimatedRowHeight = 44.0 tableView.rowHeight = UITableViewAutomaticDimension but in my case I wonder this line wont do anything. my UITableView is being viewed after clicking tabbar inside the splitview. Is this helpful? Maybe I\'m Missing something

Setting custom UITableViewCells height

我们两清 提交于 2019-11-26 04:03:13
问题 I am using a custom UITableViewCell which has some labels, buttons and image views to be displayed. There is one label in the cell whose text is a NSString object and the length of string could be variable. Due to this, I cannot set a constant height to the cell in the UITableView \'s heightForCellAtIndex method. The cell\'s height depends on the label\'s height which can be determined using the NSString \'s sizeWithFont method. I tried using it, but it looks like I\'m going wrong somewhere.

Using Auto Layout in UITableView for dynamic cell layouts & variable row heights

穿精又带淫゛_ 提交于 2019-11-25 23:55:48
问题 How do you use Auto Layout within UITableViewCell s in a table view to let each cell\'s content and subviews determine the row height (itself/automatically), while maintaining smooth scrolling performance? 回答1: TL;DR: Don't like reading? Jump straight to the sample projects on GitHub: iOS 8 Sample Project - Requires iOS 8 iOS 7 Sample Project - Works on iOS 7+ Conceptual Description The first 2 steps below are applicable regardless of which iOS versions you are developing for. 1. Set Up & Add