MapKit Tutorial - Reverse Geocode - Get Address - Swift 4.2

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ส.ค. 2018
  • This is part 2 of a 3 part series on MapKit. In this tutorial we'll walk through getting getting an address from a coordinate using reverse geolocating. We'll display that address on the screen and updated it as the user moves the map. This tutorial is in Xcode 10 (beta) and Swift 4.2.
    iOS Dev Courses - seanallen.teachable.com
    Part 3 will be getting directions from the users location to that address.
    Part 2 - Reverse Geolocation - Source Code:
    www.dropbox.com/sh/keburc19md...
    Part 1 - User Location
    Video:
    • How to Show User's Loc...
    Twitter:
    Sean Allen - / seanallen_dev
    Hired.com:
    hired.com/x/1n01g
    Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):
    Paul Hudson's Hacking With Swift:
    gumroad.com/a/762098803
    Donny Wals - Combine:
    gumroad.com/a/909014131
    Mark Moeyken’s SwiftUI Books:
    www.bigmountainstudio.com/swiftui-views-book/fzc51
    Objc.io Books (Thinking in SwiftUI & Advanced Swift):
    gumroad.com/a/656585843
    Ray Wenderlich Books:
    store.raywenderlich.com/a/208...
    #swift #softwaredeveloper #iosdeveloper
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 136

  • @seanallen
    @seanallen  4 ปีที่แล้ว +1

    Watch Next - iOS Take Home Project - Job Interview Practice - Free Preview - th-cam.com/video/MSIe2y6Fee8/w-d-xo.html

    • @tannerfinley4845
      @tannerfinley4845 3 ปีที่แล้ว

      I guess I am quite off topic but do anybody know of a good website to stream new tv shows online?

  • @DrChazz26
    @DrChazz26 3 ปีที่แล้ว

    Sean, your tutorials are always great. This one in particular (the series actually) is exactly what I needed for a project I am working on. Thanks for the great work.

  • @shingetzu88
    @shingetzu88 6 ปีที่แล้ว +1

    Great part 2 Sean! Thanks for the tutorial. Appreciate you continuing to make these videos even though you're not doing freelance anymore!

    • @seanallen
      @seanallen  6 ปีที่แล้ว

      Thanks Shingetzu! It's tough to find the time sometimes, but I power through. Happy to hear it's appreciated 👍

  • @alphonsosensleyii7630
    @alphonsosensleyii7630 6 ปีที่แล้ว +1

    Sean, you are killing it man! Not sure how you output so much content lol. I enjoy all of your videos and they have helped me immensely since I began coding about 15 months ago! Keep it up. You're an inspiration to many!

    • @seanallen
      @seanallen  6 ปีที่แล้ว

      Thanks for the props, Alphonso! I know you've been a supporter of the channel for a VERY long time. It doesn't go unnoticed, and is much appreciated 👍

  • @thejust219
    @thejust219 2 ปีที่แล้ว

    I love your teaching style man! Will def be getting your course soon

  • @aaronsalenga3221
    @aaronsalenga3221 4 ปีที่แล้ว +1

    I rarely comment on code tutorial vids, but I just wanna say that I actually appreciate that you chose not to edit out the mistakes you made (around the 17:25 mark) because it reflects the real world of coding and the actual experiences of programmers. Those who'd say that they'd never make simple mistakes like these aren't real programmers and/or they've never actually written original code. They probably only copy code from tutorials without taking the time to understand the effort it takes to put together a viable software product. It takes a ton of experience (and mistakes). No one's immune to making mistakes, so just chill out lol. We're all human. In any case, solid vid! You've got my sub!

    • @seanallen
      @seanallen  4 ปีที่แล้ว

      Glad you liked that aspect of it, Aaron. I've been open and honest about my story/background and I'm not trying to impress anyone. Just putting out what I know and hoping it helps other people learning. I appreciate the support!

  • @ekawong
    @ekawong 4 ปีที่แล้ว +1

    Thanks Sean for the amazing tutorial! The clear instructions and guidance really helps in my journey as I try to learn more about writing iOS apps.

    • @seanallen
      @seanallen  4 ปีที่แล้ว

      Happy to help!

  • @RobinYoulton
    @RobinYoulton 5 ปีที่แล้ว +2

    Thanks Sean, I'm learning a great deal from your instruction.

    • @seanallen
      @seanallen  5 ปีที่แล้ว +2

      Happy to help, Robin 😀

  • @RohinBajaj
    @RohinBajaj 6 ปีที่แล้ว +22

    Hey whoever is reading this have a great day and keep being beautiful and inspiring:))

  • @akselkantar2535
    @akselkantar2535 6 ปีที่แล้ว +1

    Great tutorial and clear explanation! Thanks for the awesome videos

    • @seanallen
      @seanallen  6 ปีที่แล้ว

      Happy to help, Aksel!

  • @siavasharya7111
    @siavasharya7111 5 ปีที่แล้ว +1

    This is so good. Good content, good explanation and good code. Thank you!

  • @saadaltwaim9672
    @saadaltwaim9672 2 ปีที่แล้ว

    Great tutorial Sean
    i like your coding skill

  • @jackshihtaken
    @jackshihtaken 5 ปีที่แล้ว +3

    Sean you look so much like Bill Burr. Love your videos!

  • @DLaure-yz1cw
    @DLaure-yz1cw 4 ปีที่แล้ว +3

    i had a tiny heart attack at 1:09 lol that sound effect

  • @jaewooko4527
    @jaewooko4527 5 ปีที่แล้ว +1

    Thanks a lot for updated tutorial. I hope that it is not too burden for you. My experience in making video tut was so much headache..

    • @seanallen
      @seanallen  5 ปีที่แล้ว

      Happy it helped!

  • @liramvahadi9804
    @liramvahadi9804 2 ปีที่แล้ว

    YOU ARE THE BEST!!!

  • @saqibiqbal4238
    @saqibiqbal4238 5 ปีที่แล้ว +1

    I love your videos, please make more on Mapkit 👍

    • @seanallen
      @seanallen  5 ปีที่แล้ว

      Too many topics... too little time 😀

  • @kapilk6214
    @kapilk6214 4 ปีที่แล้ว

    Hey Sean ! You definitely are one of the sexiest programmers I have ever seen, sometimes that distracts me. 😅
    Keep helping, keep motivating. Thanks for such efficient content. Thanks a lot!

  • @iliana_b
    @iliana_b 6 ปีที่แล้ว +2

    hey Sean, just wanted to say thanks for posting all those kinds of very helpful videos for upcoming iOS devs, I really appreciate it! Most of the people don't know how much effort and work it takes to put those kind of vids on youtube, so I just wanted to take moment and point that out before you reach 100k subs (which will happen very soon!!) and my message gets lost :)

    • @seanallen
      @seanallen  6 ปีที่แล้ว +2

      That's really great to hear. Sincerely. Many hours go into these videos, and at my channel size, ad revenue is almost nothing. I essentially do this for free. Makes it worthwhile when I get comments like this. Thanks for the kind words 😀

  • @swiftcoadingcafe3355
    @swiftcoadingcafe3355 3 ปีที่แล้ว +1

    Exquisite about map view of your tutorials

    • @seanallen
      @seanallen  3 ปีที่แล้ว

      Glad you liked it, Yogesh.

  • @riklowe
    @riklowe 6 ปีที่แล้ว +1

    Another great video Sean thanks. One suggestion - move you head insert video to the left as there are less things to cover over

    • @seanallen
      @seanallen  6 ปีที่แล้ว

      I'm actually in the process of changing up my setup and process on how I film these that will solve that issue. Will probably take a few weeks for the equipment to get here and for me to implement, but I'm working on it 👍

  • @jakers4000
    @jakers4000 6 ปีที่แล้ว +1

    Cool tutorial 👍🏻

    • @seanallen
      @seanallen  6 ปีที่แล้ว

      Thanks Jakers!

  • @onur5887
    @onur5887 4 ปีที่แล้ว

    Thank you very much

  • @kokodoug90
    @kokodoug90 5 ปีที่แล้ว +1

    I like that you leave the mistakes in

  • @mak_whisk
    @mak_whisk 2 ปีที่แล้ว +1

    Thank you!

    • @seanallen
      @seanallen  2 ปีที่แล้ว

      Happy to help, Ivan.

  • @rafaelaguirre1000
    @rafaelaguirre1000 5 ปีที่แล้ว +1

    Thank you very much!!!!

    • @seanallen
      @seanallen  5 ปีที่แล้ว

      Happy to help, Rafael 👍

  • @musicismylife5208
    @musicismylife5208 4 ปีที่แล้ว +1

    hey Sean, great tutorial, loving your vids, and implementing loads of your stuff in to my own projects. Here's the thing... When the map loads and shows the users current location (with the pin center in the blue dot) the Label is displayed as Label, and not as an address, the moment I move the map, and the pin lands on a new location, then it shows it as an address. how can i solve this "label" issue? Thanks in advance

  • @govindsuryawanshi9052
    @govindsuryawanshi9052 6 ปีที่แล้ว +1

    very useful ....

  • @Tnerbster853
    @Tnerbster853 6 ปีที่แล้ว

    Hey sean!
    Just wondering, I am a starting to learn swift (I learned the basics at school) but I was wondering if you have any tips or apps that I should try to recreate? To test my skills and improve them? thanks!

  • @thushanthafernando3629
    @thushanthafernando3629 4 ปีที่แล้ว

    Hi Sean, this is a great tutorial and I'm following you to learn iOS and thanks for your effort. However i have a question for you. Are there any possibilities that the app remains not to use the MKMapViewDelegate? Coz i followed your tutorial from Part I. But it seems that "regionDidChangeAnimated" is not calling.... (I'm using my map in a view controller which is attached to a navigation controller view which is in return attached to a tab bar view controller)

  • @alifarhadi5704
    @alifarhadi5704 4 ปีที่แล้ว

    Hi Sean thanks for making these great videos, I learned a lot from you. but why you didn't use annotation of mapKit itself instead of adding imageView to mapView?

  • @fma6876
    @fma6876 5 ปีที่แล้ว +3

    Hi Sean, this video is missing the parts where u added the goButton Outlet and goButtonTapped Action. I fixed it by adding a button and an image to it, and then connecting the outlets to the code.. but thought i'd mention it in case anyone else got confused. Other than that, great tutorial!

    • @seanallen
      @seanallen  5 ปีที่แล้ว

      Thanks for helping out!

  • @mohammadyunus9020
    @mohammadyunus9020 5 ปีที่แล้ว

    great video as always
    but I have one question in the documents of clgeocoder under the heading of tips for using a geocoder object, in second point it says " if the user perform multiple actions that involve geocoding the same location, reuse the results from the initial geocoding request instead of starting individual request for each action" how do we do that

  • @---ml4jd
    @---ml4jd 5 ปีที่แล้ว +2

    the font is fine :)

  • @makemytime9103
    @makemytime9103 4 ปีที่แล้ว

    YOu are best in all YOUTube Video Makers .. So Please create videos for all swift.org chapter in detail with example of all concepts.. speak in normal speed sometime it goes over when talk in full speed... Thanks Great Job you are doing thanks Buddy

  • @ishaanbansal9153
    @ishaanbansal9153 5 ปีที่แล้ว +1

    Hey Sean,
    How can I get it to actually use my real location rather than San Francisco

  • @ChiragChaplot
    @ChiragChaplot 3 ปีที่แล้ว

    Hey thanks for the amazon tutorial. Did you have the "[VKDefault] Style Z is requested for an invisible rect" error? How did you rectify it?

  • @AlbanBERNARD
    @AlbanBERNARD 5 ปีที่แล้ว

    Hi. Thanks for your great tutorial. I'm a beginner in swift coding but I tried to do an app. I have a question : All my pins downloaded from json have disappeared. How is it possible to display them and at the same time to display a central pin to retrieve the postal address ? Sincerly.

  • @joshuaowhoso
    @joshuaowhoso 4 ปีที่แล้ว

    @Sean Allen or anybody I need help! So I have this project I'm working on and I need to be able to have the user enter an address, convert the user address to longitude and latitude and save a .txt file of the longitude and latitude value.

  • @ammarakileh1479
    @ammarakileh1479 4 ปีที่แล้ว

    Thank you Sean for this tutorial. I want to ask if I want to get the region, how I can return the region without the identifier? I mean I just want the region name only not the identifier.

  • @andrewlewis4465
    @andrewlewis4465 5 ปีที่แล้ว +2

    RegionDidChangeAnimated isn't executing for me. I'm not seeing any clear reason why. Anyone run into this?

  • @jaredborders5533
    @jaredborders5533 4 ปีที่แล้ว

    Hey Sean, so I am making an app that uses an MKMapView but it is not a single view application. When I segue to the viewController that contains the MKMapView, everything works fine. However, when I dismiss that viewController, I get an error stating: TextureAtlasPage: Atlas page destroyed with outstanding references.: Assertion with expression - _textureRefs == 0
    I googled this and I see it has to do with memory and the need to delete something before dismissing the viewController, but I am not sure what nor how to do it. Any help would be super appreciated!

  • @BharatKumar-xk6lq
    @BharatKumar-xk6lq 5 ปีที่แล้ว

    hey Sean I downloaded your source code and running in my mac.It shows me error at asserts folder.....?

  • @xfatality1
    @xfatality1 2 ปีที่แล้ว

    hey sean! I am trying to add a back button to my map page. I have 3 pages and 1 page leads to my map. However, with this video, I am unable to navigate back to my other pages with no back button. Can you tell me how to add one to the top of my map? I currently have a nav bar and a back button in place, but the map is overshadowing them

  • @edison1
    @edison1 6 ปีที่แล้ว +1

    Hey Sean, love your videos. Was wondering if you can add pin by tapping on a location and showing those pins and adding custom annotation

    • @seanallen
      @seanallen  6 ปีที่แล้ว

      Hey Edison, glad you're enjoying the channel! I'm going to wait a bit and see the response to this mapkit mini-series and to see how it performs. If all goes well, I'll be expanding on it with annotations, etc...

  • @IshanUditha
    @IshanUditha 5 ปีที่แล้ว

    Hi Sean, I tried same steps in your tutorial. But it doesn't work for me. authorizationStatus() is always set to notDetermined. So I write code as same as in authorizedWhenInUse under notDetermined. But it also not work. even mapView func not trigger. Please kindly advice.

  • @BharatKumar-xk6lq
    @BharatKumar-xk6lq 5 ปีที่แล้ว

    Yeah Sean I always trying that only even though I am not getting .it just simply shows mapview

  • @30guarino
    @30guarino 5 ปีที่แล้ว +1

    Hey Sean so I've watched your Mapkit series which were very helpful ......I don't know if you're expanding on this topic or not....But having an issue on how to pass an address label from a user in a DetailVC to a mapview that maps out the directions.....Do you have a tutorial or one that you can suggest?

    • @seanallen
      @seanallen  5 ปีที่แล้ว

      I'm not familiar with one off the top of my head. I have no immediate plans to expand on this series, but may in the future.

    • @30guarino
      @30guarino 5 ปีที่แล้ว

      @@seanallen ok thanks anyway .... I did some searching on TH-cam and I found one just what I needed and also got some assistance from JonnyB on Slack channel

  • @aniltodkar6199
    @aniltodkar6199 4 ปีที่แล้ว +1

    Helpful this video
    Video title should contain "part 2"
    .
    Thank You

    • @seanallen
      @seanallen  4 ปีที่แล้ว

      Good point

    • @aniltodkar6199
      @aniltodkar6199 4 ปีที่แล้ว

      @@seanallen Thank Your Sir.
      And I like your speed.

  • @dudegot5
    @dudegot5 5 ปีที่แล้ว +1

    so i ran through the mapkit tutorial and everything is running smoothly, although the map is not displaying my current location. My map is displaying that i am in Downtown San Francisco although Im a couple of cities away from it. Is there something wrong with my Mapkit?

    • @seanallen
      @seanallen  5 ปีที่แล้ว +2

      Nope. If you are running on the simulator and not your actual device, the simulator defaults to Apple HQ

  • @bdaralan
    @bdaralan 6 ปีที่แล้ว +1

    Hi Sean, I thought we can drop a pin on MapKit instead of using UIImageView. Would you look into that for part 3?

    • @seanallen
      @seanallen  6 ปีที่แล้ว

      That's one way to do it, but it doesn't give the user the flexibility of scanning, and searching for a location quickly like moving the map around does.

    • @bdaralan
      @bdaralan 6 ปีที่แล้ว

      Sean Allen Right, gotcha.

  • @eduardguerra
    @eduardguerra 4 ปีที่แล้ว +1

    Hey Sean, I downloaded the started pack in the description and did everything you did in the video but for some odd reason it won't show the address in the label... Any Idea what could it be?

    • @seanallen
      @seanallen  4 ปีที่แล้ว

      Not sure without seeing the code. Does the project you downloaded from the description work?

    • @iAmBeyondGreat
      @iAmBeyondGreat 3 ปีที่แล้ว +1

      I'm having the same issue

  • @RobertoHernandez-op9fw
    @RobertoHernandez-op9fw 6 ปีที่แล้ว +1

    Hey Sean,
    Could you do a tutorial on creating a custom callout view for a MKAnnotationView.

    • @seanallen
      @seanallen  6 ปีที่แล้ว

      Hey Roberto, I've had a lot of request to do multiple parts for MapKit. As of now, there are only 3 parts planned, but due to the demand, I may continue to build it out.

  • @pongsathon88
    @pongsathon88 6 ปีที่แล้ว +1

    Hi sir thank you for tutorial. You can draw line between two points on MapKit?

    • @seanallen
      @seanallen  6 ปีที่แล้ว +1

      We'll be discussion that in part 3 in a few days.

  • @denns4life
    @denns4life 5 ปีที่แล้ว +3

    Hey Sean Sorry but if i don't force unwrapped previousLocation on this line "guard center.distance(from: previousLocation) > 50 else { return }" I get an error and if i force unwrapped it too the app crashes I'm using swift 4.1

    • @seanallen
      @seanallen  5 ปีที่แล้ว

      Hmmm, not sure without seeing your code. Did you try downloading my source code from the description and comparing your code to mine?

    • @denns4life
      @denns4life 5 ปีที่แล้ว

      Naa I didn't I followed you as you tutored

    • @guillaumeramey
      @guillaumeramey 5 ปีที่แล้ว

      @@seanallen Same for me, I had to add a condition :
      if let previousLocation = previousLocation {
      if center.distance(from: previousLocation) < 10 {
      return
      }
      }

  • @salithaherath1541
    @salithaherath1541 6 ปีที่แล้ว +1

    Great tutorial and clear explanation!..! And I have to question reverse geolocating. it's working all countries or not?

    • @seanallen
      @seanallen  6 ปีที่แล้ว

      I don't know for sure (because I haven't tested in all countries), but I would assume anywhere Apple Maps is supported, it would work.

    • @salithaherath1541
      @salithaherath1541 6 ปีที่แล้ว +1

      @@seanallen thank you👍

  • @NiggaInTech
    @NiggaInTech 2 ปีที่แล้ว

    is your mapkit series all with UIKIT/Storyboarding?

    • @seanallen
      @seanallen  2 ปีที่แล้ว +1

      On TH-cam, yes. However, I have a course where we build with MapKit and SwiftUI. It's called "Dub Dub Grub" and you can find out more here - seanallen.teachable.com

  • @marcinfrydrych5319
    @marcinfrydrych5319 6 ปีที่แล้ว

    Hello, what is the best place to put activity indicator when first lounching app?

    • @seanallen
      @seanallen  6 ปีที่แล้ว

      I'm not sure exactly what you mean. You want an activity indicator during the launch screen?

  • @FabricioMTL
    @FabricioMTL ปีที่แล้ว

    Do you have a MapKit tutorial SwiftUI

  • @djk12587
    @djk12587 6 ปีที่แล้ว +2

    Maybe you did this in the next tutorial, but you should keep a local copy of the geocoder and call cancel on that geocoder before you trigger another reverse geolocate request. You never know how long a reverse geocode can take and if you do not cancel any pending requests the completion block of an old reverseGeocode could be called and then your label could be updated and not match up with the pin on the map.

    • @seanallen
      @seanallen  6 ปีที่แล้ว +1

      Very good point, DJK. I'll be sure to update that in part 3.

  • @timothysmith7146
    @timothysmith7146 5 ปีที่แล้ว

    Hello, great video. I was just wondering where to download to image of the pin used for the app? Thanks for the interesting videos.

    • @seanallen
      @seanallen  5 ปีที่แล้ว

      I just google imaged a "pin" and used one of those.

  • @DancesWithDingo
    @DancesWithDingo 5 ปีที่แล้ว +2

    Great video series! I was stuck for the longest time not getting mapView changes. I finally discovered was that I didn't explicitly set mapView.delegate = self. I couldn't locate in your source file where that was established. Am I missing something obvious?

    • @seanallen
      @seanallen  5 ปีที่แล้ว +1

      It's done in storyboard. You CNTRL drag from the MKMapView in the view hierarchy to the view controller, and then set the delegate there. I show this in detail in part one "getting the user's location" if you want to check that one out. Glad you enjoyed the series!

    • @DancesWithDingo
      @DancesWithDingo 5 ปีที่แล้ว +1

      Of course it is...er...I was just testing you!

    • @seanallen
      @seanallen  5 ปีที่แล้ว

      haha, glad you got it figured out tho.

    • @DancesWithDingo
      @DancesWithDingo 5 ปีที่แล้ว +1

      Problem solved, and now I will never again forget to wire up the delegate for a control (until I do). :)

    • @seanallen
      @seanallen  5 ปีที่แล้ว

      Oh you will... still happens to me, lol

  • @thomaswahahauw560
    @thomaswahahauw560 4 ปีที่แล้ว

    Dear sean, I tried to copy your source code but even that could not fix my problem( I can't see adress or something in the adressLabel). Can you help me because I do not know what to do ? :(

    • @DrChazz26
      @DrChazz26 3 ปีที่แล้ว

      Did you watch part 1? Did you set the mapView delegate?

  • @gofudgeyourselves9024
    @gofudgeyourselves9024 6 ปีที่แล้ว

    I am not able to open the project after download. I am using Xcode 9.2 beta. The error says incompatible project version

    • @seanallen
      @seanallen  6 ปีที่แล้ว

      Yes, my source code was built with Xcode 10 beta. So you'll need that to run the project. Xcode 10 will officially be out in a couple weeks if you don't want to download the beta

  • @BharatKumar-xk6lq
    @BharatKumar-xk6lq 5 ปีที่แล้ว +1

    Great video Sean it was very clear and simple.I got the user current location but I am not getting address of the location in the second part .I hope you gonna help me........?

    • @seanallen
      @seanallen  5 ปีที่แล้ว

      Hard to say without seeing what you're doing. I include the source code for this project in the description of the video. Have you tried downloading that and comparing your code to mine?

  • @shiviagarwal9134
    @shiviagarwal9134 3 ปีที่แล้ว

    Hi Sean, I have followed the same steps as you explained but my addressLabel is not updating. I even tried executing the source code that you provided for reverse- geocode, surprising, I am getting the same result (addressLabel not updating) there as well. What can possibly the reason behind it? Please help!

    • @stefanlazov8086
      @stefanlazov8086 3 ปีที่แล้ว +2

      Hi, I had the same issue. Resolved it by following the recommendation given at stackoverflow.com/questions/19318153/mapviewregiondidchangeanimated-never-called and adding mapView.delegate=self in the viewDidLoad()

    • @shiviagarwal9134
      @shiviagarwal9134 3 ปีที่แล้ว

      Thanks @@stefanlazov8086 !!

  • @denns4life
    @denns4life 5 ปีที่แล้ว +1

    Having this error Cannot convert value of type 'ViewController?' to expected argument type '_OptionalNilComparisonType' at guard let self = self else {return}

    • @seanallen
      @seanallen  5 ปีที่แล้ว +1

      Are you using Xcode 10 and Swift 4.2? That's new in these new versions. It sounds like you're still using Xcode 9 and Swift 4.1

    • @denns4life
      @denns4life 5 ปีที่แล้ว +1

      Yes i'm still using xcode 9 because I've come a long way with the project that I'm building and I didn't want to switch to 4.2 and be dealing with deprecated stuff. However i found my way around it.
      I just replaced let self with a new constant and it worked
      ie: guard let mySelf = self else {return}. Thanks man. You are the best

    • @seanallen
      @seanallen  5 ปีที่แล้ว +1

      That's the correct fix. Glad you found it.

  • @techluthiers8189
    @techluthiers8189 5 ปีที่แล้ว +1

    Hi Sean, can you help me out on threading? I don't understand why if I call a textField to prompt this code the mapVC it is giving me an error Thread 1 Queue: com.apple.main-thread (serial). Do I need to understand threads or concurrency? what could you suggest thanks men.
    (edit: I am opening this VC from the method func textFieldDidBeginEditing(_ textField: UITextField) {
    if textField.placeholder == "a" {
    handleMap()
    }
    }
    @objc func handleMap() {
    let map = MapController()
    self.present(map, animated: true, completion: nil)
    }
    ) // End of editing.

    • @seanallen
      @seanallen  5 ปีที่แล้ว

      I did a video on that. Give this a try: th-cam.com/video/iTcq6L-PaDQ/w-d-xo.html

    • @techluthiers8189
      @techluthiers8189 5 ปีที่แล้ว

      @@seanallen Thanks man! Actually I look for that after I got this error. but there is a lot of stuff. first how can I manage to open a question like this level on stack overflow?. nuts, I know. haha! well I studied things out and this is the sumary:
      1) reverseGeocodeLocation() crashes or freezes the mainThread.
      2) libc++abi.dylib: terminating with uncaught exception of type NSException
      3) Thread 1 Queue : com.apple.main-thread (serial) [this has yellow triangle]
      4) Thread 1: signal SIGABRT
      5) Thread 2 Queue : CLGeocoder (serial) [this not, but maybe helps as extra info idk.]
      where to go from here ? 🧐 this is pure code, no InterfaceBuilder. I know that most of the cases SIGABRT is an issue while using the outlets or something like that, at the beginning I fix some like that but on pure code I have never seen something like this. I am very stuck. what can I do?

    • @techluthiers8189
      @techluthiers8189 5 ปีที่แล้ว

      So the last line of code to be called is
      guard let previousLocation = self.previousLocation else { return }
      but if I comment all the previousLocation stuff, the last line of code will be
      geoCoder.reverseGeocodeLocation(center) {[weak self] (placemarks, error) in
      and reading stack overflow ppl suggest to implement like this geoCoder.reverseGeocodeLocation(center, completionHandler: { [weak self] (placemarks, error) -> Void in
      btw, I added this redundancy? DispatchQueue.global(qos: .userInteractive).async just to make the whole mess run in background but nothing changes.

    • @techluthiers8189
      @techluthiers8189 5 ปีที่แล้ว +1

      fixed. haha problem the image on the middle of the screen was giving me the error. now im just working on how to set up the center of any screen properly like view.frame.width or something like that. haha

    • @seanallen
      @seanallen  5 ปีที่แล้ว +1

      Happy to hear you got it fixed!

  • @lukassbeataddicts
    @lukassbeataddicts 3 ปีที่แล้ว

    I used if let previousLocation = previousLocation { center.distance(from: previousLocation) > 50 else {return} } and it works same

  • @sarannyasalim
    @sarannyasalim 5 ปีที่แล้ว

    Why is my map always stuck around user's location?

    • @seanallen
      @seanallen  5 ปีที่แล้ว

      Can you explain more? Do you mean that you can't scroll the map?

  • @luisamado6779
    @luisamado6779 6 ปีที่แล้ว +1

    Second!!!

  • @stefanlazov8086
    @stefanlazov8086 3 ปีที่แล้ว +1

    Hi, Sean thank you for the great video! For me the problem was that the text in the label was not updating. Solved it by following the suggestion here stackoverflow.com/questions/19318153/mapviewregiondidchangeanimated-never-called , basically, the didChange method was not getting called, I had to call mapView.delegate = self in the viewDidLoad() and now it works.

  • @maratulbariroh2170
    @maratulbariroh2170 5 ปีที่แล้ว

    @sean my label can't wanna change

    • @maratulbariroh2170
      @maratulbariroh2170 5 ปีที่แล้ว

      I use Xcode 10 and the code don't have error but the label can't change, how can I solve this?

  • @makemytime9103
    @makemytime9103 4 ปีที่แล้ว

    font size small.. Not good for visibility....

  • @MuhammadZeeshan-cb4hv
    @MuhammadZeeshan-cb4hv 4 ปีที่แล้ว +1

    Font size is enough to read every line (Y)