mirror of
https://github.com/ReactiveX/RxSwift.git
synced 2024-10-05 06:27:29 +03:00
10ff55cfba
The main work is done in this commit but the feature it's still "work in progress"
31 lines
603 B
Swift
31 lines
603 B
Swift
//
|
|
// UITabBarItem+Rx.swift
|
|
// Rx
|
|
//
|
|
// Created by Mateusz Derks on 04/03/16.
|
|
// Copyright © 2016 Krunoslav Zaher. All rights reserved.
|
|
//
|
|
|
|
#if os(iOS) || os(tvOS)
|
|
|
|
import Foundation
|
|
import UIKit
|
|
#if !RX_NO_MODULE
|
|
import RxSwift
|
|
#endif
|
|
|
|
extension Reactive where Base: UITabBarItem {
|
|
|
|
/**
|
|
Bindable sink for `badgeValue` property.
|
|
*/
|
|
public var badgeValue: AnyObserver<String?> {
|
|
return UIBindingObserver(UIElement: self.base) { tabBarItem, badgeValue in
|
|
tabBarItem.badgeValue = badgeValue
|
|
}.asObserver()
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|