Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 64 - Accessing UIKit from background queue #67

Merged
merged 1 commit into from
Nov 13, 2017

Conversation

jwelton
Copy link
Contributor

@jwelton jwelton commented Nov 1, 2017

This fixes #64 was caused by us accessing the view bounds from a background queue. The draw(_ layer: CALayer, in con: CGContext) method is called on a background queue. UIKit must always be accessed from the main queue. When we fetch the bounds for filling the background and fixing the rotation, we failed to conform to this rule.

This PR fixes this issue by firstly fetching the bound on the main queue.

@ranunez ranunez merged commit 15e1bc3 into Alua-Kinzhebayeva:master Nov 13, 2017
@ranunez
Copy link
Collaborator

ranunez commented Nov 13, 2017

This looks great! Thanks for the contribution!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Main Thread Checker: UI API called on a background thread: -[UIView bounds]
2 participants