summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLStyleLayerTests.xib
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-01-11 08:06:20 -0800
committerGitHub <noreply@github.com>2017-01-11 08:06:20 -0800
commit424c12499cab69b935779d306d7d47d19139116e (patch)
tree56c27e57288a5df08083ede6b54db7204b46a02c /platform/darwin/test/MGLStyleLayerTests.xib
parent581fb3849da8ce97e557bb3633b886fcc369f6cb (diff)
downloadqtlocation-mapboxgl-424c12499cab69b935779d306d7d47d19139116e.tar.gz
[ios, macos] Make MGLMapView.style property nullable (#7664)
* [ios, macos] Made MGLMapView.style property nullable MGLMapView’s style property is now nullable (optional in Swift). The property is set to nil while the style loads and in the event that the style has failed to load. * [ios, macos] Switch to delegate method * [macos] Create MGLMapView programmatically for layer tests When MGLMapView is created via a nib, -initWithCoder: is called, causing styleURL to be set to nil, in turn causing the default Streets style to be loaded, fooling MGLStyleLayerTests into thinking one-line has been loaded. Instead, create MGLMapView programmatically, passing the intended style URL into the initializer, preventing Streets from being loaded.
Diffstat (limited to 'platform/darwin/test/MGLStyleLayerTests.xib')
-rw-r--r--platform/darwin/test/MGLStyleLayerTests.xib29
1 files changed, 6 insertions, 23 deletions
diff --git a/platform/darwin/test/MGLStyleLayerTests.xib b/platform/darwin/test/MGLStyleLayerTests.xib
index cc336191ef..d21f5753fc 100644
--- a/platform/darwin/test/MGLStyleLayerTests.xib
+++ b/platform/darwin/test/MGLStyleLayerTests.xib
@@ -1,38 +1,21 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="16A304a" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1212" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
- <customObject id="-2" userLabel="File's Owner" customClass="MGLMapViewTests">
- <connections>
- <outlet property="mapView" destination="6RL-d9-juy" id="0ch-aR-Um6"/>
- </connections>
- </customObject>
+ <customObject id="-2" userLabel="File's Owner" customClass="MGLMapViewTests"/>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="MGLMapViewTests" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="256" height="256"/>
- <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1058"/>
+ <rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="256" height="256"/>
<autoresizingMask key="autoresizingMask"/>
- <subviews>
- <customView translatesAutoresizingMaskIntoConstraints="NO" id="6RL-d9-juy" customClass="MGLMapView">
- <rect key="frame" x="0.0" y="0.0" width="256" height="256"/>
- <connections>
- <outlet property="delegate" destination="-2" id="6kS-ct-JEg"/>
- </connections>
- </customView>
- </subviews>
- <constraints>
- <constraint firstItem="6RL-d9-juy" firstAttribute="leading" secondItem="EiT-Mj-1SZ" secondAttribute="leading" id="KEN-aL-UF0"/>
- <constraint firstAttribute="bottom" secondItem="6RL-d9-juy" secondAttribute="bottom" id="V27-f3-xHZ"/>
- <constraint firstAttribute="trailing" secondItem="6RL-d9-juy" secondAttribute="trailing" id="vjq-iM-OyA"/>
- <constraint firstItem="6RL-d9-juy" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" id="yWg-v4-wJB"/>
- </constraints>
</view>
</window>
</objects>