I select UITableViewCell with also create xib file.
When I create custom tableViewCell with xib, I see contentView height is 0,5 point less than tableViewCell height.
How do I make the contentView height same to cell height?
I believe the 0.5 is to account for the separator automatically applied to cell in a uitableview.
Related
I have three two subviews inside cell contentview. I have height constraint for both of the subviews. Depending on flag I want to hide either of the view. For this i have changed height constraint.
It is not changing the cell height. How can I change the cell height.
I have a simple tableview cell with one label (named Bio).
Tableview in storyboard. I want that this label should be change in width according to cell width. e.g. 40% of cell width.
It's easy to do in any view. But can't find the option when I control-drag label to cell content view. The "Equal Widths" is missing. (Also "Equal Heights" missing). Is anything I am missing or its XCode(6.1.1) bug ??
I'm trying, with no success yet, to add a UiCollectionView to a static UITableViewCell and have it resize the tableViewCell vertically as the numbers of items in the collection grows. Is this even possible or is there a better solution to this problem?
Add height constraint in collectionview through storyboard and declare an iboutlet of class NSLayoutconstraint in tablecell for that constraint. In your tableview cell data configuration code change the constant value of that property to collectionview's contentsize.height. This will force the collectionview to increase its height which interns will force the cell to increase its height.
You can call .contentSize on the collection view to get is't size, and set that size for the UITableViewCell size.
In UITableview I am adding another UIView, it's height should be dynamic according to cell height, the problem I am facing is it is not accurate.
The height of UIView is not varying correctly with cell and it is calculated again and again on table reloading.
When you load your data, you can calculate the each cell's height, and store them in a array, then you can use this frame array to setup the uiview's frame
You have to provide constraints on your UIView according to contentView of cell top,bottom,leading,trailing value 0 , So your UIView height and width is same as cell height & width.
Please refer http://www.raywenderlich.com/50317/beginning-auto-layout-tutorial-in-ios-7-part-1 for learning autoLayout for beginner.
I have tableview frame height is 300. I have created one custom UITableViewCell subclass for adding to UITableView cell. When ever i adding custom cell to tableview, tableview is not increasing the height of frame. Tableview height constant like previous height 300. I want that whenever custom cell is adding the tableview height should be increase. How to resolve this?