Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

Google Images integration. Fixes #111 #119

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
10 changes: 9 additions & 1 deletion Source/Classes/Core/DZNPhotoDisplayViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ - (UISearchController *)searchController
UISearchBar *searchBar = _searchController.searchBar;
searchBar.placeholder = NSLocalizedString(@"Search", nil);
searchBar.text = self.navigationController.initialSearchTerm;
searchBar.scopeButtonTitles = [self segmentedControlTitles].count > 1 ? [self segmentedControlTitles] : nil;
searchBar.scopeButtonTitles = [self segmentedControlTitles];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was about to say that this was fixed. Thanks for reverting to the previous implementation.

searchBar.searchBarStyle = UISearchBarStyleProminent;
searchBar.barStyle = UIBarStyleDefault;
searchBar.selectedScopeButtonIndex = 0;
Expand Down Expand Up @@ -234,6 +234,14 @@ - (UIActivityIndicatorView *)activityIndicator
return _activityIndicator;
}

- (NSArray *)segmentedControlTitles
{
if (_segmentedControlTitles.count > 1) {
return _segmentedControlTitles;
}
return nil;
}

/* Returns the appropriate cell view's size. */
- (CGSize)cellSize
{
Expand Down