Skip to content

Commit 721aafb

Browse files
chore: Update Maps and Places samples from CocoaPods (#103)
1 parent b0ff02e commit 721aafb

37 files changed

+814
-440
lines changed

GoogleMaps-Swift/GoogleMapsSwiftDemos.xcodeproj/project.pbxproj

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
2BAFFBE5609D779839846AB8 /* VisibleRegionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69B644212DDBA2509AD4CF5A /* VisibleRegionViewController.swift */; };
3535
2CB7EAB2A0672726481071D1 /* GestureControlViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE84B21AF0FE670AF73B8015 /* GestureControlViewController.swift */; };
3636
2D218EA1029C3FB7A528179F /* spitfire.png in Resources */ = {isa = PBXBuildFile; fileRef = 87E37B0AEBC49DF8A0F89492 /* spitfire.png */; };
37+
2E34DC3AE170D020094FB3F5 /* libPods-GoogleMapsSwiftDemos.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E9D35CDD51EA99098C64DC9 /* libPods-GoogleMapsSwiftDemos.a */; };
3738
2E3A841E83BC75E113066610 /* boat.png in Resources */ = {isa = PBXBuildFile; fileRef = EB1DB9C65356269FB0E9805F /* boat.png */; };
3839
32A5B9AE4D6B05579715DDD0 /* GradientPolylinesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72C6A03E42A9983A4FB4A7E3 /* GradientPolylinesViewController.swift */; };
3940
362C49E4DB90848A82AA5F1B /* museum-exhibits.json in Resources */ = {isa = PBXBuildFile; fileRef = AFCF3BFD151B8E93B8704001 /* museum-exhibits.json */; };
@@ -76,7 +77,6 @@
7677
AC10E7A466233271826AB625 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 522113F4629950AB8239E18A /* [email protected] */; };
7778
AFD4A3F04EE2310FEB11C861 /* MarkerInfoWindowViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AD61BF07E9A5511F02937FE /* MarkerInfoWindowViewController.swift */; };
7879
B3F740B819DBAA1F4E651157 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 4429DACE39F5B3E2E31B963D /* [email protected] */; };
79-
B43744DF938F12D6F2F40B51 /* libPods-GoogleMapsSwiftDemos.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 32B1C089FA58A44BE10A703A /* libPods-GoogleMapsSwiftDemos.a */; };
8080
B6565F6882481535DAB5C86A /* voyager.png in Resources */ = {isa = PBXBuildFile; fileRef = 2A5B8956E7E8B6AF430CC416 /* voyager.png */; };
8181
B69D158DC43E0889B5BF1561 /* glow-marker.png in Resources */ = {isa = PBXBuildFile; fileRef = F17F1884FB9429A59D92A98A /* glow-marker.png */; };
8282
B7345D33E5BF31A00280355C /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = DF1488DDE60393FF03CF8A87 /* [email protected] */; };
@@ -123,9 +123,9 @@
123123
2C8E6590B2109C88BF5DF3BF /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
124124
2D48B3FFC6D573CF2673D451 /* popup_santa.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = popup_santa.png; sourceTree = "<group>"; };
125125
30CF698467FA9E7F200017B3 /* mapstyle-silver.json */ = {isa = PBXFileReference; lastKnownFileType = text; path = "mapstyle-silver.json"; sourceTree = "<group>"; };
126-
32B1C089FA58A44BE10A703A /* libPods-GoogleMapsSwiftDemos.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-GoogleMapsSwiftDemos.a"; sourceTree = BUILT_PRODUCTS_DIR; };
127126
3B0F56EA0940A859776C9DD3 /* track.json */ = {isa = PBXFileReference; lastKnownFileType = text; path = track.json; sourceTree = "<group>"; };
128127
3B919F5AC728E794E349D4A3 /* SampleLevel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleLevel.swift; sourceTree = "<group>"; };
128+
3CD5D8B1185F80801853B2A5 /* Pods-GoogleMapsSwiftDemos.default.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GoogleMapsSwiftDemos.default.xcconfig"; path = "Target Support Files/Pods-GoogleMapsSwiftDemos/Pods-GoogleMapsSwiftDemos.default.xcconfig"; sourceTree = "<group>"; };
129129
3EA1DB5D699D162AC375E1C9 /* StyledMapViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StyledMapViewController.swift; sourceTree = "<group>"; };
130130
4091BA2074B3B691B1AAD79F /* TrafficMapViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrafficMapViewController.swift; sourceTree = "<group>"; };
131131
4429DACE39F5B3E2E31B963D /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
@@ -164,6 +164,7 @@
164164
962C5BE26208B06737B4653C /* TileLayerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TileLayerViewController.swift; sourceTree = "<group>"; };
165165
996FCE46D4BD31A4E02C2473 /* h1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = h1.png; sourceTree = "<group>"; };
166166
9DEB41AE386954E4085FAA85 /* MapLayerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapLayerViewController.swift; sourceTree = "<group>"; };
167+
9E9D35CDD51EA99098C64DC9 /* libPods-GoogleMapsSwiftDemos.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-GoogleMapsSwiftDemos.a"; sourceTree = BUILT_PRODUCTS_DIR; };
167168
A29805B04CA5A5071F63E40F /* arrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = arrow.png; sourceTree = "<group>"; };
168169
A6181B3AED573910BA0F2D6B /* PaddingBehaviorViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaddingBehaviorViewController.swift; sourceTree = "<group>"; };
169170
ABD5CD72476857CF2A348366 /* MarkerLayerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarkerLayerViewController.swift; sourceTree = "<group>"; };
@@ -183,7 +184,6 @@
183184
CD93738C4D90134DB506ECFE /* MarkerEventsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarkerEventsViewController.swift; sourceTree = "<group>"; };
184185
D10973A4336C45EE56319A9B /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
185186
D1A99C0C04795272C12DD9EF /* StructuredGeocoderViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StructuredGeocoderViewController.swift; sourceTree = "<group>"; };
186-
D4BEFEE556A9D8381FBDF9C3 /* Pods-GoogleMapsSwiftDemos.default.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GoogleMapsSwiftDemos.default.xcconfig"; path = "Target Support Files/Pods-GoogleMapsSwiftDemos/Pods-GoogleMapsSwiftDemos.default.xcconfig"; sourceTree = "<group>"; };
187187
DE91B8EA42AFFCEDA758CE06 /* SDKConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SDKConstants.swift; sourceTree = "<group>"; };
188188
DF1488DDE60393FF03CF8A87 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
189189
E18764F42392A93B39C775AB /* SampleMapStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleMapStyle.swift; sourceTree = "<group>"; };
@@ -208,13 +208,22 @@
208208
buildActionMask = 2147483647;
209209
files = (
210210
4EA38ACBC98F34B1F0AF5BDD /* UIKit.framework in Frameworks */,
211-
B43744DF938F12D6F2F40B51 /* libPods-GoogleMapsSwiftDemos.a in Frameworks */,
211+
2E34DC3AE170D020094FB3F5 /* libPods-GoogleMapsSwiftDemos.a in Frameworks */,
212212
);
213213
runOnlyForDeploymentPostprocessing = 0;
214214
};
215215
/* End PBXFrameworksBuildPhase section */
216216

