Skip to content

Commit

Permalink
Merge pull request #44 from Esri/mhd/Fix_Deprecated_Warnings
Browse files Browse the repository at this point in the history
Fix deprecated warnings
  • Loading branch information
mhdostal committed Oct 11, 2018
2 parents a420339 + 756f22e commit 0577faa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Examples/ArcGISToolkitExamples/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>100.4</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
2 changes: 1 addition & 1 deletion Toolkit/ArcGISToolkit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>100.4</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
22 changes: 11 additions & 11 deletions Toolkit/ArcGISToolkit/MeasureToolbar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,11 @@ public class MeasureToolbar: UIToolbar, AGSGeoViewTouchDelegate {
// Exposed so that the symbology and selection colors can be customized.
public private(set) var selectionLineSymbol : AGSSymbol?
public private(set)var selectionFillSymbol : AGSSymbol?
public private(set) var selectionColor : UIColor?

@available(iOS, deprecated, message: "Use `color` property exposed through `AGSGeoView.selectionProperties`")
public var selectionColor : UIColor? {
return mapView?.selectionProperties.color
}

public var mapView : AGSMapView? {
didSet{
guard mapView != oldValue else { return }
Expand Down Expand Up @@ -313,23 +316,20 @@ public class MeasureToolbar: UIToolbar, AGSGeoViewTouchDelegate {
selectModeButtons = [segControlItem, leftHiddenPlaceholderButton, flexButton, rightHiddenPlaceholderButton]

// notification

NotificationCenter.default.addObserver(self, selector: #selector(sketchEditorGeometryDidChange(_:)), name: .AGSSketchEditorGeometryDidChange, object: nil)

// defaults for symbology
selectionLineSymbol = lineSketchEditor.style.lineSymbol
selectionColor = lineSketchEditor.style.selectionColor
let fillColor = (selectionColor ?? UIColor.cyan).withAlphaComponent(0.25)
let sfs = AGSSimpleFillSymbol(style: .solid, color: fillColor, outline: selectionLineSymbol as? AGSSimpleLineSymbol)
selectionFillSymbol = sfs
}

private func bindToMapView(mapView: AGSMapView?){
mapView?.touchDelegate = self

if let mapView = mapView{
// defaults for symbology
selectionLineSymbol = lineSketchEditor.style.lineSymbol
let fillColor = mapView.selectionProperties.color.withAlphaComponent(0.25)
let sfs = AGSSimpleFillSymbol(style: .solid, color: fillColor, outline: selectionLineSymbol as? AGSSimpleLineSymbol)
selectionFillSymbol = sfs

let selectionOverlay = AGSGraphicsOverlay()
selectionOverlay.selectionColor = selectionColor
self.selectionOverlay = selectionOverlay
mapView.graphicsOverlays.add(selectionOverlay)

Expand Down

0 comments on commit 0577faa

Please sign in to comment.