Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
Hi, I am using Cocoa framework with Obj C.
For my application, I want to have Mac's Dock like bar with some icons in that. Infact a tool bar which is transparent like dock, which has zoom effect similar to dock. Can some body have examples of such programming. Please share with me.
 
Is it possible to make an icon in toolbar big when mouse is placed on it? It might provide zooming effect that is there in dock.
 
You're going to need to do this in a custom view and draw the images yourself. I don't think any built-in control would be sufficient, although NSMatrix would work if you didn't handle the zoom effect.
 
You're going to need to do this in a custom view and draw the images yourself. I don't think any built-in control would be sufficient, although NSMatrix would work if you didn't handle the zoom effect.

Seconded. Personally I would use a custom view with NSImageView subviews. Track the mouse movements inside the main view and calculate the mouse X position as a percentage of the width of the view. You could then scale the NSImageViews based on their distance from the current mouse location. If you adjust the frames using a Core Animation animator, that will get you the soft animation you want. I wouldn't adjust the frames with every mouse movement, just after a certain number of pixels or percentage of the view width. That tolerance could also be calculated as the view width divided by the number of NSImageViews.

Best of luck

Luke
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.