Remove the Floating of headers in NSTableview - objective-c

I have a NSTableview in my application. Theres a header and under these are some elements like rows of a table view. So when i scroll this table view the header stays put and it scrolls up only if the last element in the table view scrolls up and disappers. I Need the header to scroll like the remaining rows. Please help. Is it possible.?

Uncheck Floats Group Rowsin Attribute Inspector of the Table View

Related

Disable floating of header in NSTabelView?

I am using view based NStableview and I am using table header for providing space between top of scroll view and first row of my TableView. I want this space to scroll up when user scrolls tableview, but the header is floating and is not scrolling up. It just sticks there on the top.
I need to provide a gap between top of scroll view and first cell of header view. I can think of other solution like creating a different cell for first row, but this solution creates whole bunch of bugs with indexes of table and data. So I decided to use table header for providing the space between top of scroll view and first row of table view.
Is there any solution for this other than using header for table? If no can I disable the floating behaviour of header view?
To disable floating just set floatsGroupRows = NO ?!
Maybe the contentInsets property of NSScrollView is what you look for.
You can define a top inset. (100 in my example)
Code (same for Swift and Objective-C):
self.scrollView.contentInsets = NSEdgeInsetsMake(100, 0, 0, 0);

How to do multiple table view in scroll view

I am new to IOS, I want three table views in one view controller. when I scroll in horizontal it will move to table 2 and table 3. please help me in coding. how doing it.
Put horizontal scroll view with content offset width equal to 3 tables width then add uitableviews to that scroll view with proper x origin. Obviously it would be better to use NSLayoutConstraints for that, but the first way is o.k. for you I guess.

NSTableView without scrolling, instead push down content below

I would like to create a NSTableView so that when it grows it will not scroll but instead push down the content below. The NSTableView and the content below will be wrapped in a NSScrollView that will autoresize with the windows height.
Is this even possible? I've spent a lot of time searching for any answer or even a clue on how to approach a design like this, but no luck. Should I even use a NSTableView for this?
See this image if you don't understand what I mean:
I think that you just need to calculate the total height of your all table cells and that value set as a table height. After that set your scroll view content size as a CGSizeMake(scrolviewwidth, table_height)
Select tableView and in attributes inspector in section Scroll View uncheck Scrolling Enabled. It is possible, that you will have to set table height manually viz previous answer.

uitable view controller display a page of blank cells

I keep having the problem that my tableview controller always displays a lists of cells and only the first two have any data in them. Is this normal? Is it possible to have a tableview controller display only two cells (that is, the ones that have the data in them)?
In other words, the first two cells say "blah" and "blah2". All the others are blank. I know that the number of sections is 1 and the number of rows in the section is 2. I still get the first two cells displayed correctly and the rest are blank. Is this normal? How can I just display two cells?
it is not the table view controller that displays the cell. it is the table view.
you could add a tableview as subview to a view controlled by a view controller and set it frame with a height that is enough to display both cells.
Another option, set the style of the UITableview to grouped and have only one section. It will display only the number of cells you tell it in the method numberofrows:section.

how set table view to show a single row only in ios?

In my application I have table view cells with height of table view. When user scrolls it some times stops in between two cells, that is by showing half a cell,cell separator and half of other cell.
Is there any way by which I can scroll the table, after user rotation to a single cell?
What we want is the table view should scroll to a single row automatically after user scroll.
Use scrollToRowAtIndexPath:atScrollPosition:animated: for scrolling to top cell. And as a UITableView is also UIScrollView so you can do it in UIScrollview's delegate method.
scrollViewDidEndDragging:willDecelerate: