質問編集履歴
1
一部コードを追記しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -29,3 +29,45 @@
|
|
29
29
|
|
30
30
|
|
31
31
|
よろしくお願いします。
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
```swift3
|
36
|
+
|
37
|
+
let session = URLSession(configuration: urlconfig, delegate: self as URLSessionDelegate, delegateQueue: nil)
|
38
|
+
|
39
|
+
session.dataTask(with: url!) { data, response, error in
|
40
|
+
|
41
|
+
if error == nil {
|
42
|
+
|
43
|
+
print("通信成功")
|
44
|
+
|
45
|
+
gotoNext();
|
46
|
+
|
47
|
+
} else {
|
48
|
+
|
49
|
+
print("通信エラー")
|
50
|
+
|
51
|
+
}
|
52
|
+
|
53
|
+
}.resume()
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
func gotoNext() {
|
60
|
+
|
61
|
+
DispatchQueue.main.async {
|
62
|
+
|
63
|
+
if let nextView = self.storyboard?.instantiateViewController(withIdentifier: "nextView") as? nextViewController {
|
64
|
+
|
65
|
+
self.present(nextView, animated: true, completion: nil)
|
66
|
+
|
67
|
+
}
|
68
|
+
|
69
|
+
}
|
70
|
+
|
71
|
+
}
|
72
|
+
|
73
|
+
```
|