Closed bestseob93 closed 6 years ago
// SwiftStreetVueController.swift import UIKit import GoogleMaps
// SwiftStreetVueController.swift
import UIKit
import GoogleMaps
class SwiftStreetVueController: UIViewController, GMSPanoramaViewDelegate { override func loadView() { let bounda = UIScreen.main.bounds let width = bounda.size.width let height = bounda.size.height let panoView = GMSPanoramaView(frame: CGRect(x: 0, y: 0, width: width, height: height-60)) panoView.setAllGesturesEnabled(true) panoView.moveNearCoordinate(CLLocationCoordinate2DMake(38.4476364, -123.3953934)) panoView.delegate = self self.view = panoView } // MARK: - GMSPanoramaViewDelegate private func panoramaView(view: GMSPanoramaView!, error: NSError!, onMoveNearCoordinate coordinate: CLLocationCoordinate2D) { print("Moving near coordinate (\(coordinate.latitude),\(coordinate.longitude) error: \(error.localizedDescription)") }
class SwiftStreetVueController: UIViewController, GMSPanoramaViewDelegate {
override func loadView() {
let bounda = UIScreen.main.bounds
let width = bounda.size.width
let height = bounda.size.height
let panoView = GMSPanoramaView(frame: CGRect(x: 0, y: 0, width: width,
height: height-60))
panoView.setAllGesturesEnabled(true)
panoView.moveNearCoordinate(CLLocationCoordinate2DMake(38.4476364, -123.3953934))
panoView.delegate = self
self.view = panoView
}
// MARK: - GMSPanoramaViewDelegate
private func panoramaView(view: GMSPanoramaView!, error: NSError!, onMoveNearCoordinate coordinate: CLLocationCoordinate2D) {
print("Moving near coordinate (\(coordinate.latitude),\(coordinate.longitude) error: \(error.localizedDescription)")
private func panoramaView(view: GMSPanoramaView!, error: NSError!, onMoveToPanoramaID panoramaID: String!) { print("Moving to PanoID \(panoramaID) error: \(error.localizedDescription)") }
private func panoramaView(view: GMSPanoramaView!, error: NSError!, onMoveToPanoramaID panoramaID: String!) {
print("Moving to PanoID \(panoramaID) error: \(error.localizedDescription)")
private func panoramaView(view: GMSPanoramaView!, didMoveToPanorama panorama: ``GMSPanorama!) { print("Moved to panoramaID: \(panorama.panoramaID) " + "coordinates: (\(panorama.coordinate.latitude),\(panorama.coordinate.longitude))") }
private func panoramaView(view: GMSPanoramaView!, didMoveToPanorama panorama: ``GMSPanorama!) {
print("Moved to panoramaID: \(panorama.panoramaID) " +
"coordinates: (\(panorama.coordinate.latitude),\(panorama.coordinate.longitude))")
`// SwiftStreetVue.swift import UIKit import GoogleMaps
class SwiftStreetVue: UIView { let StreetVueController: SwiftStreetVueController = SwiftStreetVueController() override init(frame: CGRect) { super.init(frame: frame) self.reactAddController(toClosestParent: StreetVueController) self.addSubview(StreetVueController.view) }
required init(coder aDecoder: NSCoder) { fatalError("This class does not support NSCoding") }
} `
`// SwiftStreetVueManager.swift
import Foundation @objc(SwiftStreetVueManager) class SwiftStreetVueManager : RCTViewManager {
override func view() -> UIView! { return SwiftStreetVue(); } } `
I can't touch or click my view. how can i do it?
// SwiftStreetVueController.swift
import UIKit
import GoogleMaps
class SwiftStreetVueController: UIViewController, GMSPanoramaViewDelegate {
override func loadView() {
let bounda = UIScreen.main.bounds
let width = bounda.size.width
let height = bounda.size.height
let panoView = GMSPanoramaView(frame: CGRect(x: 0, y: 0, width: width,
height: height-60))
panoView.setAllGesturesEnabled(true)
panoView.moveNearCoordinate(CLLocationCoordinate2DMake(38.4476364, -123.3953934))
panoView.delegate = self
self.view = panoView
}
// MARK: - GMSPanoramaViewDelegate
private func panoramaView(view: GMSPanoramaView!, error: NSError!, onMoveNearCoordinate coordinate: CLLocationCoordinate2D) {
print("Moving near coordinate (\(coordinate.latitude),\(coordinate.longitude) error: \(error.localizedDescription)")
}
private func panoramaView(view: GMSPanoramaView!, error: NSError!, onMoveToPanoramaID panoramaID: String!) {
print("Moving to PanoID \(panoramaID) error: \(error.localizedDescription)")
}
private func panoramaView(view: GMSPanoramaView!, didMoveToPanorama panorama: ``GMSPanorama!) {
print("Moved to panoramaID: \(panorama.panoramaID) " +
"coordinates: (\(panorama.coordinate.latitude),\(panorama.coordinate.longitude))")
}
}
`// SwiftStreetVue.swift import UIKit import GoogleMaps
class SwiftStreetVue: UIView { let StreetVueController: SwiftStreetVueController = SwiftStreetVueController() override init(frame: CGRect) { super.init(frame: frame) self.reactAddController(toClosestParent: StreetVueController) self.addSubview(StreetVueController.view) }
required init(coder aDecoder: NSCoder) { fatalError("This class does not support NSCoding") }
} `
`// SwiftStreetVueManager.swift
import Foundation @objc(SwiftStreetVueManager) class SwiftStreetVueManager : RCTViewManager {
override func view() -> UIView! { return SwiftStreetVue(); } } `
I can't touch or click my view. how can i do it?