Sorry for everything lumped into one but it’s been a long time and I didn’t do a good job keeping our internal branch (which is stuck in svn) in sync with the this one. I know I know I’m doing it wrong! :P This includes a bunch of modernization of the codebase including a switch to ARC (which many of you have already done). It also includes some rather significant changes to how events get from AppKit to UIKit, gesture recognizers, responder chain changes (attempts to integrate between NSResponder and UIResponder), and probably a bunch of other stuff I’ve forgotten about. Due to a heavy focus on iOS work lately, this code has not been extensively used or tested but it was well past time to get it out there.
prepareToPlay backgroundView shouldAutoplay
… of waiting for a content offset change.
…o retina support.
… down the display tree triggering redraws and whatnot as it goes.
…n order to work correctly when switching between retina and non-retina displays. Obviously normally color would not need this, but the pattern images proved difficult to get right and this seemed to be the best way. If a color is created using just a normal solid color, only one representation is used so there's not a significant increase in complexity or memory use in the normal case.
…w works using the multiple representations that internally make up the new UIImages.
Unlike the real iOS (as of iOS 5 to my knowledge), my UIImage internally stores multiple representations of images if they are found so that retina support can work. On iOS, you either have a retina device or not so it can make that choice up front, but on OSX you can draw a window to another screen, change your screens prefs, etc. and the retina status of a window or image can change on the fly. This infrastructure allows it to choose the correct image for the situation it's in at the time all automatically. You don't have to do anything. It also uses CGImageSource to sort of lazy-load image information so if your app has retina assets but never runs on a retina display, it won't load any more of the retina image files than it needs to determine their sizes and existence. Also moved the NSImage support out of the main UIImage code and into a category as well as ensured it supports at least 1x and 2x images when transferring between UIImage and NSImage.
…sture recognizers instead of with its own property that was disconnected from everything else.
… acting crazy in some cases.
…entScaleFactor, slightly changed how backgroundColor works on views without a drawRect:
…If you use it, fine. :)
… isn't needed anymore. For 10.6 compatibility, use respondsToSelector: to verify it exists before using it in your code.
…ge context scaling bugs.