I want to lay out several rows of NSViews. Each row will have start with say 5 NSViews with possibility to arbitrarily add or remove views between any of the starting 5, at beginning, or at the end.
1) How can I have these lay themselves out without me manually tracking the size of each and calculating position and placing each one? How can I say "NSView2 is to the right of NSView1 with a gap of 10 pixels"?
2) What data structure makes sense to hold these views and most simply maintain the positional relationships via Cocoa? Also I need to go back at the end and iterate from left to right through this list.