Skip to content

Commit

Permalink
修复 main thread UI API called on a background thread: -[UIView bounds]
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan-Z committed Jul 2, 2024
1 parent 167b038 commit a587ac2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,18 @@
attributes = {
LastUpgradeCheck = 0500;
ORGANIZATIONNAME = "Cell Phone";
TargetAttributes = {
BC01CA8014E7620600967264 = {
DevelopmentTeam = T86RGZBM38;
};
};
};
buildConfigurationList = BC01CA7B14E7620600967264 /* Build configuration list for PBXProject "MultiViewFilterExample" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = BC01CA7614E7620600967264;
Expand Down Expand Up @@ -375,6 +381,7 @@
BC01CA9A14E7620600967264 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = T86RGZBM38;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "MultiViewFilterExample/MultiViewFilterExample-Prefix.pch";
INFOPLIST_FILE = "MultiViewFilterExample/MultiViewFilterExample-Info.plist";
Expand All @@ -387,6 +394,7 @@
BC01CA9B14E7620600967264 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = T86RGZBM38;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "MultiViewFilterExample/MultiViewFilterExample-Prefix.pch";
INFOPLIST_FILE = "MultiViewFilterExample/MultiViewFilterExample-Info.plist";
Expand Down
4 changes: 3 additions & 1 deletion framework/Source/iOS/GPUImageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ - (void)recalculateViewGeometry;
runSynchronouslyOnVideoProcessingQueue(^{
CGFloat heightScaling, widthScaling;

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

// CGFloat imageAspectRatio = inputImageSize.width / inputImageSize.height;
// CGFloat viewAspectRatio = currentViewSize.width / currentViewSize.height;
Expand Down

0 comments on commit a587ac2

Please sign in to comment.