So I’ve created a view controller that creates a custom view that, if it holds two elements, creates a line between them. A separator.
The view and its elements are created in Interface Builder and their placement set there.
What I am trying to do is to read the sub elements origin coordinates and width/height so that I can dynamically draw the separator between them.
I’ve tried using the NSArray self.subviews and tried using the methods convertRect and convertPoint which are found in the NSView class.
Does anyone know how I might do this?
All help would be appreciated.
It’s a fairly interesting request, but I think this should work fairly well. This assumes the subviews are left/right, if you need up/down, then reverse the >= to <= and compare y instead of x.