View Full Version : How do I Create Custom Windows with Gradients?

Jul 17, 2012, 01:02 PM
Hi, I recently started messing around with xcode and obj-c and am wondering how to create a custom gradient background for a window. I'd like to make a window similar to the black gradient used in Quicktime X or the iPhone Clock app. If anyone can help me out that would be great. Thanks!

Jul 17, 2012, 10:39 PM
Look into using NSGradient. Perhaps this Cocoa with Love blog entry (http://cocoawithlove.com/2011/01/advanced-drawing-using-appkit.html) will help out. Or this Makes No Sense entry (http://www.katoemba.net/makesnosenseatall/2008/01/09/nsview-with-gradient-background/).