This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Timer.scheduledTimer(withTimeInterval: interval, repeats: false) { (timer) in | |
| // Code here | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DispatchQueue.main.async { | |
| // Update UI components here | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Apply Delegate to the UIViewController | |
| protocol CoinManagerDelegate { | |
| func didUpdateData(_ sender: CoinManager, parsedData: BitcoinData) | |
| func didFailWithError(_ sender: CoinManager, error: Error) | |
| } | |
| // Insert these calls into the component making the call (Manager class) | |
| func performRequest(with urlString: String) { | |
| let url = URL(string: urlString) |
NewerOlder