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

GPUImageView warning #2649

Open
WhereFindYouAgin opened this issue Aug 11, 2020 · 2 comments
Open

GPUImageView warning #2649

WhereFindYouAgin opened this issue Aug 11, 2020 · 2 comments

Comments

@WhereFindYouAgin
Copy link

Main Thread Checker: UI API called on a background thread: .when I used GPUImageView this warring always happend , could you fix it。it happened in ios 13.3 Xcode 11.5.
截屏2020-08-11下午8 33 02

@BartSimpsons
Copy link

BartSimpsons commented Sep 15, 2020

...
CGRect viewRect;
CALayer *viewLayer;
...

- (void)layoutSubviews {
    viewRect = self.bounds;
    viewLayer = self.layer;
}

...
CGSize currentViewSize = viewRect.size;
...

this is main thread question, use viewRect replace self.bounds

@jxxnnee
Copy link

jxxnnee commented Mar 17, 2021

__block CGRect currentBounds;
__block CGSize currentViewSize;
runOnMainQueueWithoutDeadlocking(^{
    currentBounds = self.bounds;
    currentViewSize = self.bounds.size;
});

use this

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

No branches or pull requests

3 participants