Skip to content
This repository has been archived by the owner on Jul 25, 2019. It is now read-only.

Style property for _searchController.hidesNavigationBarDuringPresentation #447

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Classes/UVStyleSheet.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ + (UVStyleSheet *)instance {
instance.preferredStatusBarStyle = UIStatusBarStyleDefault;
instance.navigationBarTintColor = [UINavigationBar appearance].tintColor;
instance.navigationBarTranslucency = YES;
instance.searchBarHideNavigation = true;
}

return instance;
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/UVSuggestionListViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ - (void)loadView {
_searchController.searchResultsUpdater = self;
_searchController.searchBar.delegate = self;
_searchController.searchBar.placeholder = NSLocalizedStringFromTableInBundle(@"Search forum", @"UserVoice", [UserVoice bundle], nil);
if (FORMSHEET) {
if (FORMSHEET || ![UVStyleSheet instance].searchBarHideNavigation) {
_searchController.hidesNavigationBarDuringPresentation = false;
}

Expand Down
6 changes: 3 additions & 3 deletions Classes/UVWelcomeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ - (void)loadView {
if ([UVSession currentSession].config.showForum ) {
_searchController.searchBar.scopeButtonTitles = @[NSLocalizedStringFromTableInBundle(@"All", @"UserVoice", [UserVoice bundle], nil), NSLocalizedStringFromTableInBundle(@"Articles", @"UserVoice", [UserVoice bundle], nil), NSLocalizedStringFromTableInBundle(@"Ideas", @"UserVoice", [UserVoice bundle], nil)];
}
if (FORMSHEET) {
_searchController.hidesNavigationBarDuringPresentation = NO;

if (FORMSHEET || ![UVStyleSheet instance].searchBarHideNavigation) {
_searchController.hidesNavigationBarDuringPresentation = false;
}

_tableView.tableHeaderView = _searchController.searchBar;
Expand Down
1 change: 1 addition & 0 deletions Include/UVStyleSheet.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
@property (nonatomic, assign) BOOL navigationBarTranslucency;
@property (nonatomic, retain) UIColor *loadingViewBackgroundColor;
@property (nonatomic, assign) UIStatusBarStyle preferredStatusBarStyle;
@property (nonatomic, assign) BOOL searchBarHideNavigation;

@end