skip to Main Content

Xcode – Fetch data from server swiftUI

I need to fetch data before view loads and display the data in a button text. Locations.swift class GetLocations :ObservableObject{ @Published var arrLocations = NSArray() func getLocNames(Action:String, Id: String, completion: @escaping (NSArray) -> Void){ //fetch data from server let session…

VIEW QUESTION
Back To Top
Search