UIImage factory method nullability does not match API reference
| Originator: | patrick.hartling | ||
| Number: | rdar://21765780 | Date Originated: | 10-Jul-2015 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 9.0 Beta 3 |
| Classification: | Reproducible: |
Summary: There are two factory methods in the UIImage class interface in the iOS 9.0 Beta 3 SDK where the return type is nonnull UIImage *, but the API reference says that nil can be returned. They are as follows: * +imageWithCGImage: * +imageWithCGImage:scale:orientation: Steps to Reproduce: Use ⌥-click to display the reference information for the identified methods. Expected Results: My assumption is that the API reference is correct and that these methods should be updated to indicate that a nullable UIImage * is returned. Actual Results: If I pass in a NULL CGImageRef to either of the two factory methods, the result is nil. I do not know what other circumstances will cause nil to be returned.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!