Meishi with MapKit

Posted on Wed 25 August 2021 in swift

Another day of 100 Days of SwiftUI done. We had to integrate MapKit into the visiting card app that I named Meishi yesterday. I think the only tricky bit was handling optional locations in Core Data. 0, 0 is a legal location in the world, so the default value for a double in Core Data of zero won't work. Instead, I set a custom default value of -180 for latitude and longitude in the model, which is what's in the latitude & longitude values in kCLLocationCoordinate2DInvalid so it's easy to check against at runtime.

Today's image is a riff on the Dumb Agents sketch in the Generative Design book. I changed the color & density to feel like a blood clot, which is a thought that's always in the back of my mind.

.png" alt="Clot, dumb agents" width="400" />