mirror of
https://github.com/SvenTiigi/WhatsNewKit.git
synced 2026-04-03 08:08:56 -06:00
Add checks to prevent invalid context error. #63
Labels
No labels
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
question
question
question
question
question
question
question
question
question
question
question
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github/WhatsNewKit#63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @GetToSet on 5/2/2020
I found a weird error log regarding invalid

CGContextwhen using this framework.After some investigation, I found its cause:
CompletionButtonis redrawing its background image attraitCollectionDidChange, which is called beforelayoutSubviews. At early initialization stage, the button may have empty frame with both height and width set to 0, resulting "invalid context error" when drawing background image.This commit adds extra check to prevent creating context when frame is empty, delaying the creation of background image to
layoutSubviewscall.