Swift: Realm - Update UI (Progress) while adding Data to DB
问题 I want to download a 7MB JSON-File and after that I want to add the Data (30000 Datasets) to realm. while looping through the Datasets it is not possible to update the UI (Label or something) let manager = Alamofire.SessionManager.default manager.session.configuration.timeoutIntervalForRequest = 20 manager.request( "http://myURL.json") .downloadProgress { progress in self.TitelLabel.text = "loading File :\(String(format: "%.0f", progress.fractionCompleted * 100))%" } .responseJSON { response