I am developing an application where I need to insert a map of an internal location (as soon as the map view of apple is not registered), I would like to know if it has a mapView mount (mounting the internal location) an ImgView and allow zooming, since I have the plant in jpg? Thanks
Current code:
class MapasViewController: UIViewController, UIScrollViewDelegate {
@IBOutlet weak var imgMapa: UIImageView! // *** Declara imgView
@IBOutlet weak var scrollView: UIScrollView!
func viewForZoomingInScrollView(scrollView: UIScrollView) -> UIView? {
return imgMapa
}
override func viewDidLoad() {
super.viewDidLoad()
print("*** LOG : TELA DE MAPAS CARREGADA ***")
let width: CGFloat = imgMapa.image!.size.width
let height: CGFloat = imgMapa.image!.size.height
scrollView.minimumZoomScale = 1.0
scrollView.maximumZoomScale = 6.0
scrollView.contentSize = CGSizeMake(width, height)
scrollView.delegate = self
scrollView.zoomScale = 1.0
}
}