Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleans up warnings #181

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ARCL/Source/Extensions/CLLocation+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ public struct LocationTranslation {
}

public extension CLLocation {
public convenience init(coordinate: CLLocationCoordinate2D, altitude: CLLocationDistance) {
convenience init(coordinate: CLLocationCoordinate2D, altitude: CLLocationDistance) {
self.init(coordinate: coordinate, altitude: altitude, horizontalAccuracy: 0, verticalAccuracy: 0, timestamp: Date())
}

///Translates distance in meters between two locations.
///Returns the result as the distance in latitude and distance in longitude.
public func translation(toLocation location: CLLocation) -> LocationTranslation {
/// Translates distance in meters between two locations.
/// Returns the result as the distance in latitude and distance in longitude.
func translation(toLocation location: CLLocation) -> LocationTranslation {
let inbetweenLocation = CLLocation(latitude: self.coordinate.latitude, longitude: location.coordinate.longitude)

let distanceLatitude = location.distance(from: inbetweenLocation)
Expand All @@ -43,7 +43,7 @@ public extension CLLocation {
altitudeTranslation: altitudeTranslation)
}

public func translatedLocation(with translation: LocationTranslation) -> CLLocation {
func translatedLocation(with translation: LocationTranslation) -> CLLocation {
let latitudeCoordinate = self.coordinate.coordinateWithBearing(bearing: 0,
distanceMeters: translation.latitudeTranslation)

Expand Down
4 changes: 2 additions & 2 deletions ARCL/Source/Extensions/FloatingPoint+Radians.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
import Foundation

public extension FloatingPoint {
public var degreesToRadians: Self { return self * .pi / 180 }
public var radiansToDegrees: Self { return self * 180 / .pi }
var degreesToRadians: Self { return self * .pi / 180 }
var radiansToDegrees: Self { return self * 180 / .pi }
}
5 changes: 3 additions & 2 deletions ARCL/Source/Nodes/LocationAnnotationNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ open class LocationAnnotationNode: LocationNode {
}

@available(iOS 10.0, *)
/// Use this constructor to add a UIView as an annotation. Keep in mind that it is not live, instead it's a "snapshot" of that UIView.
/// UIView is more configurable then a UIImage, allowing you to add background image, labels, etc.
/// Use this constructor to add a UIView as an annotation. Keep in mind that it is not live, instead
/// it's a "snapshot" of that UIView. UIView is more configurable then a UIImage, allowing you to add
/// background image, labels, etc.
///
/// - Parameters:
/// - location: The location of the node in the world.
Expand Down
8 changes: 4 additions & 4 deletions ARCL/Source/SceneLocationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ open class SceneLocationView: ARSCNView {
showsStatistics = false

debugOptions = showFeaturePoints ? [ARSCNDebugOptions.showFeaturePoints] : debugOptions

let touchGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(sceneLocationViewTouched(sender:)))
self.addGestureRecognizer(touchGestureRecognizer)
}
Expand Down Expand Up @@ -212,15 +212,15 @@ public extension SceneLocationView {
locationNodes.append(locationNode)
sceneNode?.addChildNode(locationNode)
}

@objc func sceneLocationViewTouched(sender: UITapGestureRecognizer) {
guard let touchedView = sender.view as? SCNView else {
return
}

let coordinates = sender.location(in: touchedView)
let hitTest = touchedView.hitTest(coordinates)

if !hitTest.isEmpty,
let firstHitTest = hitTest.first,
let touchedNode = firstHitTest.node as? AnnotationNode {
Expand Down
2 changes: 0 additions & 2 deletions ARKit+CoreLocation/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ extension SettingsViewController: CLLocationManagerDelegate {
}
}



// MARK: - Implementation

@available(iOS 11.0, *)
Expand Down
1 change: 0 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'
use_frameworks!
inhibit_all_warnings!

target 'ARKit+CoreLocation' do
pod 'ARCL', :path => '.'
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
ARCL: de572e728e225494df56183b23e5203581915ffd

PODFILE CHECKSUM: 0253a6a9d478bb7f0d71292e3283c52bdad2bd40
PODFILE CHECKSUM: 1576bdfdc3990c7e821f93bcae8cf3b28a3cf18c

COCOAPODS: 1.5.0
2 changes: 1 addition & 1 deletion Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 36 additions & 36 deletions Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Pods/Target Support Files/ARCL/ARCL.xcconfig

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog

- next
- [PR #181 - Cleans up warnings](https://github.com/ProjectDent/ARKit-CoreLocation/pull/181)
- [PR #177 - Fixes the workspace schemes](https://github.com/ProjectDent/ARKit-CoreLocation/pull/177)
- [PR #176 - Fixes issue #164](https://github.com/ProjectDent/ARKit-CoreLocation/pull/176)
- Fixes an issue where dismissing the ARCL Scene View can make other UIs unusable
- Creating LocationNodes from a UIView now just creates an image from that view and uses the image.
- [PR #171 - Support Carthage and open SceneLocationView for extension](https://github.com/ProjectDent/ARKit-CoreLocation/pull/171)
- 1.1.0
- [PR #59 - Routing / Polylines](https://github.com/ProjectDent/ARKit-CoreLocation/pull/159)
- [PR #159 - Directions (Routes) and AR Polylines](https://github.com/ProjectDent/ARKit-CoreLocation/pull/159)
- Adds the ability to take an array of `MKRoute` objects and render it as a route in AR (similar to the demo gif on the README)
- Updates the demo app to allow you to demonstrate this capability