How to remove the default space between tableview cells in tvos? By
default its taking 14px gap between the tableview cell in tvos,but i
need to increase the space by 20px.
The tableview adds that space for the focus animation, use a collectionview instead since it doesn't have a focus animation. You'll have to add the animation yourself though.
Related
When UIImageView is empty...than resize the UILabel and hidden the UIImageView.
Anyone a idea?
You can either change label bottom constraint constant to either bottom spacing or image view top constraint - depending of visibility of image view or
(Available in iOS 8.0 and later.)
Create two bottom NSLayoutConstraint for label. One with lower priority to bottom of the view and one with higher priority. Change active property to YES/NO of the one with higher priority depending of image view visibility
I have created a UIView with two subviews; a uibutton and uitextfield. The button is on the left of the text field and constraints determine the horizontal position for the text field automatically. Similarly the UITextfield expands to fit it's text content dynamically using constraints too.
I want the superview (UIView) to expand to the width of the both controls automatically but can't find a way to do so. Could someone suggest a way to create constraints for a superview so it adjusts when it's subviews change size?
Thanks
D
Update
Heya, So I am trying to create a Tag-Textfield like the following, where the user can enter text on the right or press a button on the left to prompt a modal popover list:
I've created a Tableview populated with cells with a fixed tableView.rowHeight = 95.0
The problem is that when I add more cells and I try to scroll to the bottom, I can see only half cell at the bottom. I mean, when I try to scroll I can't scroll down so that to see the entire last cell added.
Seems the scrolling bar doesn't work well. Is this a bug of Xcode or did I make something wrong?
I don't want a resizable height cell but I want my cell fixed with with 95.0 but at the same time I want my scrollbar to work better.
The problem is if the table height exceeds the your mainview. At that time srollview of tableview also goes down.solution is keep the tableview height within the bounds of mainview(i.e your viewcontroller's view)
I want to show a NSCollectionView inside a NSTableCellView. I have it setup correctly, and it works for the most part, but the collectionView's scrollview doesn't seem to resize properly against the NSTableCellView, even though I have auto-layout constraints setup for this.
Is there anything I can do to setup constraints in a way that the scrollview resizes against the NSTableCellView (which should also let the collectionView also resize itself)?
EDIT:
To elaborate, what I really want to do is have the collectionView expand and resize as the window is resized, and have it take up the same width as the tableViewCell, and depending on the number of items in the collection view, resize the height of the outlineView & hence determine the height of the outlineView's row. It works fine when the collectionView is part of an ordinary view, but I can't get it to resize itself inside a NSTableCellView.
Firstly, remove all of the constraints you've set for your collectionview/scrollview.
Now, you will need to make 4 constraints, one for each of the leading, trailing, top and bottom space from the scrollview to its superview. Make sure width and height are not constrained. I've done this in a recent app I've made and it worked rather well.
EDIT: Below in the comments we figured out the column wasn't resizing so the constraints were correctly set.
I've added a NSTableView in a NSScrollView IB in Xcode 4. Its controller class is displaying data whose horizontal length exceeds its row width. However, no horizontal scroll bars appear, so do we have to enable them?
(the table only has one column with no headers)
The data width is not the determining factor if horizontal scrolling will be enabled. You need to ensure the NSTableColumn is wider that the NSTableView for horizontal scrolling to be enabled.