By clicking the tab item the application closes

0

I'm making an application that has a tab, the first tab I put a webview, the second a map, when I enter the app and click on the map item, the app closes, the error happens after I refer to the map ViewController

log: 2018-09-11 17: 21: 54.849452-0300 celebrate club [4169: 1061368] Could not inset legal attribution from corner 4 (lldb)

ViewController:

import UIKit
import WebKit
import MapKit

class ViewController: UIViewController {
@IBOutlet weak var webview: WKWebView!

@IBOutlet weak var mapview: MKMapView!




override func viewDidLoad() {
    super.viewDidLoad()
    let url = URL(string: "http://google.com")
    let UrlRequest = URLRequest(url:url!)
    webview.load(UrlRequest) 

}




override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()

}

}

    
asked by anonymous 11.09.2018 / 22:25

1 answer

1

You may not have plugged the outlet into the interface builder.

If you use LocationManager to get GPS positioning, you have to add permissions in the plist file as explained here at the beginning of the documentation: link

Depending on what you want, you must implement the delegate methods of MKMapViewDelegate , starting to implement class ViewController: UIViewController, MKMapViewDelegate {

    
11.09.2018 / 23:20