I have coded a pathbar control a while ago for my app Significator for iTunes.
Btw. no advertisement, only for testing purposes 😉
You can download it for free to see what I’m talking about.
The Pathbar is a NSView, and has sub-children, also NSViews. The problem comes to animation.
If a Pathbar Item cannot be displayed in it’s full size, it animates to it’s full-size if you hover over it.
I animate the size of the item using the animator proxy. So for example [item.animator setFrame:frame];. Now, I have to do the same with all of the subitems on the right, so they don’t overlap.
This often gives unexpected behaviours, especially when changing from one pathbar item to another. And it’s not very smooth either.
I have figured that this probably isn’t the right way to do this.
Is there any other way to animate it? Best would if I only had to set the width of the item, and the positioning would be automatic.
I found the solution and posted it on github.
I subclassed from NSPathControl. It’s pretty simple actually.