Latest0.1.0
Homepagehttps://github.com/ashfurrow/RACAlertAction
LicenseMIT
Platformsios 8.0, requires ARC
DependenciesReactiveCocoa
FrameworksFoundation, UIKit
Authors

UIAlertAction subclass with support for ReactiveCocoa.

Purpose

iOS 8 introduced UIAlertController, an abstraction above and replacement
for UIAlertView. UIAlertController uses UIAlertAction instances
to represent buttons (and actions for those buttons). But the interface
doesn’t lend itself to naturally fit in the ReactiveCocoa world

Instead, we need to subclass it to ensure that certain things are set
at initialization time. That’s what this library does.

Installation

Installation is easy via CocoaPods. In your Podfile:

pod 'RACAlertAction'

If you want a specific version of ReactiveCocoa, specify it on a separate line. pod install, then import the library via #import <RACAlertAction/RACAlertAction.h> or @import RACAlertAction; if you’re using frameworks.

Usage

Usage is pretty straightforward.

UIAlertController *alertController = ... // Set up your controller as you would normally.

// Create, then add the action
RACAlertAction *alertAction = [RACAlertAction actionWithTitle:/* your title */ style:/* whatever style */];
[alertController addAction:alertAction];

alertAction.command = ... // Whatever RACCommand that represents your unit of work.

The action’s enabled property will be automatically bound to the enabled signal of its rac_command.

Latest podspec

{
    "name": "RACAlertAction",
    "version": "0.1.0",
    "summary": "UIAlertAction subclass with support for ReactiveCocoa",
    "description": "                   iOS 8 introduced `UIAlertController`, an abstraction above and replacementn                   for `UIAlertView`. `UIAlertController` uses `UIAlertAction` instancesn                   to represent buttons (and actions for those buttons). But the interfacen                   doesn't lend itself to naturally fit in the ReactiveCocoa worldnn                   Instead, we need to subclass it to ensure that certain things are setn                   at initialization time. That's what this library does.n",
    "homepage": "https://github.com/ashfurrow/RACAlertAction",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Ash Furrow": "[email protected]"
    },
    "social_media_url": "http://twitter.com/ashfurrow",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/ashfurrow/RACAlertAction.git",
        "tag": "0.1.0"
    },
    "source_files": "RACAlertAction.{h,m}",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "requires_arc": true,
    "dependencies": {
        "ReactiveCocoa": []
    }
}

Pin It on Pinterest

Share This