Fix animation glitch in blocking window.

pull/1/head
Matthew Chen 7 years ago
parent df685da497
commit 115235d1b4

@ -514,10 +514,6 @@ const UIWindowLevel UIWindowLevel_Background = -1.f;
UIView *rootView = self.screenBlockingViewController.view;
[NSLayoutConstraint deactivateConstraints:self.screenBlockingConstraints];
NSMutableArray<NSLayoutConstraint *> *screenBlockingConstraints = [NSMutableArray new];
BOOL shouldHaveScreenLock = desiredUIState == ScreenLockUIStateScreenLock;
NSString *signature = [NSString stringWithFormat:@"%d %d", shouldHaveScreenLock, self.isShowingScreenLockUI];
if ([NSObject isNullableObject:self.screenBlockingSignature equalTo:signature]) {
@ -525,6 +521,10 @@ const UIWindowLevel UIWindowLevel_Background = -1.f;
return;
}
[NSLayoutConstraint deactivateConstraints:self.screenBlockingConstraints];
NSMutableArray<NSLayoutConstraint *> *screenBlockingConstraints = [NSMutableArray new];
self.screenBlockingButton.hidden = !shouldHaveScreenLock;
if (self.isShowingScreenLockUI) {

@ -118,6 +118,8 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value);
- (void)addRedBorderRecursively;
#ifdef DEBUG
- (void)logFrame;
- (void)logFrameWithLabel:(NSString *)label;
- (void)logFrameLater;
- (void)logFrameLaterWithLabel:(NSString *)label;
- (void)logHierarchyUpwardLaterWithLabel:(NSString *)label;

@ -452,6 +452,21 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value)
}
}
- (void)logFrame
{
[self logFrameWithLabel:@""];
}
- (void)logFrameWithLabel:(NSString *)label
{
DDLogVerbose(@"%@ %@ frame: %@, hidden: %d, opacity: %f",
self.logTag,
label,
NSStringFromCGRect(self.frame),
self.hidden,
self.layer.opacity);
}
- (void)logFrameLater
{
[self logFrameLaterWithLabel:@""];
@ -460,12 +475,7 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value)
- (void)logFrameLaterWithLabel:(NSString *)label
{
dispatch_async(dispatch_get_main_queue(), ^{
DDLogVerbose(@"%@ %@ frame: %@, hidden: %d, opacity: %f",
self.logTag,
label,
NSStringFromCGRect(self.frame),
self.hidden,
self.layer.opacity);
[self logFrameWithLabel:label];
});
}

Loading…
Cancel
Save