Implicit conversion from enumeration type 'enum CGImageAlphaInfo' to different enumeration type 'CGBitmapinfo' (aka) 'enum CGBitmapInfo') Implicit conversion from enumeration type 'enum CGImageAlphaInfo' to different enumeration type 'CGBitmapinfo' (aka) 'enum CGBitmapInfo') ios ios

Implicit conversion from enumeration type 'enum CGImageAlphaInfo' to different enumeration type 'CGBitmapinfo' (aka) 'enum CGBitmapInfo')


From the docs:

The constants for specifying the alpha channel information are declared with the CGImageAlphaInfo type but can be passed to this parameter safely.

So you can just use a cast to suppress the warning:

CGBitmapInfo bitmapInfo = (CGBitmapInfo) kBitmapInfo;