0

Since im still new to coding i need help figuring this out since i don't know how to get around it. I got a segment control to switch between standard, satellite and hybrid. But it is in the sidebarmenu and the class is tableviewcontroller. I need it to interact with the mapkit so i can get it to work when pressing the button. I already got a code but need guidance/help to get it to work.

Thanks in advance!

Putting an image up here:

Segment Control Issue

2 Answers 2

1

what exactly do you need? If you need explanation regarding the work you are doing... please follow this link.. https://www.raywenderlich.com/87008/overlay-views-mapkit-swift-tutorial This site tries to explain everything in detail. Please vote the answer you find it useful

Sign up to request clarification or add additional context in comments.

Comments

0

If you look at your code you can see that you made an MKMapView by initializing it at a class scope with: var mapView = MKMapView()

What this did was allocate memory for the map and create it, but it is not on the screen. You will have to either add it via Interface Builder (the UI GUI on the left of your screenshot) or you will have to programmatically add it to the view.

This is a tutorial on how to do it via IB, and it looks like this is something you already looked at judging by your code...

It seems like you are brand new to writing code. You might want to consider taking a free Computer Science 101 class by MIT

1 Comment

I have another file for the "mapview" since the pic i showed up here was on the sidebarmenu. Check out this image: imgur.com/MHh4KUA

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.