hide the panels when not showing
This commit is contained in:
parent
a871f09b43
commit
f5e7b24601
@ -337,6 +337,7 @@ CGFloat const PanelAnimationDuration = 0.2;
|
||||
};
|
||||
|
||||
void (^completion)(BOOL) = ^(BOOL finished){
|
||||
self.leftView.hidden = true;
|
||||
self.mainViewCoverView.hidden = YES;
|
||||
[self panelDidDisappear:self.leftPanel animated:animated];
|
||||
self.mainView.accessibilityElementsHidden = NO;
|
||||
@ -360,6 +361,7 @@ CGFloat const PanelAnimationDuration = 0.2;
|
||||
return;
|
||||
}
|
||||
[MVMCoreDispatchUtility performBlockOnMainThread:^{
|
||||
self.leftView.hidden = false;
|
||||
if (self.mainViewLeading.constant < .1) {
|
||||
BOOL shouldExtendLeftPanel = [self shouldExtendLeftPanel];
|
||||
|
||||
@ -540,6 +542,7 @@ CGFloat const PanelAnimationDuration = 0.2;
|
||||
};
|
||||
|
||||
void (^completion)(BOOL) = ^(BOOL finished){
|
||||
self.rightView.hidden = true;
|
||||
self.mainViewCoverView.hidden = YES;
|
||||
[self panelDidDisappear:self.rightPanel animated:animated];
|
||||
self.mainView.accessibilityElementsHidden = NO;
|
||||
@ -563,6 +566,7 @@ CGFloat const PanelAnimationDuration = 0.2;
|
||||
return;
|
||||
}
|
||||
[MVMCoreDispatchUtility performBlockOnMainThread:^{
|
||||
self.rightView.hidden = false;
|
||||
if (self.mainViewTrailing.constant < .1) {
|
||||
BOOL shouldExtendRightPanel = [self shouldExtendRightPanel];
|
||||
|
||||
@ -726,9 +730,9 @@ CGFloat const PanelAnimationDuration = 0.2;
|
||||
[self addPanel:panel];
|
||||
self.leftView = panel.view;
|
||||
self.leftPanel = panel;
|
||||
self.leftView.hidden = YES;
|
||||
self.leftView.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
NSLayoutConstraint *leftPanelWidth = [NSLayoutConstraint constraintWithItem:self.leftView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:270];
|
||||
self.leftView.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
leftPanelWidth.active = YES;
|
||||
self.leftPanelWidth = leftPanelWidth;
|
||||
[NSLayoutConstraint constraintWithItem:self.mainView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.leftView attribute:NSLayoutAttributeRight multiplier:1.0 constant:0].active = YES;
|
||||
@ -762,6 +766,7 @@ CGFloat const PanelAnimationDuration = 0.2;
|
||||
[self addPanel:panel];
|
||||
self.rightView = panel.view;
|
||||
self.rightPanel = panel;
|
||||
self.rightView.hidden = YES;
|
||||
self.rightView.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
NSLayoutConstraint *rightPanelWidth = [NSLayoutConstraint constraintWithItem:self.rightView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:270];
|
||||
rightPanelWidth.active = YES;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user