Skip to content

Commit

Permalink
Fixes warnings and errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
kzaher committed Oct 19, 2016
1 parent 10f82a0 commit 3f5886e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions RxCocoa/Common/TextInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ import Foundation
}
}

extension NSTextField : NSTextInput {

}

#endif


2 changes: 1 addition & 1 deletion RxCocoa/iOS/UIButton+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ extension Reactive where Base: UIButton {
/**
Reactive wrapper for `setTitle(_:controlState:)`
*/
public func title(controlState: UIControlState = []) -> UIBindingObserver<Base, String?> {
public func title(for controlState: UIControlState = []) -> UIBindingObserver<Base, String?> {
return UIBindingObserver<Base, String?>(UIElement: self.base) { (button, title) -> () in
button.setTitle(title, for: controlState)
}
Expand Down
2 changes: 1 addition & 1 deletion RxCocoa/iOS/UICollectionView+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ extension Reactive where Base: UICollectionView {
*/
public var didUpdateFocusInContextWithAnimationCoordinator: ControlEvent<(context: UIFocusUpdateContext, animationCoordinator: UIFocusAnimationCoordinator)> {

let source = delegate.observe(#selector(UICollectionViewDelegate.collectionView(_:didUpdateFocusIn:with:)))
let source = delegate.methodInvoked(#selector(UICollectionViewDelegate.collectionView(_:didUpdateFocusIn:with:)))
.map { a -> (context: UIFocusUpdateContext, animationCoordinator: UIFocusAnimationCoordinator) in
let context = a[1] as! UIFocusUpdateContext
let animationCoordinator = a[2] as! UIFocusAnimationCoordinator
Expand Down
2 changes: 1 addition & 1 deletion RxCocoa/iOS/UITableView+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ extension Reactive where Base: UITableView {
*/
public var didUpdateFocusInContextWithAnimationCoordinator: ControlEvent<(context: UIFocusUpdateContext, animationCoordinator: UIFocusAnimationCoordinator)> {

let source = delegate.observe(#selector(UITableViewDelegate.tableView(_:didUpdateFocusIn:with:)))
let source = delegate.methodInvoked(#selector(UITableViewDelegate.tableView(_:didUpdateFocusIn:with:)))
.map { a -> (context: UIFocusUpdateContext, animationCoordinator: UIFocusAnimationCoordinator) in
let context = a[1] as! UIFocusUpdateContext
let animationCoordinator = try castOrThrow(UIFocusAnimationCoordinator.self, a[2])
Expand Down
2 changes: 1 addition & 1 deletion Tests/RxCocoaTests/UITableView+RxTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ extension UITableViewTests {
let dataSource = TableViewDataSourceThatImplementsCommitForRowAt()
_ = tableView.rx.setDataSource(dataSource)

XCTAssertTrue((tableView.dataSource! as! UITableViewDataSource).responds(to: #selector(UITableViewDataSource.tableView(_:commit:forRowAt:))))
XCTAssertTrue((tableView.dataSource!).responds(to: #selector(UITableViewDataSource.tableView(_:commit:forRowAt:))))
}
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/RxSwiftTests/Observable+SingleTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ extension ObservableSingleTest {
var sum = 2 + 3 + 4 + 5
let res = scheduler.start { xs.do(onNext: { element in
i += 1
sum -= element ?? 0
sum -= element
})
}

Expand Down

0 comments on commit 3f5886e

Please sign in to comment.