Update to Swift 3.0 and RAC 5.0, remove UI Extensions #159
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of sorry that theres so much in this one Pull Request at once.
I tried to separate these out, but it is all intertwined, Swift 3.0 required RAC 5.0, and then converting all those methods that would be removed in the next step anyway seemed like unnecessary work.
Open Question
Theres two
RACSignal
extensions:RACSignal.rex_toSignal()
RACSignal.rex_toTriggerSignal()
For now I was hesitant to require
ReactiveObjC
/ReactiveObjCBridge
just for those two extensions...ReactiveObjCBridge
only contains atoSignalProducer
and notoSignal
. Either we could addtoSignal
to the bridge as well, or just remove this conversion?rex_toTriggerSignal
was mostly used internally to convert userac_willDealloc
as a trigger, which now is not necessary anymore withLifetime
.Complete List of Removals
Those are all documented in
Deprecations+Removals.swift
, but this list here could also be used in the change log for the next release.Removals
RAC Extensions
Action.rex_enabledProducer
. UseAction.reactive.isEnabled
instead.Action.rex_executingProducer
. UseAction.reacitve.isExecuting
instead.Foundation Extensions
NSObject.rex_producerForKeyPath
. UseNSObject.reactive.values(forKeyPath:)
instead.NSObject.rex_willDealloc
. UseNSObject.reactive.lifetime.ended
instead.UIKit Extensions
Reusable
protocol, useReusable
protocol from RAC insteadUITableViewCell.rex_prepareForReuse
. UseUITableViewCell.reactive.prepareForReuse
instead.UITableViewHeaderFooterCell.rex_prepareForReuse
. UseUITableViewHeaderFooterCell.reactive.prepareForReuse
instead.UICollectionReusableView.rex_prepareForReuse
. UseUICollectionReusableView.reactive.prepareForReuse
instead.UIControl.rex_enabled
. UseUIControl.reactive.isEnabled
insteadUIControl.rex_selected
. UseUIControl.reactive.isSelected
insteadUIControl.rex_highlighted
. UseUIControl.reactive.isHighlighted
insteadUIActivityIndicatorView.rex_animating
. UseUIActivityIndicatorView.reactive.isAnimating
instead.UIBarButtonItem.rex_action
. UseUIBarButtonItem.reactive.pressed
instead.UIBarItem.rex_enabled
. UseUIBarItem.reactive.isEnabled
instead.UIButton.rex_pressed
. UseUIButton.reactive.pressed
instead.UIButton.rex_title
. UseUIButton.reactive.title
instead.UIDatePicker
. useUIDatePicker.reactive.date
orUIDatePicker.reactive.dates
instead.UIImageView.rex_image
. UseUIImageView.reactive.image
instead.UIImageView.rex_highlightedImage
. UseUIImageView.reactive.highlightedImage
instead.UILabel.rex_text
. UseUILabe.reactive.text
instead.UILabel.rex_attributedText
. UseUILabe.reactive.attributedText
instead.UILabel.rex_textColor
. UseUILabe.reactive.textColor
instead.UIProgressView.rex_progress
. UseUIProgressView.reactive.progress
instead.UISegmentedControl.rex_selectedSegmentIndex
. UseUISegmentedControl.reactive.segmentedSegmentIndexes
orUISegmentedControl.reactive.segmentedSegmentIndex
instead.UISwitch.rex_on
. UseUISwitch.reactive.isOn
orUISwitch.reactive.isOnValues
instead.UITextField.rex_text
. UseUITextField.reactive.text
,UITextField.reactive.textValues
orUITextField.reactive.continuousTextValues
instead.UITextView.rex_text
. UseUITextView.reactive.text
,UITextView.reactive.textValues
orUITextView.reactive.continuousTextValues
instead.UIView.rex_alpha
. UseUIView.reactive.alpha
instead.UIView.rex_hidden
. UseUIView.reactive.isHidden
instead.UIView.rex_userInteractionEnabled
. UseUIView.reactive.isUserInteractionEnabled
instead.AppKit Extensions
NSTextField.rex_textSignal
. UseNSTextField.reactive.continuousStringValues
instead.Tests
I've kept all the UIKit and AppKit Tests around, but converted them to use the
reactive
extensions. I've converted them almost completely via quick-fixes to verify that the replacements inDeprecations+Removals.swift
work correctly.