How to Show a ProgressBar using NSFileManager copypath

Discussion in 'Mac Programming' started by imranpundeer, Jan 24, 2009.

  1. imranpundeer macrumors newbie

    Jan 10, 2009
    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.

  2. HiRez macrumors 603


    Jan 6, 2004
    Western US
    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.

Share This Page