回答編集履歴
2
修正
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
`PickerView`の表示が1
|
1
|
+
`PickerView`の表示が1列しかないのに2,3列目の値もログ出力しているので落ちています、以下のように変更してみてください。
|
2
2
|
|
3
3
|
|
4
4
|
|
1
修正
test
CHANGED
@@ -4,8 +4,12 @@
|
|
4
4
|
|
5
5
|
```swift
|
6
6
|
|
7
|
-
|
7
|
+
func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
|
8
8
|
|
9
|
+
let data1 = self.pickerView(pickerView, titleForRow: pickerView.selectedRowInComponent(0), forComponent: 0)
|
10
|
+
|
9
|
-
print("選択 \(data1!)")
|
11
|
+
print("選択 \(data1!)")
|
12
|
+
|
13
|
+
}
|
10
14
|
|
11
15
|
```
|