Swifterswift: UIImage.filled(withColor:) improvement

Created on 13 Oct 2019  路  5Comments  路  Source: SwifterSwift/SwifterSwift

Hacktoberfest

Here we can do a minor tweak where this extension is implemented using an old UIGraphicsBeginImageContextWithOptions API. That is not recommended.
We can provide an improvement for it and make this using UIGraphicsImageRenderer API.

Note: UIGraphicsImageRenderer is only available from iOS 10. So we should maintain the current implementation for lower iOS versions like:

if #available(iOS 10.0, tvOS 10.0, *) {
        // UIGraphicsImageRenderer new implementation
} else {
       // Current implementation with UIGraphicsBeginImageContextWithOptions
}

See #721 for an example.

Hacktoberfest good first issue help wanted

Most helpful comment

It looks like my PR got merged this morning, so I'm closing this issue 馃帀

All 5 comments

Hi @LucianoPAlmeida I could pick up this one :)

@FraDeliro Sorry for not commenting, before I started, but I was literally just about to click the button to make a PR for this 馃槄

@raysarebest No worries :) Go for it 馃憤

@FraDeliro @raysarebest Thanks for taking this one, @FraDeliro there are another issues like this one you could take, just make sure to comment on that so people know there鈥檚 someone already working :))

Sent with GitHawk

It looks like my PR got merged this morning, so I'm closing this issue 馃帀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fanglinwei picture fanglinwei  路  3Comments

marcocapano picture marcocapano  路  5Comments

pawurb picture pawurb  路  3Comments

omaralbeik picture omaralbeik  路  3Comments

SD10 picture SD10  路  3Comments