Skip to content

Commit 2faddc6

Browse files
committed
iOS 7 Support.
1 parent c4b2fbc commit 2faddc6

File tree

80 files changed

+1293
-75
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1293
-75
lines changed

RxBlocking/RxBlocking.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
C8CDD79B1B52ADC00043F0C5 /* RxBlocking.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RxBlocking.h; sourceTree = "<group>"; };
2121
C8CDD7B71B52AEC70043F0C5 /* RxSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2222
C8CDD7C41B52AF290043F0C5 /* RxBlocking.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxBlocking.framework; sourceTree = BUILT_PRODUCTS_DIR; };
23-
C8CDD7CC1B52B1E80043F0C5 /* Observable+Blocking.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Observable+Blocking.swift"; sourceTree = "<group>"; };
23+
C8CDD7CC1B52B1E80043F0C5 /* Observable+Blocking.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = "Observable+Blocking.swift"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
2424
/* End PBXFileReference section */
2525

2626
/* Begin PBXFrameworksBuildPhase section */

RxBlocking/RxBlocking/Observable+Blocking.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import Foundation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113

1214
public func toArray<E>(source: Observable<E>)
1315
-> RxResult<[E]> {

RxCocoa/RxCocoa.xcodeproj/project.pbxproj

Lines changed: 51 additions & 51 deletions
Large diffs are not rendered by default.

RxCocoa/RxCocoa/Common/CLLocationManager+Rx.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import CoreLocation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113

1214

1315
extension CLLocationManager {

RxCocoa/RxCocoa/Common/DelegateProxy.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import Foundation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113

1214
var delegateAssociatedTag: UInt8 = 0
1315
var dataSourceAssociatedTag: UInt8 = 0

RxCocoa/RxCocoa/Common/DelegateProxyType.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import Foundation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113

1214
// `DelegateProxyType` protocol enables using both normal delegates and Rx observables with
1315
// views that can have only one delegate/datasource registered.

RxCocoa/RxCocoa/Common/Observables/Implementations/ControlTarget.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import Foundation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113

1214
#if os(iOS)
1315
import UIKit

RxCocoa/RxCocoa/Common/Observables/Implementations/KVOObservable.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import Foundation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113

1214
class KVOObservable<Element> : Producer<Element?>
1315
, KVOObservableProtocol {

RxCocoa/RxCocoa/Common/Observables/Implementations/KVOObserver.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import Foundation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113

1214
protocol KVOObservableProtocol {
1315
var target: AnyObject { get }

RxCocoa/RxCocoa/Common/Observables/NSNotificationCenter+Rx.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import Foundation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113

1214
extension NSNotificationCenter {
1315
public func rx_notification(name: String, object: AnyObject?) -> Observable<NSNotification> {

RxCocoa/RxCocoa/Common/Observables/NSObject+Rx+CoreGraphics.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import Foundation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113
import CoreGraphics
1214

1315
// rx_observe + CoreGraphics

RxCocoa/RxCocoa/Common/Observables/NSObject+Rx.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import Foundation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113

1214
#if !DISABLE_SWIZZLING
1315
var deallocatingSubjectTriggerContext: UInt8 = 0

RxCocoa/RxCocoa/Common/Observables/NSURLSession+Rx.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import Foundation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113

1214
func escapeTerminalString(value: String) -> String {
1315
return value.stringByReplacingOccurrencesOfString("\"", withString: "\\\"", options: NSStringCompareOptions.allZeros, range: nil)

RxCocoa/RxCocoa/Common/Proxies/RxCLLocationManagerDelegateProxy.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import CoreLocation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113

1214
class RxCLLocationManagerDelegateProxy : DelegateProxy
1315
, CLLocationManagerDelegate

RxCocoa/RxCocoa/Common/RxCocoa.swift

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import Foundation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113
#if os(iOS)
1214
import UIKit
1315
#endif
@@ -44,19 +46,10 @@ func rxError(errorCode: RxCocoaError, message: String, userInfo: NSDictionary) -
4446
return NSError(domain: RxCocoaErrorDomain, code: Int(errorCode.rawValue), userInfo: resultInfo)
4547
}
4648

47-
func removingObserverFailed() {
48-
rxFatalError("Removing observer for key failed")
49-
}
50-
5149
func handleVoidObserverResult(result: RxResult<Void>) {
5250
handleObserverResult(result)
5351
}
5452

55-
func rxFatalError(lastMessage: String) {
56-
// The temptation to comment this line is great, but please don't, it's for your own good. The choice is yours.
57-
fatalError(lastMessage)
58-
}
59-
6053
func bindingErrorToInterface(error: ErrorType) {
6154
#if DEBUG
6255
rxFatalError("Binding error to UI: \(error)")
@@ -74,11 +67,6 @@ func rxPossiblyFatalError(error: String) {
7467
#endif
7568
}
7669

77-
func rxFatalErrorAndDontReturn<T>(lastMessage: String) -> T {
78-
rxFatalError(lastMessage)
79-
return (nil as T!)!
80-
}
81-
8270
func rxAbstractMethodWithMessage<T>(message: String) -> T {
8371
return rxFatalErrorAndDontReturn(message)
8472
}
@@ -133,6 +121,18 @@ let delegateNotSet = "Delegate not set"
133121
// }
134122

135123

124+
func rxFatalErrorAndDontReturn<T>(lastMessage: String) -> T {
125+
rxFatalError(lastMessage)
126+
return (nil as T!)!
127+
}
128+
129+
#if !RX_NO_MODULE
130+
131+
func rxFatalError(lastMessage: String) {
132+
// The temptation to comment this line is great, but please don't, it's for your own good. The choice is yours.
133+
fatalError(lastMessage)
134+
}
135+
136136
extension NSObject {
137137
func rx_synchronized<T>(@noescape action: () -> T) -> T {
138138
objc_sync_enter(self)
@@ -141,3 +141,9 @@ extension NSObject {
141141
return result
142142
}
143143
}
144+
145+
func removingObserverFailed() {
146+
rxFatalError("Removing observer for key failed")
147+
}
148+
149+
#endif

RxCocoa/RxCocoa/Common/RxTarget.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import Foundation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113

1214
class RxTarget : NSObject
1315
, Disposable {

RxCocoa/RxCocoa/OSX/NSButton+Rx.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import Foundation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113
import Cocoa
1214

1315
extension NSButton {

RxCocoa/RxCocoa/OSX/NSControl+Rx.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
import Foundation
1010
import Cocoa
11+
#if !RX_NO_MODULE
1112
import RxSwift
13+
#endif
1214

1315
extension NSControl {
1416

RxCocoa/RxCocoa/OSX/NSImageView+Rx.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import Foundation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113
import Cocoa
1214

1315
extension NSImageView {

RxCocoa/RxCocoa/OSX/NSSlider+Rx.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import Foundation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113
import Cocoa
1214

1315
extension NSSlider {

RxCocoa/RxCocoa/OSX/NSTextField+Rx.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
import Foundation
1010
import Cocoa
11+
#if !RX_NO_MODULE
1112
import RxSwift
13+
#endif
1214

1315
class RxTextFieldDelegate : DelegateProxy
1416
, NSTextFieldDelegate

RxCocoa/RxCocoa/iOS/CoreDataEntityEvent.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
import Foundation
1010
import CoreData
11+
#if !RX_NO_MODULE
1112
import RxSwift
13+
#endif
1214

1315
enum CoreDataEntityEvent : Printable {
1416

RxCocoa/RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
import Foundation
1010
import UIKit
11+
#if !RX_NO_MODULE
1112
import RxSwift
13+
#endif
1214

1315
// objc monkey business
1416
class _RxCollectionViewReactiveArrayDataSource: NSObject, UICollectionViewDataSource {

RxCocoa/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
import Foundation
1010
import UIKit
11+
#if !RX_NO_MODULE
1112
import RxSwift
13+
#endif
1214

1315
// objc monkey business
1416
class _RxTableViewReactiveArrayDataSource: NSObject, UITableViewDataSource {

RxCocoa/RxCocoa/iOS/NSManagedObjectContext+Rx.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
import Foundation
1010
import CoreData
11+
#if !RX_NO_MODULE
1112
import RxSwift
13+
#endif
1214

1315
class FetchResultControllerSectionObserver: NSObject, NSFetchedResultsControllerDelegate, Disposable {
1416
typealias Observer = ObserverOf<[NSFetchedResultsSectionInfo]>

RxCocoa/RxCocoa/iOS/Protocols/RxCollectionViewDataSourceType.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
import Foundation
1010
import UIKit
11+
#if !RX_NO_MODULE
1112
import RxSwift
13+
#endif
1214

1315
// Please take a look at `DelegateProxyType.swift`
1416
public protocol RxCollectionViewDataSourceType /*: UICollectionViewDataSource*/ {

RxCocoa/RxCocoa/iOS/Protocols/RxTableViewDataSourceType.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
import Foundation
1010
import UIKit
11+
#if !RX_NO_MODULE
1112
import RxSwift
13+
#endif
1214

1315
// Please take a look at `DelegateProxyType.swift`
1416
public protocol RxTableViewDataSourceType /*: UITableViewDataSource*/ {

RxCocoa/RxCocoa/iOS/Proxies/RxActionSheetDelegateProxy.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import UIKit
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113

1214
class RxActionSheetDelegateProxy : DelegateProxy
1315
, UIActionSheetDelegate

RxCocoa/RxCocoa/iOS/Proxies/RxAlertViewDelegateProxy.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import UIKit
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113

1214
class RxAlertViewDelegateProxy : DelegateProxy
1315
, UIAlertViewDelegate

RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
import Foundation
1010
import UIKit
11+
#if !RX_NO_MODULE
1112
import RxSwift
13+
#endif
1214

1315
let collectionViewDataSourceNotSet = CollectionViewDataSourceNotSet()
1416

RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDelegateProxy.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
import Foundation
1010
import UIKit
11+
#if !RX_NO_MODULE
1112
import RxSwift
13+
#endif
1214

1315
// Please take a look at `DelegateProxyType.swift`
1416
class RxCollectionViewDelegateProxy : RxScrollViewDelegateProxy

RxCocoa/RxCocoa/iOS/Proxies/RxScrollViewDelegateProxy.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
//
88

99
import Foundation
10+
#if !RX_NO_MODULE
1011
import RxSwift
12+
#endif
1113
import UIKit
1214

1315
// Please take a look at `DelegateProxyType.swift`

RxCocoa/RxCocoa/iOS/Proxies/RxSearchBarDelegateProxy.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
import Foundation
1010
import UIKit
11+
#if !RX_NO_MODULE
1112
import RxSwift
13+
#endif
1214

1315
class RxSearchBarDelegateProxy : DelegateProxy
1416
, UISearchBarDelegate

RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
import Foundation
1010
import UIKit
11+
#if !RX_NO_MODULE
1112
import RxSwift
13+
#endif
1214

1315
let tableViewDataSourceNotSet = TableViewDataSourceNotSet()
1416

RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDelegateProxy.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
import Foundation
1010
import UIKit
11+
#if !RX_NO_MODULE
1112
import RxSwift
13+
#endif
1214

1315
// Please take a look at `DelegateProxyType.swift`
1416
class RxTableViewDelegateProxy : RxScrollViewDelegateProxy

0 commit comments

Comments
 (0)