I have an NSCollectionView
that lists items from a Core Data source. Each item has a button that when fired slides down an action view. When this view slides down, the collection view shrinks so that both views fit on top of each other in the same window space.
To provide a good user experience I want the NSCollectionViewItem
that fired the action to be completely visible. I have it's frame - which I got from -frameForItemAtIndex:
.
How can I - using the NSRect frame
variable and my scrollView
outlet - check if frame
is visible in the scrollView
and, if it isn't, scroll scrollView
so that it is?