mirror of
https://github.com/ReactiveX/RxSwift.git
synced 2024-10-05 06:27:29 +03:00
Deprecates UIAlertView
and UIActionSheet
extensions.
This commit is contained in:
parent
a3e2765e3d
commit
c4eb18acfd
@ -126,6 +126,10 @@ let (
|
||||
...
|
||||
|
||||
If you want to continue using free functions form, you can define your free function aliases for `Observable` factory methods (basically copy deprecated methods).
|
||||
* Deprecates `UIAlertView` extensions.
|
||||
* These extensions could be stored locally if needed.
|
||||
* Deprecates `UIActionSheet` extensions.
|
||||
* These extensions could be stored locally if needed.
|
||||
* Deprecates `rx_controlEvents` in favor of `rx_controlEvent`.
|
||||
* Deprecates `MainScheduler.sharedInstance` in favor of `MainScheduler.instance`
|
||||
* Deprecates `ConcurrentMainScheduler.sharedInstance` in favor of `ConcurrentMainScheduler.instance`
|
||||
|
@ -13,6 +13,7 @@ import UIKit
|
||||
import RxSwift
|
||||
#endif
|
||||
|
||||
@available(*, deprecated=2.0.0, message="This class is deprecated by Apple. Removing official support.")
|
||||
class RxActionSheetDelegateProxy : DelegateProxy
|
||||
, UIActionSheetDelegate
|
||||
, DelegateProxyType {
|
||||
|
@ -13,15 +13,16 @@ import UIKit
|
||||
import RxSwift
|
||||
#endif
|
||||
|
||||
@available(*, deprecated=2.0.0, message="This class is deprecated by Apple. Removing official support.")
|
||||
class RxAlertViewDelegateProxy : DelegateProxy
|
||||
, UIAlertViewDelegate
|
||||
, DelegateProxyType {
|
||||
|
||||
|
||||
class func currentDelegateFor(object: AnyObject) -> AnyObject? {
|
||||
let alertView: UIAlertView = castOrFatalError(object)
|
||||
return alertView.delegate
|
||||
}
|
||||
|
||||
|
||||
class func setCurrentDelegate(delegate: AnyObject?, toObject object: AnyObject) {
|
||||
let alertView: UIAlertView = castOrFatalError(object)
|
||||
alertView.delegate = castOptionalOrFatalError(delegate)
|
||||
|
@ -21,6 +21,7 @@ extension UIActionSheet {
|
||||
|
||||
For more information take a look at `DelegateProxyType` protocol documentation.
|
||||
*/
|
||||
@available(*, deprecated=2.0.0, message="This class is deprecated by Apple. Removing official support.")
|
||||
public var rx_delegate: DelegateProxy {
|
||||
return proxyForObject(RxActionSheetDelegateProxy.self, self)
|
||||
}
|
||||
@ -28,6 +29,7 @@ extension UIActionSheet {
|
||||
/**
|
||||
Reactive wrapper for `delegate` message.
|
||||
*/
|
||||
@available(*, deprecated=2.0.0, message="This class is deprecated by Apple. Removing official support.")
|
||||
public var rx_clickedButtonAtIndex: ControlEvent<Int> {
|
||||
let source = rx_delegate.observe("actionSheet:clickedButtonAtIndex:")
|
||||
.map { a in
|
||||
@ -40,6 +42,7 @@ extension UIActionSheet {
|
||||
/**
|
||||
Reactive wrapper for `delegate` message.
|
||||
*/
|
||||
@available(*, deprecated=2.0.0, message="This class is deprecated by Apple. Removing official support.")
|
||||
public var rx_willDismissWithButtonIndex: ControlEvent<Int> {
|
||||
let source = rx_delegate.observe("actionSheet:willDismissWithButtonIndex:")
|
||||
.map { a in
|
||||
@ -52,6 +55,7 @@ extension UIActionSheet {
|
||||
/**
|
||||
Reactive wrapper for `delegate` message.
|
||||
*/
|
||||
@available(*, deprecated=2.0.0, message="This class is deprecated by Apple. Removing official support.")
|
||||
public var rx_didDismissWithButtonIndex: ControlEvent<Int> {
|
||||
let source = rx_delegate.observe("actionSheet:didDismissWithButtonIndex:")
|
||||
.map { a in
|
||||
|
@ -20,6 +20,7 @@ extension UIAlertView {
|
||||
|
||||
For more information take a look at `DelegateProxyType` protocol documentation.
|
||||
*/
|
||||
@available(*, deprecated=2.0.0, message="This class is deprecated by Apple. Removing official support.")
|
||||
public var rx_delegate: DelegateProxy {
|
||||
return proxyForObject(RxAlertViewDelegateProxy.self, self)
|
||||
}
|
||||
@ -27,6 +28,7 @@ extension UIAlertView {
|
||||
/**
|
||||
Reactive wrapper for `delegate` message.
|
||||
*/
|
||||
@available(*, deprecated=2.0.0, message="This class is deprecated by Apple. Removing official support.")
|
||||
public var rx_clickedButtonAtIndex: ControlEvent<Int> {
|
||||
let source = rx_delegate.observe("alertView:clickedButtonAtIndex:")
|
||||
.map { a in
|
||||
@ -39,6 +41,7 @@ extension UIAlertView {
|
||||
/**
|
||||
Reactive wrapper for `delegate` message.
|
||||
*/
|
||||
@available(*, deprecated=2.0.0, message="This class is deprecated by Apple. Removing official support.")
|
||||
public var rx_willDismissWithButtonIndex: ControlEvent<Int> {
|
||||
let source = rx_delegate.observe("alertView:willDismissWithButtonIndex:")
|
||||
.map { a in
|
||||
@ -51,6 +54,7 @@ extension UIAlertView {
|
||||
/**
|
||||
Reactive wrapper for `delegate` message.
|
||||
*/
|
||||
@available(*, deprecated=2.0.0, message="This class is deprecated by Apple. Removing official support.")
|
||||
public var rx_didDismissWithButtonIndex: ControlEvent<Int> {
|
||||
let source = rx_delegate.observe("alertView:didDismissWithButtonIndex:")
|
||||
.map { a in
|
||||
|
Loading…
Reference in New Issue
Block a user