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

imranpundeer

macrumors newbie
Original poster
Jan 10, 2009
25
0
Hi Friends,
I am new in Cocoa programming. I want to display a progress bar on my window while coping a file using NSFileManager.

Actually in Windows there is a CopyProgressRoutine callabck function of CopyFile through which we can get the size that is being copied . So we can display a progress bar accordingly.

So is there any way in MAC to do this?

Any help would be appreciated.

Regards,
Imran.
 
Generally you have to make your own, but it's not difficult. In Interface Builder, just put an NSProgressBar and NSTextField (for your progress info) onto an NSWindow or NSPanel and show the window while it's running, hide it when done. Use an NSTimer to update the bar and info periodically. You can also put a progress bar in your main window or just about anywhere you want, it doesn't have to be in a separate dialog.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.