-I could not find a way to change it's items heigh / opacity from hidden elements. bad
NSCollectionView lets you set the minimum and maximum height of the items. By setting both to the same value, you can force the items to have a certain height. However, all of the items must be the same height - there's no way to increase the height of one without increasing the height of the others. Thus, this probably will not work for you.
That would be more fun, I would like to do that by the way. I've been searching for some examples to get started but none of them told me what I consider the "meat" of the class: stacking one view above the other. Any tips on that would be really appreciated.
Also, what worries me in this case is the memory management. If I start to show a large amount of cells (rows) with probably some graphics in it, wouldn't that represent a problem to memory?
Thank you by the help so far.
By "above", I'm assuming you mean positioned closer to the top of the window, not positioned on top of another view.
Arranging views vertically is not that difficult. Each of the views will need to be a subviews of another view. In the superview, create a method called "layoutSubviews" or something similar. Basically, you need to start at the top (or bottom, if you prefer), and move down the view setting the frame of each subview. So, in pseduocode:
HTML:
set position to top of view
for each subview
set subview's frame's y origin to position
move position down by the height of the subview
end
This will probably be cleanest if you flip the coordinates in the superview.
As for memory management, yes, if you have a lot of subviews, memory use will go up. If "a lot" means ~100, you probably don't have anything to worry about unless your subviews are really complex. If "a lot" means >100,000 then yes, things are going to get more complicated.