You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<labelhidden="YES"opaque="NO"userInteractionEnabled="NO"contentMode="left"horizontalHuggingPriority="251"verticalHuggingPriority="251"text="Doing some work"textAlignment="natural"lineBreakMode="tailTruncation"baselineAdjustment="alignBaselines"adjustsFontSizeToFit="NO"translatesAutoresizingMaskIntoConstraints="NO"id="ulN-2s-mAd">
Copy file name to clipboardExpand all lines: Readme.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,12 @@ button.rx_action = action
56
56
57
57
Now when the button is pressed, the action is executed. The button's `enabled` state is bound to the action's `enabled` property. That means you can feed your form-validation logic into the action as a signal, and your button's enabled state is handled for you. Also, the user can't press the button again before the action is done executing, since it only handles one thing at a time. Cool.
58
58
59
+
There's also a really cool extension on `UIAlertAction`, used by [`UIAlertController`](http://ashfurrow.com/blog/uialertviewcontroller-example/). One catch: because of the limitations of that class, you can't instantiate it with the normal initializer. Instead, call this class method:
60
+
61
+
```swift
62
+
let action = UIAlertAction.Action("Hi", style: .Default)
63
+
```
64
+
59
65
**NOTE**: Due to a temporary issue with RxSwift, there's a [slight issue](https://github.com/ashfurrow/Action/issues/3) that shouldn't affect you, but might. Who knows!
0 commit comments