0

I'm trying to use xcode to make an ios app that zooms in on a location using mapkit. I'm following this tutorial and at the end of the 'Getting Started' section I get the error Could not find a storyboard named 'Main' in bundle NSBundle

I've been trying to use this solution, but when i remove Main storyboard file base name from info.plist,

enter image description here

the screen of the app is just black, when I head to deployment info-> Main interface and set it to main,

enter image description here

it just puts the Main storyboard file base name line back into info.plist

This is my ViewController.swift file, which is the only one i've edited

import UIKit
import MapKit

class ViewController: UIViewController {

    @IBOutlet weak var MapView: MKMapView!

    let regionRadius: CLLocationDistance = 1000
    func centerMapOnLocation(location: CLLocation) {
        let coordinateRegion = MKCoordinateRegion(center: location.coordinate, latitudinalMeters: regionRadius, longitudinalMeters: regionRadius)
        MapView.setRegion(coordinateRegion, animated: true)
    }

    override func viewDidLoad() {
    super.viewDidLoad()
        let initialLocation = CLLocation(latitude: 21.282778, longitude: -157.829444)
        centerMapOnLocation(location: initialLocation)
  }


}
Sam
  • 1,765
  • 11
  • 82
  • 176

0 Answers0