217217
/* Begin PBXGroup section */
218+
1A167975BF19699CBD1A4609 /* Pods */ = {
219+
isa = PBXGroup;
220+
children = (
221+
3CD5D8B1185F80801853B2A5 /* Pods-GoogleMapsSwiftDemos.default.xcconfig */,
222+
);
223+
name = Pods;
224+
path = Pods;
225+
sourceTree = "<group>";
226+
};
218227
395189041FA097C5575D97CF /* Resources */ = {
219228
isa = PBXGroup;
220229
children = (
@@ -350,20 +359,11 @@
350359
isa = PBXGroup;
351360
children = (
352361
922338CA529F228A03DE6422 /* UIKit.framework */,
353-
32B1C089FA58A44BE10A703A /* libPods-GoogleMapsSwiftDemos.a */,
362+
9E9D35CDD51EA99098C64DC9 /* libPods-GoogleMapsSwiftDemos.a */,
354363
);
355364
name = Frameworks;
356365
sourceTree = "<group>";
357366
};
358-
C935048B811B999A1BFE4E12 /* Pods */ = {
359-
isa = PBXGroup;
360-
children = (
361-
D4BEFEE556A9D8381FBDF9C3 /* Pods-GoogleMapsSwiftDemos.default.xcconfig */,
362-
);
363-
name = Pods;
364-
path = Pods;
365-
sourceTree = "<group>";
366-
};
367367
D0ED9A279E12177F7FDFA2FF /* Source */ = {
368368
isa = PBXGroup;
369369
children = (
@@ -378,7 +378,7 @@
378378
D0ED9A279E12177F7FDFA2FF /* Source */,
379379
AC723F443153D968479E59F3 /* Frameworks */,
380380
DD0B6FB690051F4443F4132B /* Products */,
381-
C935048B811B999A1BFE4E12 /* Pods */,
381+
1A167975BF19699CBD1A4609 /* Pods */,
382382
);
383383
sourceTree = "<group>";
384384
};
@@ -397,11 +397,11 @@
397397
isa = PBXNativeTarget;
398398
buildConfigurationList = 65556A7591C40D0E8B77989F /* Build configuration list for PBXNativeTarget "GoogleMapsSwiftDemos" */;
399399
buildPhases = (
400-
21C7FF2405A6985E7CC319C4 /* [CP] Check Pods Manifest.lock */,
400+
1B92021BC606F920EDA49E87 /* [CP] Check Pods Manifest.lock */,
401401
2ADDADBB329E244AF7ED1FB2 /* Resources */,
402402
22EB17F407E92B9B4F3B601A /* Sources */,
403403
B4530C282FE2BDE3D1071779 /* Frameworks */,
404-
CEC15B048851984195F31519 /* [CP] Copy Pods Resources */,
404+
556EA86AB81D7AE2C74E78FA /* [CP] Copy Pods Resources */,
405405
);
406406
buildRules = (
407407
);
@@ -499,7 +499,7 @@
499499
/* End PBXResourcesBuildPhase section */
500500

501501
/* Begin PBXShellScriptBuildPhase section */
502-
21C7FF2405A6985E7CC319C4 /* [CP] Check Pods Manifest.lock */ = {
502+
1B92021BC606F920EDA49E87 /* [CP] Check Pods Manifest.lock */ = {
503503
isa = PBXShellScriptBuildPhase;
504504
buildActionMask = 2147483647;
505505
files = (
@@ -521,7 +521,7 @@
521521
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
522522
showEnvVarsInLog = 0;
523523
};
524-
CEC15B048851984195F31519 /* [CP] Copy Pods Resources */ = {
524+
556EA86AB81D7AE2C74E78FA /* [CP] Copy Pods Resources */ = {
525525
isa = PBXShellScriptBuildPhase;
526526
buildActionMask = 2147483647;
527527
files = (
@@ -608,17 +608,15 @@
608608
};
609609
6798450D013ACAFF39CF0187 /* Default */ = {
610610
isa = XCBuildConfiguration;
611-
baseConfigurationReference = D4BEFEE556A9D8381FBDF9C3 /* Pods-GoogleMapsSwiftDemos.default.xcconfig */;
611+
baseConfigurationReference = 3CD5D8B1185F80801853B2A5 /* Pods-GoogleMapsSwiftDemos.default.xcconfig */;
612612
buildSettings = {
613-
"ARCHS[sdk=iphonesimulator*]" = (
614-
i386,
615-
x86_64,
616-
);
613+
"ARCHS[sdk=iphonesimulator*]" = x86_64;
617614
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
618615
CLANG_ENABLE_OBJC_ARC = YES;
619616
CODE_SIGN_IDENTITY = "iPhone Developer";
620617
INFOPLIST_FILE = ./GoogleMapsSwiftDemos/Info.plist;
621-
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
618+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
619+
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
622620
LIBRARY_SEARCH_PATHS = (
623621
.,
624622
"$(SDKROOT)/System/Library/Frameworks",

GoogleMaps-Swift/GoogleMapsSwiftDemos/Swift/Samples/AnimatedCurrentLocationViewController.swift

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ final class AnimatedCurrentLocationViewController: UIViewController {
1818

1919
private var locationMarker: GMSMarker?
2020

21+
private let locationManager = CLLocationManager()
22+
2123
private lazy var mapView: GMSMapView = {
2224
let camera = GMSCameraPosition(latitude: 38.8879, longitude: -77.0200, zoom: 17)
2325
return GMSMapView(frame: .zero, camera: camera)
@@ -43,12 +45,11 @@ final class AnimatedCurrentLocationViewController: UIViewController {
4345
return
4446
}
4547

46-
let manager = CLLocationManager()
47-
manager.requestWhenInUseAuthorization()
48-
manager.delegate = self
49-
manager.desiredAccuracy = kCLLocationAccuracyBest
50-
manager.distanceFilter = 5.0
51-
manager.startUpdatingLocation()
48+
locationManager.requestWhenInUseAuthorization()
49+
locationManager.delegate = self
50+
locationManager.desiredAccuracy = kCLLocationAccuracyBest
51+
locationManager.distanceFilter = 5.0
52+
locationManager.startUpdatingLocation()
5253
}
5354
}
5455

GoogleMaps-Swift/GoogleMapsSwiftDemos/Swift/Samples/CameraViewController.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ class CameraViewController: UIViewController {
1818

1919
private let interval: TimeInterval = 1 / 30
2020

21+
private let bearing: CLLocationDirection = 10
22+
23+
private let angle: Double = 10
24+
2125
private lazy var mapView: GMSMapView = {
2226
let camera = GMSCameraPosition(target: .victoria, zoom: 20, bearing: 0, viewingAngle: 0)
2327
return GMSMapView(frame: .zero, camera: camera)
@@ -47,13 +51,18 @@ class CameraViewController: UIViewController {
4751
timer?.invalidate()
4852
}
4953

54+
override func didReceiveMemoryWarning() {
55+
super.didReceiveMemoryWarning()
56+
timer?.invalidate()
57+
}
58+
5059
// Updates zoom and viewing angle, the map zoom out and the map appears in perspective, with
5160
// far-away features appearing smaller, and nearby features appearing larger.
5261
@objc func moveCamera() {
5362
let zoom = max(mapView.camera.zoom - 0.1, 17.5)
5463
let newPosition = GMSCameraPosition(
55-
target: mapView.camera.target, zoom: zoom, bearing: mapView.camera.bearing,
56-
viewingAngle: mapView.camera.viewingAngle + 10)
64+
target: mapView.camera.target, zoom: zoom, bearing: mapView.camera.bearing + bearing,
65+
viewingAngle: mapView.camera.viewingAngle + angle)
5766
mapView.animate(to: newPosition)
5867
}
5968
}

GoogleMaps-Swift/GoogleMapsSwiftDemos/Swift/Samples/CustomIndoorViewController.swift

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
/*
2-
* Copyright 2020 Google LLC. All rights reserved.
3-
*
4-
*
5-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
6-
* file except in compliance with the License. You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software distributed under
11-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
12-
* ANY KIND, either express or implied. See the License for the specific language governing
13-
* permissions and limitations under the License.
14-
*/
1+
// Copyright 2020 Google LLC. All rights reserved.
2+
//
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
5+
// file except in compliance with the License. You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software distributed under
10+
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
// ANY KIND, either express or implied. See the License for the specific language governing
12+
// permissions and limitations under the License.
1513

1614
import GoogleMaps
1715
import UIKit
@@ -51,7 +49,9 @@ class CustomIndoorViewController: UIViewController {
5149
withVisualFormat: "|[mapView]|", options: [], metrics: metrics, views: views)
5250
+ NSLayoutConstraint.constraints(
5351
withVisualFormat: "V:|[mapView][levelPickerView(height)]|", options: [], metrics: metrics,
54-
views: views))
52+
views: views)
53+
+ NSLayoutConstraint.constraints(
54+
withVisualFormat: "|[levelPickerView]|", options: [], metrics: metrics, views: views))
5555
}
5656

5757
}

GoogleMaps-Swift/GoogleMapsSwiftDemos/Swift/Samples/DoubleMapViewController.swift

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
/*
2-
* Copyright 2020 Google LLC. All rights reserved.
3-
*
4-
*
5-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
6-
* file except in compliance with the License. You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software distributed under
11-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
12-
* ANY KIND, either express or implied. See the License for the specific language governing
13-
* permissions and limitations under the License.
14-
*/
1+
// Copyright 2020 Google LLC. All rights reserved.
2+
//
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
5+
// file except in compliance with the License. You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software distributed under
10+
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
// ANY KIND, either express or implied. See the License for the specific language governing
12+
// permissions and limitations under the License.
1513

1614
import GoogleMaps
1715
import UIKit

GoogleMaps-Swift/GoogleMapsSwiftDemos/Swift/Samples/FitBoundsViewController.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ class FitBoundsViewController: UIViewController {
1818

1919
private let markerImageName = "glow-marker"
2020

21+
private let anotherSydneyLocation = CLLocationCoordinate2D(
22+
latitude: -33.8683, longitude: 149.2086)
23+
2124
private lazy var mapView: GMSMapView = {
2225
let camera = GMSCameraPosition(target: .victoria, zoom: 4)
2326
return GMSMapView(frame: .zero, camera: camera)
@@ -34,7 +37,7 @@ class FitBoundsViewController: UIViewController {
3437
let anotherSydneyMarker = GMSMarker()
3538
anotherSydneyMarker.title = "Sydney 2!"
3639
anotherSydneyMarker.icon = UIImage(named: markerImageName)
37-
anotherSydneyMarker.position = .sydney
40+
anotherSydneyMarker.position = anotherSydneyLocation
3841
anotherSydneyMarker.map = mapView
3942
return [sydneyMarker, anotherSydneyMarker]
4043
}()

GoogleMaps-Swift/GoogleMapsSwiftDemos/Swift/Samples/FrameRateViewController.swift

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
/*
2-
* Copyright 2020 Google LLC. All rights reserved.
3-
*
4-
*
5-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
6-
* file except in compliance with the License. You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software distributed under
11-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
12-
* ANY KIND, either express or implied. See the License for the specific language governing
13-
* permissions and limitations under the License.
14-
*/
1+
// Copyright 2020 Google LLC. All rights reserved.
2+
//
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
5+
// file except in compliance with the License. You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software distributed under
10+
// the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
// ANY KIND, either express or implied. See the License for the specific language governing
12+
// permissions and limitations under the License.
1513

1614
import GoogleMaps
1715
import UIKit
@@ -46,15 +44,9 @@ class FrameRateViewController: UIViewController {
4644
statusTextView.rightAnchor.constraint(equalTo: view.rightAnchor),
4745
statusTextView.heightAnchor.constraint(greaterThanOrEqualToConstant: 24),
4846
])
49-
if #available(iOS 11, *) {
50-
NSLayoutConstraint.activate([
51-
statusTextView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor)
52-
])
53-
} else {
54-
NSLayoutConstraint.activate([
55-
statusTextView.topAnchor.constraint(equalTo: topLayoutGuide.topAnchor)
56-
])
57-
}
47+
NSLayoutConstraint.activate([
48+
statusTextView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor)
49+
])
5850
}
5951

6052
@objc func changeFrameRate() {

0 commit comments

Comments
 (0)