Merge branch 'uipagecontrol-add-rx_master' into uipagecontrol-add-rx
This commit is contained in:
commit
56119d3e91
|
|
@ -43,6 +43,9 @@
|
|||
84E4D3931C9AFD3500ADFDC9 /* UISearchController+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E4D3901C9AFCD500ADFDC9 /* UISearchController+Rx.swift */; };
|
||||
84E4D3941C9AFD3600ADFDC9 /* UISearchController+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E4D3901C9AFCD500ADFDC9 /* UISearchController+Rx.swift */; };
|
||||
84E4D3961C9B011000ADFDC9 /* UISearchController+RxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E4D3951C9B011000ADFDC9 /* UISearchController+RxTests.swift */; };
|
||||
91BE429C1CBF7EC000F6B062 /* UIPageControl+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91BE429B1CBF7EC000F6B062 /* UIPageControl+Rx.swift */; };
|
||||
91BE429D1CBF7EC000F6B062 /* UIPageControl+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91BE429B1CBF7EC000F6B062 /* UIPageControl+Rx.swift */; };
|
||||
91BE429F1CBF7F3D00F6B062 /* UIPageControl+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91BE429B1CBF7EC000F6B062 /* UIPageControl+Rx.swift */; };
|
||||
9BA1CBD31C0F7D550044B50A /* UIActivityIndicatorView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BA1CBD11C0F7C0A0044B50A /* UIActivityIndicatorView+Rx.swift */; };
|
||||
9BA1CBFD1C0F84A10044B50A /* UIActivityIndicatorView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BA1CBD11C0F7C0A0044B50A /* UIActivityIndicatorView+Rx.swift */; };
|
||||
9BA1CBFE1C0F84C40044B50A /* UIActivityIndicatorView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BA1CBD11C0F7C0A0044B50A /* UIActivityIndicatorView+Rx.swift */; };
|
||||
|
|
@ -1348,6 +1351,7 @@
|
|||
84C225A21C33F00B008724EC /* RxTextStorageDelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxTextStorageDelegateProxy.swift; sourceTree = "<group>"; };
|
||||
84E4D3901C9AFCD500ADFDC9 /* UISearchController+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UISearchController+Rx.swift"; sourceTree = "<group>"; };
|
||||
84E4D3951C9B011000ADFDC9 /* UISearchController+RxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UISearchController+RxTests.swift"; sourceTree = "<group>"; };
|
||||
91BE429B1CBF7EC000F6B062 /* UIPageControl+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIPageControl+Rx.swift"; sourceTree = "<group>"; };
|
||||
9BA1CBD11C0F7C0A0044B50A /* UIActivityIndicatorView+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIActivityIndicatorView+Rx.swift"; sourceTree = "<group>"; };
|
||||
A111CE961B91C97C00D0DCEE /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
AAE623751C82475700FC7801 /* UIProgressView+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIProgressView+Rx.swift"; sourceTree = "<group>"; };
|
||||
|
|
@ -2358,6 +2362,7 @@
|
|||
C882540A1B8A752B00B02D69 /* UIGestureRecognizer+Rx.swift */,
|
||||
C882540B1B8A752B00B02D69 /* UIImageView+Rx.swift */,
|
||||
C882540C1B8A752B00B02D69 /* UILabel+Rx.swift */,
|
||||
91BE429B1CBF7EC000F6B062 /* UIPageControl+Rx.swift */,
|
||||
AAE623751C82475700FC7801 /* UIProgressView+Rx.swift */,
|
||||
7F600F3D1C5D0C0100535B1D /* UIRefreshControl+Rx.swift */,
|
||||
C882540D1B8A752B00B02D69 /* UIScrollView+Rx.swift */,
|
||||
|
|
@ -3284,6 +3289,7 @@
|
|||
C882541F1B8A752B00B02D69 /* RxCollectionViewDelegateProxy.swift in Sources */,
|
||||
C88254201B8A752B00B02D69 /* RxScrollViewDelegateProxy.swift in Sources */,
|
||||
C882542E1B8A752B00B02D69 /* UILabel+Rx.swift in Sources */,
|
||||
91BE429C1CBF7EC000F6B062 /* UIPageControl+Rx.swift in Sources */,
|
||||
C88254211B8A752B00B02D69 /* RxSearchBarDelegateProxy.swift in Sources */,
|
||||
C80DDEA71BCE69BA006A1832 /* ObservableConvertibleType+Driver.swift in Sources */,
|
||||
7EDBAEBC1C89B9B7006CBE67 /* UITabBarItem+Rx.swift in Sources */,
|
||||
|
|
@ -4221,6 +4227,7 @@
|
|||
C8F0C0341BBBFBB9001B112F /* Logging.swift in Sources */,
|
||||
C8F0C0351BBBFBB9001B112F /* UICollectionView+Rx.swift in Sources */,
|
||||
C8F0C0361BBBFBB9001B112F /* RxCollectionViewDataSourceType.swift in Sources */,
|
||||
91BE429F1CBF7F3D00F6B062 /* UIPageControl+Rx.swift in Sources */,
|
||||
846436E61C9AF6670035B40D /* RxSearchControllerDelegateProxy.swift in Sources */,
|
||||
C8F0C0371BBBFBB9001B112F /* NSNotificationCenter+Rx.swift in Sources */,
|
||||
C8F0C0381BBBFBB9001B112F /* UITextField+Rx.swift in Sources */,
|
||||
|
|
@ -4313,6 +4320,7 @@
|
|||
D203C4FA1BB9C53700D02D00 /* RxCollectionViewDataSourceProxy.swift in Sources */,
|
||||
D2138C7F1BB9BEBE00339B5C /* _RX.m in Sources */,
|
||||
8479BC4D1C3ACF6E00FB8B54 /* UIImagePickerController+Rx.swift in Sources */,
|
||||
91BE429D1CBF7EC000F6B062 /* UIPageControl+Rx.swift in Sources */,
|
||||
D203C4FE1BB9C53700D02D00 /* RxTableViewDataSourceProxy.swift in Sources */,
|
||||
D203C5001BB9C53700D02D00 /* RxTextViewDelegateProxy.swift in Sources */,
|
||||
C8DB96851BF754C80084BD53 /* NSObject+Rx+KVORepresentable.swift in Sources */,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
//
|
||||
// UIPageControl+Rx.swift
|
||||
// Rx
|
||||
//
|
||||
// Created by Francesco Puntillo on 14/04/2016.
|
||||
// Copyright © 2016 Krunoslav Zaher. All rights reserved.
|
||||
//
|
||||
|
||||
#if os(iOS) || os(tvOS)
|
||||
|
||||
import Foundation
|
||||
#if !RX_NO_MODULE
|
||||
import RxSwift
|
||||
#endif
|
||||
import UIKit
|
||||
|
||||
extension UIPageControl {
|
||||
|
||||
/**
|
||||
Bindable sink for `currentPage` property.
|
||||
*/
|
||||
public var rx_currentPage: AnyObserver<Int> {
|
||||
return UIBindingObserver(UIElement: self) { controller, page in
|
||||
controller.currentPage = page
|
||||
}.asObserver()
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue