Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
FrPellissier committed Oct 16, 2019
2 parents 80b7726 + 073b6c5 commit 4699749
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,26 +63,18 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
#pragma mark UISearchResultsUpdating

- (void) updateSearchResultsForSearchController:(UISearchController *)searchController {
MKLocalSearchRequest *request = [MKLocalSearchRequest new];
request.naturalLanguageQuery = searchController.searchBar.text;
request.region = self.mapView.region;

MKLocalSearch *search = [[MKLocalSearch alloc] initWithRequest:request];
[search startWithCompletionHandler:^(MKLocalSearchResponse * _Nullable response, NSError * _Nullable error) {
self.matchingItems = response == nil ? @[] : response.mapItems;
if(error == nil)
NSString *query = searchController.searchBar.text;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.300 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
if (![query isEqualToString:searchController.searchBar.text]) return;
MKLocalSearchRequest *request = [MKLocalSearchRequest new];
request.naturalLanguageQuery = query;
request.region = self.mapView.region;
MKLocalSearch *search = [[MKLocalSearch alloc] initWithRequest:request];
[search startWithCompletionHandler:^(MKLocalSearchResponse * _Nullable response, NSError * _Nullable error) {
self.matchingItems = response == nil ? @[] : response.mapItems;
[self.tableView reloadData];
}];
}

- (void)willPresentSearchController:(UISearchController *)searchController {
// do something before the search controller is presented
self.navigationController.navigationBar.translucent = YES;
}

- (void)willDismissSearchController:(UISearchController *)searchController
{
self.navigationController.navigationBar.translucent = NO;
}];
});
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ - (void)viewDidLoad {
[textField.leftView addSubview: leftImage];
}
}
self.resultSearchController.hidesNavigationBarDuringPresentation = NO;
self.resultSearchController.dimsBackgroundDuringPresentation = YES;
self.definesPresentationContext = YES;
self.locationSearchTable.mapView = self.mapView;
self.locationSearchTable.pinDelegate = self;
Expand Down
24 changes: 21 additions & 3 deletions Shared/Classes/Settings/OTAppConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,27 @@ + (void)configureNavigationControllerAppearance:(UINavigationController*)navigat
[OTAppConfiguration configureApplicationAppearance];

navigationController.automaticallyAdjustsScrollViewInsets = NO;
navigationController.navigationBar.backgroundColor = [[ApplicationTheme shared] primaryNavigationBarTintColor];
navigationController.navigationBar.tintColor = [[ApplicationTheme shared] secondaryNavigationBarTintColor];
navigationController.navigationBar.barTintColor = [[ApplicationTheme shared] primaryNavigationBarTintColor];

UINavigationBar *navigationBar = navigationController.navigationBar;
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000
if (@available(iOS 13.0, *)) {
UINavigationBarAppearance *navBarAppearance = [UINavigationBarAppearance new];
[navBarAppearance configureWithOpaqueBackground];
navBarAppearance.backgroundColor = [[ApplicationTheme shared] primaryNavigationBarTintColor];
NSDictionary *textAttributes = @{
NSForegroundColorAttributeName: [[ApplicationTheme shared] secondaryNavigationBarTintColor]
};
navBarAppearance.titleTextAttributes = textAttributes;
navBarAppearance.largeTitleTextAttributes = textAttributes;
navigationBar.standardAppearance = navBarAppearance;
navigationBar.scrollEdgeAppearance = navBarAppearance;
} else
#endif
{
navigationBar.backgroundColor = [[ApplicationTheme shared] primaryNavigationBarTintColor];
navigationBar.tintColor = [[ApplicationTheme shared] secondaryNavigationBarTintColor];
navigationBar.barTintColor = [[ApplicationTheme shared] primaryNavigationBarTintColor];
}

UIFont *selectedTabBarFont = [UIFont fontWithName:@"SFUIText-Bold" size:12];
NSDictionary *selectionTextAttributes = @{NSForegroundColorAttributeName:[[ApplicationTheme shared] backgroundThemeColor],
Expand Down
19 changes: 8 additions & 11 deletions Shared/Storyboards/LocationSelection.storyboard
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="nvl-pG-dhV">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<device id="retina4_7" orientation="portrait"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Location Selector View Controller-->
<scene sceneID="Xgu-Cr-jc9">
<objects>
<viewController id="nvl-pG-dhV" customClass="OTLocationSelectorViewController" sceneMemberID="viewController">
<viewController extendedLayoutIncludesOpaqueBars="YES" id="nvl-pG-dhV" customClass="OTLocationSelectorViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y9U-0U-WIx"/>
<viewControllerLayoutGuide type="bottom" id="ol5-CP-hV8"/>
Expand All @@ -23,13 +20,13 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<mapView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" mapType="standard" showsUserLocation="YES" translatesAutoresizingMaskIntoConstraints="NO" id="4Wd-d3-VgP" customClass="OTMapView">
<rect key="frame" x="-4" y="20" width="383" height="647"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<connections>
<outlet property="delegate" destination="nvl-pG-dhV" id="VAv-eB-S56"/>
</connections>
</mapView>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Fud-FW-Eox">
<rect key="frame" x="307" y="29" width="42" height="42"/>
<rect key="frame" x="307" y="9" width="42" height="42"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="42" id="6Pm-3d-WAG"/>
Expand Down Expand Up @@ -65,8 +62,8 @@
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailingMargin" secondItem="4Wd-d3-VgP" secondAttribute="trailing" constant="-20" id="6WL-1O-4tc"/>
<constraint firstItem="4Wd-d3-VgP" firstAttribute="leading" secondItem="3I0-Hm-eFT" secondAttribute="leadingMargin" constant="-20" id="DcZ-eX-GoS"/>
<constraint firstAttribute="trailing" secondItem="4Wd-d3-VgP" secondAttribute="trailing" id="6WL-1O-4tc"/>
<constraint firstItem="4Wd-d3-VgP" firstAttribute="leading" secondItem="3I0-Hm-eFT" secondAttribute="leading" id="DcZ-eX-GoS"/>
<constraint firstItem="4Wd-d3-VgP" firstAttribute="top" secondItem="y9U-0U-WIx" secondAttribute="bottom" id="IHP-T9-0El"/>
<constraint firstAttribute="trailingMargin" secondItem="Fud-FW-Eox" secondAttribute="trailing" constant="10" id="S9u-96-5AR"/>
<constraint firstAttribute="bottom" secondItem="4Wd-d3-VgP" secondAttribute="bottom" id="Vbf-wO-upm"/>
Expand Down Expand Up @@ -100,7 +97,7 @@
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="zXF-Zk-eEr" id="uJA-ug-EQJ">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ify-mh-e0P">
Expand Down Expand Up @@ -135,6 +132,6 @@
</scenes>
<resources>
<image name="geoloc" width="20" height="20"/>
<image name="map_pin" width="16" height="26"/>
<image name="map_pin" width="16" height="26.5"/>
</resources>
</document>
2 changes: 1 addition & 1 deletion entourage/entourage-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>6.1</string>
<string>6.1.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
2 changes: 1 addition & 1 deletion pfp/pfp-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>6.1</string>
<string>6.1.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down

0 comments on commit 4699749

Please sign in to comment.