iPhoto Problem with colored spinning wheel
You could try leaving it for a while and see if it recovers on its own, but it probably will not. Unfortunately if an application is in that state, there's usually nothing that can be done. I don't know if iPhoto has auto-saving but I don't think it does.

You don't need to restart your computer to fix it, though. Click on the Apple menu then select Force Quit. Click on iPhoto and click Force Quit. You can then restart iPhoto and see if any of your work reappears.