skip to Main Content

Xcode – Using delegate with a static function in Swift

This is a function that I use it in my app, it works perfectly. class ResenhaEquideosMenuController: UIViewController, CLLocationManagerDelegate { static let locationManager = CLLocationManager() func getLocation() { let status = CLLocationManager.authorizationStatus() switch status { case .notDetermined: locationManager.requestWhenInUseAuthorization() return case .denied,…

VIEW QUESTION

how to localize a picker to another language? – Ios swift

@State var selectedSpace : FreeSpace = .Big_Bag Picker("", selection: $selectedSpace) { ForEach(FreeSpace.allCases) { FreeSpace in Text(FreeSpace.rawValue.capitalized) } }.environment(.locale, Locale.init(identifier: "az-Arab")) .foregroundColor(Color("Color")) .padding(.trailing) Knowing that the pickerValues enum FreeSpace: String, CaseIterable, Identifiable { case Big_Bag, Small_Bag var id: Self { self…

VIEW QUESTION
Back To Top
Search