回答編集履歴

2

修正

2016/08/16 12:53

投稿

_Kentarou
_Kentarou

スコア8490

test CHANGED
@@ -1,4 +1,4 @@
1
- `PickerView`の表示が1しかないのに2,3目の値もログ出力しているので落ちています、以下のように変更してみてください。
1
+ `PickerView`の表示が1しかないのに2,3目の値もログ出力しているので落ちています、以下のように変更してみてください。
2
2
 
3
3
 
4
4
 

1

修正

2016/08/16 12:53

投稿

_Kentarou
_Kentarou

スコア8490

test CHANGED
@@ -4,8 +4,12 @@
4
4
 
5
5
  ```swift
6
6
 
7
- let data1 = self.pickerView(pickerView, titleForRow: pickerView.selectedRowInComponent(0), forComponent: 0)
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
  ```