This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension ViewController: GMSMapViewDelegate{ | |
func mapView(_ mapView: GMSMapView, didTapAt coordinate: CLLocationCoordinate2D){ | |
marker.position = coordinate | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension ViewController: GMSMapViewDelegate{ | |
//MARK - GMSMarker Dragging | |
func mapView(_ mapView: GMSMapView, didBeginDragging marker: GMSMarker) { | |
print("didBeginDragging") | |
} | |
func mapView(_ mapView: GMSMapView, didDrag marker: GMSMarker) { | |
print("didDrag") | |
} | |
func mapView(_ mapView: GMSMapView, didEndDragging marker: GMSMarker) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension ViewController: GMSMapViewDelegate{ | |
/* handles Info Window tap */ | |
func mapView(_ mapView: GMSMapView, didTapInfoWindowOf marker: GMSMarker) { | |
print("didTapInfoWindowOf") | |
} | |
/* handles Info Window long press */ | |
func mapView(_ mapView: GMSMapView, didLongPressInfoWindowOf marker: GMSMarker) { | |
print("didLongPressInfoWindowOf") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import GoogleMaps | |
class ViewController: UIViewController { | |
@IBOutlet fileprivate weak var mapView: GMSMapView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let camera = GMSCameraPosition.camera(withLatitude: 37.36, longitude: -122.0, zoom: 6.0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
protocol ViewControllerInput | |
{ | |
} | |
protocol ViewControllerOutput | |
{ | |
func fetchItems(request: TestModel.Fetch.Request) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
// MARK: - Connect View, Interactor, and Presenter | |
extension ViewController: TestPresenterOutput | |
{ | |
override func prepare(for segue: UIStoryboardSegue, sender: Any?) | |
{ | |
router.passDataToNextScene(segue: segue) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
protocol TestPresenterInput | |
{ | |
func presentFetchResults(response: TestModel.Fetch.Response); | |
} | |
protocol TestPresenterOutput: class | |
{ | |
func successFetchedItems(viewModel: TestModel.Fetch.ViewModel) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
protocol TestInteractorInput | |
{ | |
func fetchItems(request: TestModel.Fetch.Request) | |
} | |
protocol TestInteractorOutput | |
{ | |
func presentFetchResults(response: TestModel.Fetch.Response); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typealias responseHandler = (_ response:TestModel.Fetch.Response) ->() | |
class TestWorker{ | |
func fetch(itemId:Int!, keyword:String!, count: String!, success:@escaping(responseHandler), fail:@escaping(responseHandler)) | |
{ | |
// NOTE: Do the work | |
//call network etc. | |
let manager = YourApiManager() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
protocol TestRouterInput { | |
func showSomeVC() | |
} | |
class TestRouter: TestRouterInput | |
{ | |
weak var viewController: ViewController! | |