in AmazonChimeSDKDemo/AmazonChimeSDKDemo/DeviceSelectionViewController.swift [107:123]
func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent _: Int) -> Int {
guard let model = model else {
return 0
}
if pickerView == audioDevicePicker {
return model.audioDevices.count
} else if pickerView == videoDevicePicker {
return model.videoDevices.count
} else if pickerView == videoFormatPicker {
if model.videoDevices.count == 0 {
return 0
}
return model.supportedVideoFormat[model.selectedVideoDeviceIndex].count
} else {
return 0
}
}