This is more complex than it should be, because Apple does not provide NSProgressIndicatorCell. Although table and outline views support the idea of ββcustom cells displayed inside them, they are not set up to easily support custom subheadings.
So the trick becomes, how do you get the full view of the NSProgressIndicator to display and animate in the right place in your window without being able to actually set it in the table row?
The trick I used was to literally set the NSProgressIndicator as a subtask of the plan or table itself. To find the location to add a subview so that it looks βinlineβ, use the frameOfCellAtColumn: row: method. Then you can position the progress indicator in this place on the plan. When you finish scrolling through the progress indicator, you probably don't want to show it anymore, so just remove it from your supervisor and drop it.
You want you to set the necessary flags for automatic tuning on the progress bar, so that it floats in the right direction when / if the size of your plan changes.
I am sure that there are other hacks to achieve the desired end result. I donβt think there is any super-clean way to accomplish this trick.
source share