Unverified Commit 6daffc5d authored by ASAHI OCEAN's avatar ASAHI OCEAN Committed by GitHub
Browse files

Merge pull request #26 from asahiocean/develop

Develop
parents 1f73d056 27ec6f8a
......@@ -733,7 +733,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = KXDT64LHVB;
INFOPLIST_FILE = "SZRCAI/Root Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
......@@ -754,7 +754,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = KXDT64LHVB;
INFOPLIST_FILE = "SZRCAI/Root Files/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
......
......@@ -26,7 +26,7 @@ extension ViewController: MKMapViewDelegate {
//MARK: - MKUserTrackingMode
func mapView(_ mapView: MKMapView, didChange mode: MKUserTrackingMode, animated: Bool) {
if lm.shared.status != .authorizedWhenInUse {
if LM.shared.status != .authorizedWhenInUse {
let alert = alertAuthorizedWhenInUse()
present(alert, animated: true, completion: {
mapView.userTrackingMode = .none
......
......@@ -2,12 +2,13 @@ import UIKit
extension ViewController {
internal func buttonsSetup() {
guard let tracker = mapView.model.trackerButton(mv: mapView) else { fatalError("Solve the button problem") }
guard let tracker = mapView.model.trackerButton(with: mapView) else { fatalError("Solve the button problem") }
view.addSubview(tracker)
buttonKVO = mapView.model.observe(\.mainButton, options: [.initial,.new], changeHandler: { obj, change in
guard let config = change.newValue, let button = config else { return }
self.mainButton = button // Monitoring the state of the button through the KVO
// Monitoring the state of the button through the KVO
self.mainButton = button
})
view.addSubview(mainButton)
......@@ -29,10 +30,8 @@ extension ViewController {
func buttonsAnimator(state: state) {
let value = view.bounds.maxY * state.rawValue
UIView.animate(withDuration: 0.25, delay: 0, options: [.curveEaseInOut], animations: { [weak self] in
// - - Main button - -
self?.mainButton.frame.origin.y = value
self?.mainButton.layoutIfNeeded()
// - - Clear button - -
self?.clearButton.frame.origin.y = value
self?.clearButton.layoutIfNeeded()
})
......
......@@ -2,7 +2,7 @@ import UIKit
import MapKit
extension Model {
func trackerButton(mv mapView: MKMapView?) -> UIButton? {
func trackerButton(with mapView: MKMapView?) -> UIButton? {
guard let mapView = mapView else { return nil }
let sqroot = mapView.frame.width.squareRoot()
......@@ -32,9 +32,7 @@ extension Model {
view.center.y = mapView.frame.midY
view.frame.origin.x = mapView.frame.maxX - (view.bounds.width + sqroot)
view.addSubview(toolbar)
self.trackingButton = view
return trackingButton
}
}
import Foundation
import CoreLocation
typealias lm = LocationManager
typealias LM = LocationManager
@objc class LocationManager: CLLocationManager {
......@@ -26,7 +26,6 @@ typealias lm = LocationManager
}
extension LocationManager: CLLocationManagerDelegate {
func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
self.status = status
switch status {
......
......@@ -25,20 +25,20 @@ class MapView: MKMapView {
showsUserLocation = true
userTrackingMode = .none
if #available(iOS 13.0, *) {
pointOfInterestFilter = .none
} else {
showsPointsOfInterest = true
}
showsCompass = true
showsScale = true
isZoomEnabled = true
isScrollEnabled = true
let longPress = UILongPressGestureRecognizer()
longPress.minimumPressDuration = 0.25 // in seconds
longPress.minimumPressDuration = 0.25 // in sec
longPress.addTarget(self, action: #selector(appendPin(_:)))
addGestureRecognizer(longPress)
......
import Foundation
import MapKit
import MapKit.MKAnnotationView
class PinMarkerView: MKMarkerAnnotationView {
......
import UIKit.UIResponder
extension UIResponder {
static func defaultViewController(for window: UIWindow?) {
guard let window = window else { fatalError() }
window.rootViewController = ViewController(nibName: nil, bundle: nil)
......
......@@ -15,11 +15,9 @@ class SZRCAITests: XCTestCase {
}
}
override func setUpWithError() throws {
}
override func setUpWithError() throws { }
override func tearDownWithError() throws {
}
override func tearDownWithError() throws { }
func testingVC() throws {
XCTAssertTrue(viewController != nil)
......@@ -40,7 +38,6 @@ class SZRCAITests: XCTestCase {
}
func testPerformanceExample() throws {
self.measure {
}
self.measure { }
}
}
......@@ -6,8 +6,7 @@ class SZRCAIUITests: XCTestCase {
continueAfterFailure = false
}
override func tearDownWithError() throws {
}
override func tearDownWithError() throws { }
func testExample() throws {
let app = XCUIApplication()
......@@ -26,7 +25,7 @@ class SZRCAIUITests: XCTestCase {
func testLaunchPerformance() throws {
if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) {
measure(metrics: [XCTApplicationLaunchMetric()]) {
XCUIApplication().launch()
// XCUIApplication().launch()
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment