Skip to content

Commit

Permalink
image view update
Browse files Browse the repository at this point in the history
  • Loading branch information
YuAo committed Apr 23, 2018
1 parent df6b071 commit 422f43f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Frameworks/MetalPetal/UI/MTIImageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ - (void)setupImageView {
_renderView = renderView;

_renderView.paused = YES;
_renderView.enableSetNeedsDisplay = NO;
_drawsImmediately = YES;
_renderView.enableSetNeedsDisplay = YES;
_drawsImmediately = NO;
}

- (void)setDrawsImmediately:(BOOL)drawsImmediately {
Expand Down Expand Up @@ -116,6 +116,7 @@ - (void)updateContentScaleFactor {
}

- (void)setImage:(MTIImage *)image {
NSAssert(NSThread.isMainThread, @"-[MTIImageView setImage:] can only be called on main thread.");
_image = image;
[self updateContentScaleFactor];
if (_drawsImmediately) {
Expand Down

0 comments on commit 422f43f

Please sign in to comment.