Skip to content

Commit 8556aef

Browse files
committed
Remove UISwitch from the Objective-C bridged interface for tvOS
1 parent 3fc4b70 commit 8556aef

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Source/Views/SwitchCell.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public protocol SwitchCellDelegate: class {
3737
/// A `UITableViewCell` subclass that shows a `UISwitch` as the `accessoryView`.
3838
open class SwitchCell: UITableViewCell, Configurable {
3939

40+
#if os(iOS)
41+
4042
/// A `UISwitch` as the `accessoryView`. Not available on tvOS.
4143
@available(tvOS, unavailable, message: "switchControl is not available on tvOS.")
4244
public private(set) lazy var switchControl: UISwitch = {
@@ -45,6 +47,8 @@ open class SwitchCell: UITableViewCell, Configurable {
4547
return control
4648
}()
4749

50+
#endif
51+
4852
/// The switch cell's delegate object, which should conform to `SwitchCellDelegate`. Not available on tvOS.
4953
@available(tvOS, unavailable, message: "SwitchCellDelegate is not available on tvOS.")
5054
open weak var delegate: SwitchCellDelegate?

0 commit comments

Comments
 (0)