If you check the docs for UIImage you'll see it's in UIKit, not Foundation. The docs are now all targeted at Swift, which is somewhat annoying, but you'll see the import statement in the docs is specified as
@import UIKit;
In objective-c, that translates to