Skip to content

Commit

Permalink
fix Swift 4.1 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
googlb committed Apr 17, 2018
1 parent e678d8c commit 45d1360
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions amap3DSwift/amap3DSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "amap3DSwift-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -409,7 +409,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.BrodyGao.amap3DSwift;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "amap3DSwift-Bridging-Header.h";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
"idiom" : "iphone",
"filename" : "iPhone_App_iOS7-9_60pt@3x.png",
"scale" : "3x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class SingleLocaitonAloneViewController: BaseViewController ,AMapLocationManager

if ((regeocode) != nil)
{
print("reGeocode:\(regeocode)");
print("reGeocode:\(String(describing: regeocode))");

self.displayLabel.text = String.init(format: "%@ \n %@-%@-%.2fm",regeocode!.formattedAddress, regeocode!.citycode,regeocode!.adcode,location!.horizontalAccuracy)
}
Expand All @@ -91,11 +91,11 @@ class SingleLocaitonAloneViewController: BaseViewController ,AMapLocationManager

if ((regeocode) != nil)
{
print("reGeocode:\(regeocode)");
print("reGeocode:\(String(describing: regeocode))");


}else{
print("location:\(location)")
print("location:\(String(describing: location))")
self.displayLabel.text = String.init(format: "lat:%f;lon:%f \n accuracy:%.2fm", location!.coordinate.latitude,location!.coordinate.longitude,location!.horizontalAccuracy)
}

Expand Down
6 changes: 3 additions & 3 deletions amap3DSwift/amap3DSwift/SingleLocationViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class SingleLocationViewController: BaseViewController,MAMapViewDelegate,AMapSea
annotation.coordinate = location!.coordinate
if ((regeocode) != nil)
{
print("reGeocode:\(regeocode)");
print("reGeocode:\(String(describing: regeocode))");
annotation.title = regeocode?.formattedAddress
annotation.subtitle = String.init(format: "%@-%@-%.2fm", regeocode!.citycode,regeocode!.adcode,location!.horizontalAccuracy)
}
Expand All @@ -99,12 +99,12 @@ class SingleLocationViewController: BaseViewController,MAMapViewDelegate,AMapSea
annotation.coordinate = location!.coordinate
if ((regeocode) != nil)
{
print("reGeocode:\(regeocode)");
print("reGeocode:\(String(describing: regeocode))");


}else{
annotation.title = String.init(format: "lat:%f;lon:%f", location!.coordinate.latitude,location!.coordinate.longitude)
print("location:\(location)")
print("location:\(String(describing: location))")
annotation.subtitle = String.init(format: "accuracy:%.2fm", location!.horizontalAccuracy)
}
self.addAnnotationToMapView(annotation: annotation)
Expand Down
2 changes: 1 addition & 1 deletion amap3DSwift/amap3DSwift/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class ViewController: UIViewController,UITableViewDataSource,UITableViewDelegate
self.present(alertController, animated: true, completion: nil)

}
AMapServices.shared().apiKey = APIKey.APIkey as String!
AMapServices.shared().apiKey = APIKey.APIkey as String?
}

// MARK: - UITableViewDataSource
Expand Down

0 comments on commit 45d1360

Please sign in to comment.