mirror of
https://github.com/ReactiveX/RxSwift.git
synced 2024-10-04 05:57:23 +03:00
Proofreading in comments by AppCode 'Typo' inspection
This commit is contained in:
parent
61058f7bd4
commit
5b37cac1e8
@ -572,7 +572,7 @@ textField.rx.text.orEmpty // <- now has type `ControlProperty<String>`
|
||||
```swift
|
||||
let text: Observable<String> = Observable.just("")
|
||||
|
||||
// Previously `map { $0 }` was needed because of mismatch betweeen sequence `String` type and `String?` type
|
||||
// Previously `map { $0 }` was needed because of mismatch between sequence `String` type and `String?` type
|
||||
// on binding `rx.text` observer.
|
||||
text.bindTo(label.rx.text)
|
||||
.disposed(by: disposeBag)
|
||||
|
@ -54,7 +54,7 @@ This is more or less how it works.
|
||||
+-------------------------------------------+
|
||||
|
||||
|
||||
Since RxCocoa needs to automagically create those Proxys and because views that have delegates can be hierarchical
|
||||
Since RxCocoa needs to automagically create those Proxies and because views that have delegates can be hierarchical
|
||||
|
||||
UITableView : UIScrollView : UIView
|
||||
|
||||
@ -324,7 +324,7 @@ extension DelegateProxyType where ParentObject: HasPrefetchDataSource, Self.Dele
|
||||
let proxy = DelegateProxy.proxy(for: object)
|
||||
let unregisterDelegate = DelegateProxy.installForwardDelegate(dataSource, retainDelegate: retainDataSource, onProxyForObject: object)
|
||||
|
||||
// Do not perform layoutIfNeeded if the object is still not in the view heirarchy
|
||||
// Do not perform layoutIfNeeded if the object is still not in the view hierarchy
|
||||
if object.window != nil {
|
||||
// this is needed to flush any delayed old state (https://github.com/RxSwiftCommunity/RxDataSources/pull/75)
|
||||
object.layoutIfNeeded()
|
||||
|
@ -20,7 +20,7 @@ public protocol ControlEventType : ObservableType {
|
||||
|
||||
Properties:
|
||||
|
||||
- it doesn’t send any initial value on subscription,
|
||||
- it doesn't send any initial value on subscription,
|
||||
- it `Complete`s the sequence when the control deallocates,
|
||||
- it never errors out
|
||||
- it delivers events on `MainScheduler.instance`.
|
||||
@ -30,9 +30,9 @@ public protocol ControlEventType : ObservableType {
|
||||
|
||||
**It is the implementor’s responsibility to make sure that all other properties enumerated above are satisfied.**
|
||||
|
||||
**If they aren’t, using this trait will communicate wrong properties, and could potentially break someone’s code.**
|
||||
**If they aren't, using this trait will communicate wrong properties, and could potentially break someone’s code.**
|
||||
|
||||
**If the `events` observable sequence passed into the initializer doesn’t satisfy all enumerated
|
||||
**If the `events` observable sequence passed into the initializer doesn't satisfy all enumerated
|
||||
properties, don’t use this trait.**
|
||||
*/
|
||||
public struct ControlEvent<PropertyType> : ControlEventType {
|
||||
|
@ -92,7 +92,7 @@ public struct ControlProperty<PropertyType> : ControlPropertyType {
|
||||
/// Binds event to user interface.
|
||||
///
|
||||
/// - In case next element is received, it is being set to control value.
|
||||
/// - In case error is received, DEBUG buids raise fatal error, RELEASE builds log event to standard output.
|
||||
/// - In case error is received, DEBUG builds raise fatal error, RELEASE builds log event to standard output.
|
||||
/// - In case sequence completes, nothing happens.
|
||||
public func on(_ event: Event<Element>) {
|
||||
switch event {
|
||||
|
@ -28,7 +28,7 @@
|
||||
super.init(parentObject: pickerView, delegateProxy: RxPickerViewDelegateProxy.self)
|
||||
}
|
||||
|
||||
// Register known implementationss
|
||||
// Register known implementations
|
||||
public static func registerKnownImplementations() {
|
||||
self.register { RxPickerViewDelegateProxy(pickerView: $0) }
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ extension Reactive where Base: UICollectionView {
|
||||
-> Disposable where DataSource.Element == Source.Element
|
||||
{
|
||||
return { source in
|
||||
// This is called for sideeffects only, and to make sure delegate proxy is in place when
|
||||
// This is called for side effects only, and to make sure delegate proxy is in place when
|
||||
// data source is being bound.
|
||||
// This is needed because theoretically the data source subscription itself might
|
||||
// call `self.rx.delegate`. If that happens, it might cause weird side effects since
|
||||
|
@ -112,7 +112,7 @@ extension Reactive where Base: UITableView {
|
||||
-> Disposable
|
||||
where DataSource.Element == Source.Element {
|
||||
return { source in
|
||||
// This is called for sideeffects only, and to make sure delegate proxy is in place when
|
||||
// This is called for side effects only, and to make sure delegate proxy is in place when
|
||||
// data source is being bound.
|
||||
// This is needed because theoretically the data source subscription itself might
|
||||
// call `self.rx.delegate`. If that happens, it might cause weird side effects since
|
||||
|
@ -25,7 +25,7 @@ extension Reactive where Base: UITextField {
|
||||
},
|
||||
setter: { textField, value in
|
||||
// This check is important because setting text value always clears control state
|
||||
// including marked text selection which is imporant for proper input
|
||||
// including marked text selection which is important for proper input
|
||||
// when IME input method is used.
|
||||
if textField.text != value {
|
||||
textField.text = value
|
||||
@ -42,7 +42,7 @@ extension Reactive where Base: UITextField {
|
||||
},
|
||||
setter: { textField, value in
|
||||
// This check is important because setting text value always clears control state
|
||||
// including marked text selection which is imporant for proper input
|
||||
// including marked text selection which is important for proper input
|
||||
// when IME input method is used.
|
||||
if textField.attributedText != value {
|
||||
textField.attributedText = value
|
||||
|
@ -42,7 +42,7 @@ extension Reactive where Base: UITextView {
|
||||
|
||||
let bindingObserver = Binder(self.base) { (textView, text: String?) in
|
||||
// This check is important because setting text value always clears control state
|
||||
// including marked text selection which is imporant for proper input
|
||||
// including marked text selection which is important for proper input
|
||||
// when IME input method is used.
|
||||
if textView.text != text {
|
||||
textView.text = text
|
||||
@ -78,7 +78,7 @@ extension Reactive where Base: UITextView {
|
||||
|
||||
let bindingObserver = Binder(self.base) { (textView, attributedText: NSAttributedString?) in
|
||||
// This check is important because setting text value always clears control state
|
||||
// including marked text selection which is imporant for proper input
|
||||
// including marked text selection which is important for proper input
|
||||
// when IME input method is used.
|
||||
if textView.attributedText != attributedText {
|
||||
textView.attributedText = attributedText
|
||||
|
@ -15,7 +15,7 @@ import RxCocoa
|
||||
|
||||
|
||||
/*
|
||||
This is commented becuse collection view has bugs when doing animated updates.
|
||||
This is commented because collection view has bugs when doing animated updates.
|
||||
Take a look at randomized sections.
|
||||
*/
|
||||
open class RxCollectionViewSectionedAnimatedDataSource<Section: AnimatableSectionModelType>
|
||||
|
@ -50,7 +50,7 @@ class RxExample_iOSTests
|
||||
// do.
|
||||
//
|
||||
// It's probably more suitable for some vital components of your system, but
|
||||
// the pricinciple is the same.
|
||||
// the principle is the same.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
func testGitHubSignup_vanillaObservables_1_testEnabledUserInterfaceElements() {
|
||||
let scheduler = TestScheduler(initialClock: 0, resolution: resolution, simulateProcessingDelay: false)
|
||||
|
@ -90,7 +90,7 @@ private extension ReusableView {
|
||||
if #available(iOS 10.0, *) {
|
||||
if OSApplication.isInUITest {
|
||||
// !!! on iOS 10 automation tests leak cells, 🍻 automation team
|
||||
// !!! fugly workaround
|
||||
// !!! ugly workaround
|
||||
// ... no, I'm not assuming prepareForReuse is always called before init, this is
|
||||
// just a workaround because that method already has cleanup logic :(
|
||||
// Remember that leaking UISwitch?
|
||||
|
@ -54,7 +54,7 @@ func <-> <Base>(textInput: TextInput<Base>, relay: BehaviorRelay<String>) -> Dis
|
||||
/**
|
||||
In some cases `textInput.textRangeFromPosition(start, toPosition: end)` will return nil even though the underlying
|
||||
value is not nil. This appears to be an Apple bug. If it's not, and we are doing something wrong, please let us know.
|
||||
The can be reproed easily if replace bottom code with
|
||||
The can be reproduced easily if replace bottom code with
|
||||
|
||||
if nonMarkedTextValue != relay.value {
|
||||
relay.accept(nonMarkedTextValue ?? "")
|
||||
|
@ -172,7 +172,7 @@ final private class RetryWhenSequenceSink<Sequence: Swift.Sequence, Observer: Ob
|
||||
}
|
||||
|
||||
override func extract(_ observable: Observable<Element>) -> SequenceGenerator? {
|
||||
// It is important to always return `nil` here because there are sideffects in the `run` method
|
||||
// It is important to always return `nil` here because there are side effects in the `run` method
|
||||
// that are dependant on particular `retryWhen` operator so single operator stack can't be reused in this
|
||||
// case.
|
||||
return nil
|
||||
|
@ -40,7 +40,7 @@ extension DispatchQueueConfiguration {
|
||||
|
||||
// TODO:
|
||||
// This looks horrible, and yes, it is.
|
||||
// It looks like Apple has made a conceputal change here, and I'm unsure why.
|
||||
// It looks like Apple has made a conceptual change here, and I'm unsure why.
|
||||
// Need more info on this.
|
||||
// It looks like just setting timer to fire and not holding a reference to it
|
||||
// until deadline causes timer cancellation.
|
||||
@ -74,7 +74,7 @@ extension DispatchQueueConfiguration {
|
||||
|
||||
// TODO:
|
||||
// This looks horrible, and yes, it is.
|
||||
// It looks like Apple has made a conceputal change here, and I'm unsure why.
|
||||
// It looks like Apple has made a conceptual change here, and I'm unsure why.
|
||||
// Need more info on this.
|
||||
// It looks like just setting timer to fire and not holding a reference to it
|
||||
// until deadline causes timer cancellation.
|
||||
|
@ -16,7 +16,7 @@ public extension ObservableConvertibleType {
|
||||
|
||||
/// Convert to an `Infallible`
|
||||
///
|
||||
/// - parameter onErroFallbackTo: Fall back to this provided infallible on error
|
||||
/// - parameter onErrorFallbackTo: Fall back to this provided infallible on error
|
||||
///
|
||||
///
|
||||
/// - returns: `Infallible<Element>`
|
||||
|
@ -116,7 +116,7 @@ public func XCTAssertEqual(_ lhs: [CompletableEvent], _ rhs: [CompletableEvent],
|
||||
/**
|
||||
Asserts two lists of Recorded events are equal.
|
||||
|
||||
Recorded events are equal if times are equal and recoreded events are equal.
|
||||
Recorded events are equal if times are equal and recorded events are equal.
|
||||
|
||||
Event is considered equal if:
|
||||
* `Next` events are equal if they have equal corresponding elements.
|
||||
@ -145,7 +145,7 @@ public func XCTAssertEqual<Element: Equatable>(_ lhs: [Recorded<Event<Element>>]
|
||||
/**
|
||||
Asserts two lists of Recorded events with optional elements are equal.
|
||||
|
||||
Recorded events are equal if times are equal and recoreded events are equal.
|
||||
Recorded events are equal if times are equal and recorded events are equal.
|
||||
|
||||
Event is considered equal if:
|
||||
* `Next` events are equal if they have equal corresponding elements.
|
||||
|
@ -798,7 +798,7 @@ extension KVOObservableTests {
|
||||
#endif
|
||||
|
||||
|
||||
// let's just check for one, otherones should have the same check
|
||||
// let's just check for one, other ones should have the same check
|
||||
func testObserve_ObserveCGRectForBiggerStructureDoesntCrashPropertyTypeReturnsNil() {
|
||||
var root: HasStrongProperty! = HasStrongProperty()
|
||||
|
||||
|
@ -30,7 +30,7 @@ struct RxObjCRuntimeChange {
|
||||
}
|
||||
|
||||
final class RxObjCRuntimeState {
|
||||
// total number of dynamically genertated classes
|
||||
// total number of dynamically generated classes
|
||||
let dynamicSublasses: Int
|
||||
// total number of classes that have swizzled forwarding mechanism
|
||||
let swizzledForwardClasses: Int
|
||||
|
Loading…
Reference in New Issue
Block a user