forked from yumemi-inc/ios-training
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs yumemi-inc#14
- Loading branch information
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# 非同期処理 | ||
|
||
[TODO] 非同期処理の前に TableView か CollectionView を利用して複数の拠点の天気予報を表示できるようにするのはどうだろうか | ||
|
||
非同期処理を扱ってみましょう。 | ||
|
||
Async ver | ||
```swift | ||
static func asyncFetchWeather(_ jsonString: String, completion: @escaping (Result<String, YumemiWeatherError>) -> Void) | ||
``` | ||
[APIの概要](YumemiWeather.md#async-ver) | ||
|
||
## 課題 | ||
- 呼び出しAPIを`Async ver`に変更する | ||
- APIの処理が戻るまで各拠点の View に天気予報取得中の UI 表示を行う | ||
|
||
※イメージ | ||
![async](Images/Async.gif) |
This file contains 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