How to turn off NavigationLink overlay color in SwiftUI?

The navigationLink acts like Button and it gets the default button style with blue color. Using .renderingMode(.original) only works on Image views. What if you decide to load your image using some libs or pods?! It is better to change the default button style to plain using the modifier below: NavigationLink(destination: Text(“Hello”)) { ZStack { … Read more

How to find your current location with CoreLocation

You can find your location using CoreLocation like this: import CoreLocation: #import <CoreLocation/CoreLocation.h> Declare CLLocationManager: CLLocationManager *locationManager; Initialize the locationManager in viewDidLoad and create a function that can return the current location as an NSString: – (NSString *)deviceLocation { return [NSString stringWithFormat:@”latitude: %f longitude: %f”, locationManager.location.coordinate.latitude, locationManager.location.coordinate.longitude]; } – (void)viewDidLoad { locationManager = [[CLLocationManager alloc] … Read more

Stopping xcode from indexing

Just run this command in the terminal to turn off Indexing: defaults write com.apple.dt.XCode IDEIndexDisable 1 To turn it back on, run this: defaults write com.apple.dt.XCode IDEIndexDisable 0 (Note: Apparently you need to delete this key in order for the change to take affect, however, I used simply the above command and it worked fine. … Read more