Skip to content

Commit b03a192

Browse files
committed
remove UIPicker extension from TV as it’s not available there
1 parent 6d1c165 commit b03a192

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

RxCocoa/iOS/DataSources/RxPickerViewAdapter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2017 Krunoslav Zaher. All rights reserved.
77
//
88

9-
#if os(iOS) || os(tvOS)
9+
#if os(iOS)
1010
import UIKit
1111
#if !RX_NO_MODULE
1212
import RxSwift

RxCocoa/iOS/Protocols/RxPickerViewDataSourceType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2017 Krunoslav Zaher. All rights reserved.
77
//
88

9-
#if os(iOS) || os(tvOS)
9+
#if os(iOS)
1010

1111
import UIKit
1212
#if !RX_NO_MODULE

RxCocoa/iOS/Proxies/RxPickerViewDataSourceProxy.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2017 Krunoslav Zaher. All rights reserved.
77
//
88

9-
#if os(iOS) || os(tvOS)
9+
#if os(iOS)
1010

1111
import UIKit
1212
#if !RX_NO_MODULE

Tests/RxCocoaTests/DelegateProxyTest.swift

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -503,13 +503,24 @@ extension MockTestDelegateProtocol
503503
}
504504
#endif
505505

506+
#if os(iOS)
507+
extension MockTestDelegateProtocol: UIPickerViewDataSource {
508+
func numberOfComponents(in pickerView: UIPickerView) -> Int {
509+
fatalError()
510+
}
511+
512+
func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
513+
fatalError()
514+
}
515+
}
516+
#endif
517+
506518
#if os(iOS) || os(tvOS)
507519
extension MockTestDelegateProtocol
508520
: UICollectionViewDataSource
509521
, UIScrollViewDelegate
510522
, UITableViewDataSource
511-
, UITableViewDelegate
512-
, UIPickerViewDataSource {
523+
, UITableViewDelegate {
513524

514525
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
515526
fatalError()
@@ -526,13 +537,5 @@ extension MockTestDelegateProtocol
526537
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
527538
fatalError()
528539
}
529-
530-
func numberOfComponents(in pickerView: UIPickerView) -> Int {
531-
fatalError()
532-
}
533-
534-
func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
535-
fatalError()
536-
}
537540
}
538541
#endif

0 commit comments

Comments
 (0)