Latest 0.1.0
Homepage https://github.com/Geektree0101/RxASControlEvent
License APACHE
Platforms ios 9.3
Dependencies RxSwift, RxCocoa, Texture
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

    let button = ASButtonNode()

    button.rx.event(.touchUpInside).subscribe(onNext: { _ in
        print("Touch up inside")
    }).disposed(by: disposeBag)

    button.rx.event(.touchUpOutside).subscribe(onNext: { _ in
        print("Touch up outside")
    }).disposed(by: disposeBag)

    button.rx.event(TOUCH_EVENT_TYPE).subscribe(onNext: { BUTTON_NODE in
        // TODO:
    }).disposed(by: disposeBag)

    let text = ASTextNode()

    text.rx.event(.allEvents).subscribe(onNext: { _ in
        print("Also, TextNode can do it!")
    }).disposed(by: disposeBag)

BUTTON_NODE is ASButtonNode

TOUCH_EVENT_TYPE

        typedef NS_OPTIONS(NSUInteger, ASControlNodeEvent)
        {
            /** A touch-down event in the control node. */
            ASControlNodeEventTouchDown         = 1 << 0,
            /** A repeated touch-down event in the control node; for this event the value of the UITouch tapCount method is greater than one. */
            ASControlNodeEventTouchDownRepeat   = 1 << 1,
            /** An event where a finger is dragged inside the bounds of the control node. */
            ASControlNodeEventTouchDragInside   = 1 << 2,
            /** An event where a finger is dragged just outside the bounds of the control. */
            ASControlNodeEventTouchDragOutside  = 1 << 3,
            /** A touch-up event in the control node where the finger is inside the bounds of the node. */
            ASControlNodeEventTouchUpInside     = 1 << 4,
            /** A touch-up event in the control node where the finger is outside the bounds of the node. */
            ASControlNodeEventTouchUpOutside    = 1 << 5,
            /** A system event canceling the current touches for the control node. */
            ASControlNodeEventTouchCancel       = 1 << 6,
            /** A system event triggered when controls like switches, slides, etc change state. */
            ASControlNodeEventValueChanged      = 1 << 12,
            /** A system event when the Play/Pause button on the Apple TV remote is pressed. */
            ASControlNodeEventPrimaryActionTriggered = 1 << 13,

            /** All events, including system events. */
            ASControlNodeEventAllEvents         = 0xFFFFFFFF
        };

Requirements

Installation

RxASControlEvent is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'RxASControlEvent'

Author

Geektree0101, [email protected]

License

RxASControlEvent is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "RxASControlEvent",
    "version": "0.1.0",
    "summary": "Texture(Async Display Kit) ControlEvent Reactive wrapper.",
    "description": "Texture(Async Display Kit) ControlEvent Reactive Wrapper",
    "homepage": "https://github.com/Geektree0101/RxASControlEvent",
    "license": {
        "type": "APACHE",
        "file": "LICENSE"
    },
    "authors": {
        "Geektree0101": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Geektree0101/RxASControlEvent.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "9.3"
    },
    "source_files": "RxASControlEvent/Classes/**/*",
    "dependencies": {
        "RxSwift": [
            "~> 4.0"
        ],
        "RxCocoa": [
            "~> 4.0"
        ],
        "Texture": []
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This