Ch. 8.7 LocationManager: Getting Device Location with SwiftUI (Snacktacular app)
ฝัง
- เผยแพร่เมื่อ 3 พ.ย. 2024
- We'll build a small app with a LocationManager class so that we can get a device's location. The class is fairly easy to drop into new apps, and we'll eventually include this as part of Snacktacular, but first, in the lesson that follows we'll use the LocationManager to also allow the user to search a list of places and select one to retrieve name, address, and coordinate information.
Part of a university course by Prof. John Gallaugher designed for the absolute beginner, where students will learn to program using Swift + SwiftUI. The course will move from no assumed prior programming experience while students learn fundamental, then intermediate and advanced concepts, culminating in a full stack app. Full free course playlist at:
bit.ly/prof-g-...
This course will roughly mirror the content covered in my UIKit course at bit.ly/prof-g-.... Subscribe - many more videos coming soon!
This is one of the most engaging tutorials I have ever seen (and I have seen thousands). Thanks for doing this in such a precise and fun way. Hammer Time!
Hey, thanks SO much for the motivating kind words! I really appreciate it. More content coming later this year. If you’d like a laptop sticker, DM me with a mailing address. I send them out worldwide for free to randomly selected posters. Cheers & keep hacking!
Good lesson 🎉
Glad you liked it!
great video, thanks for sharing your knowledge, keep going :)
thanks for help.
You're welcome!
LocationManager Line 18 gives me this error: "Property 'self.location' not initialized at super.init call"
a little late, but for future viewers, it's probably because @Published var location: CLLocation was missing the "?"
It should be @Published var location: CLLocation?