質問編集履歴

3

タイトル訂正

2018/04/03 10:21

投稿

curh
curh

スコア11

test CHANGED
@@ -1 +1 @@
1
- CoreLocationで取得したlatitudeの値をviewDidLoad()に出力したい
1
+ locationManagerで取得したlatitudeの値をviewDidLoad()に出力したい
test CHANGED
File without changes

2

ソースコード 訂正

2018/04/03 10:21

投稿

curh
curh

スコア11

test CHANGED
File without changes
test CHANGED
@@ -32,7 +32,7 @@
32
32
 
33
33
 
34
34
 
35
- var locationManager = CLLocationManager() //ロケーションマネージャを作る
35
+ var locationManager = CLLocationManager()
36
36
 
37
37
  var locationData : CLLocation? = nil
38
38
 

1

ソースコードに誤りがあったため訂正しました

2018/04/03 10:15

投稿

curh
curh

スコア11

test CHANGED
File without changes
test CHANGED
@@ -28,6 +28,16 @@
28
28
 
29
29
  ```Swift3
30
30
 
31
+ class ViewController: UIViewController, ARSCNViewDelegate, CLLocationManagerDelegate{
32
+
33
+
34
+
35
+ var locationManager = CLLocationManager() //ロケーションマネージャを作る
36
+
37
+ var locationData : CLLocation? = nil
38
+
39
+
40
+
31
41
  override func viewDidLoad() {
32
42
 
33
43
  super.viewDidLoad()
@@ -40,7 +50,7 @@
40
50
 
41
51
  var ido:Double = 0.0
42
52
 
43
- ido = locationManager() //locationManager()の()内の書き方わからない
53
+ ido = locationManager(locationManager,locationData) //Cannot call value of non-function type 'CLLocationManager'というエラー出る
44
54
 
45
55
 
46
56
 
@@ -55,6 +65,8 @@
55
65
  }
56
66
 
57
67
  }
68
+
69
+ }
58
70
 
59
71
  ```
60
72