forked from organicmaps/organicmaps-tmp
[iOS] Small fixes in search: show/hide animation and booking panel state
This commit is contained in:
parent
f654f3f0ce
commit
d9add1412a
2 changed files with 12 additions and 1 deletions
|
@ -13,6 +13,7 @@ static CGFloat const changeModeViewOffsetKeyboard = -12;
|
|||
@property(nonatomic) IBOutlet UIView *contentView;
|
||||
|
||||
@property(nonatomic) NSLayoutConstraint *contentViewTopHidden;
|
||||
@property(nonatomic) NSLayoutConstraint *contentViewBottomHidden;
|
||||
@property(nonatomic) NSLayoutConstraint *actionBarViewBottomKeyboard;
|
||||
@property(nonatomic) NSLayoutConstraint *actionBarViewBottomNormal;
|
||||
|
||||
|
@ -67,6 +68,10 @@ static CGFloat const changeModeViewOffsetKeyboard = -12;
|
|||
self.contentViewTopHidden.priority = UILayoutPriorityDefaultLow;
|
||||
self.contentViewTopHidden.active = YES;
|
||||
|
||||
self.contentViewBottomHidden = [contentView.heightAnchor constraintEqualToAnchor:parentView.heightAnchor];
|
||||
self.contentViewBottomHidden.priority = UILayoutPriorityDefaultLow;
|
||||
self.contentViewBottomHidden.active = YES;
|
||||
|
||||
[contentView.leadingAnchor constraintEqualToAnchor:searchBarView.leadingAnchor].active = YES;
|
||||
[contentView.trailingAnchor constraintEqualToAnchor:searchBarView.trailingAnchor].active = YES;
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ using Observers = NSHashTable<Observer>;
|
|||
@property(strong, nonatomic) IBOutlet UIView *tableViewContainer;
|
||||
|
||||
@property(nonatomic) NSLayoutConstraint *contentViewTopHidden;
|
||||
@property(nonatomic) NSLayoutConstraint *contentViewBottomHidden;
|
||||
@property(nonatomic) NSLayoutConstraint *actionBarViewBottomKeyboard;
|
||||
@property(nonatomic) NSLayoutConstraint *actionBarViewBottomNormal;
|
||||
|
||||
|
@ -264,13 +265,14 @@ using Observers = NSHashTable<Observer>;
|
|||
GetFramework().DeactivateMapSelection(true);
|
||||
[self animateConstraints:^{
|
||||
self.contentViewTopHidden.priority = UILayoutPriorityDefaultLow;
|
||||
self.contentViewBottomHidden.priority = UILayoutPriorityDefaultLow;
|
||||
}];
|
||||
auto const navigationManagerState = [MWMNavigationDashboardManager sharedManager].state;
|
||||
if (navigationManagerState == MWMNavigationDashboardStateHidden) {
|
||||
controlsManager.menuState = controlsManager.menuRestoreState;
|
||||
}
|
||||
[self viewHidden:NO];
|
||||
self.searchBarView.isBookingSearchViewHidden = ![MWMSearch isHotelResults];
|
||||
self.searchBarView.isBookingSearchViewHidden = YES;
|
||||
self.actionBarState = MWMSearchManagerActionBarStateHidden;
|
||||
[self.searchTextField becomeFirstResponder];
|
||||
[self.searchBarView applyTheme];
|
||||
|
@ -304,6 +306,7 @@ using Observers = NSHashTable<Observer>;
|
|||
if (!IPAD) {
|
||||
[self animateConstraints:^{
|
||||
self.contentViewTopHidden.priority = UILayoutPriorityDefaultHigh;
|
||||
self.contentViewBottomHidden.priority = UILayoutPriorityDefaultHigh;
|
||||
}];
|
||||
}
|
||||
auto const navigationManagerState = [MWMNavigationDashboardManager sharedManager].state;
|
||||
|
@ -328,6 +331,8 @@ using Observers = NSHashTable<Observer>;
|
|||
if (!IPAD) {
|
||||
[self animateConstraints:^{
|
||||
self.contentViewTopHidden.priority = UILayoutPriorityDefaultHigh;
|
||||
self.contentViewBottomHidden.priority = UILayoutPriorityDefaultHigh;
|
||||
|
||||
}];
|
||||
}
|
||||
auto const navigationManagerState = [MWMNavigationDashboardManager sharedManager].state;
|
||||
|
@ -398,6 +403,7 @@ using Observers = NSHashTable<Observer>;
|
|||
hideActionBar ? MWMSearchManagerActionBarStateHidden : MWMSearchManagerActionBarStateModeFilter;
|
||||
|
||||
self.contentViewTopHidden.priority = UILayoutPriorityDefaultLow;
|
||||
self.contentViewBottomHidden.priority = UILayoutPriorityDefaultLow;
|
||||
}];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue