Map Creation

I am currently trying to create a map. However a bunch of errors keep showing up. What I am doing wrong and how would I be able to fix this?

Hi there,

These red errors meaning that you did not follow the correct syntax form of the swift programming language.

From the screenshot I assume you want to create a map application but you don't have much experience programming with Swift. It would be better to start by learning the Swift programming language first, then you will find out why there would be so many error and how to correct them.

If you are not familiar with programming at all, a good staring point is the Swift Playground app that you can download from the App Store.

Cheers

ion addition to light-demod advices which are quite important. There are too many basic errors ; you will never make it by trying to code without mastering the basics. Here are some errors in your code:

let map = MKMapView() 

would be better

  • func view is incorrect. Correct syntax should be. In addition, it is not a good idea to call it view.
func setView() {
   view.addSubview(map)    // I suppose you want to add subview to controller's view
   map.frame = view.bounds     // No () here
}
Map Creation
 
 
Q