Swiftgram/AsyncDisplayKit/Private/ASControlTargetAction.h
Tamás Kárai ca203158da [ASControlNode] Invoke target actions in the same order as they were added (#2456)
* added control node test

* fix tests

* target action pair

* go back to class

* move ASControlTargetAction to Private

* added ASControlTarget to cimpole sources

* add ASControlTargetAction to framework target as well

* init local variables with nil

* removed comment with private Apple class name

* isEqual implementation for ASControlTargetAction

* eliminate retain cycle

* use ASControlTargetAction isEqual

* change to NSMutableOrderedSet

* Use OrderedSet and isEqual

* Use that NSMutableOrderedSet stored the same object only once

* Moving back to NSMutableArray

* minor improvements
2016-10-30 11:44:50 -07:00

34 lines
993 B
Objective-C

//
// ASControlTargetAction.h
// AsyncDisplayKit
//
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
//
#import <Foundation/Foundation.h>
/**
@abstract ASControlTargetAction stores target action pairs registered for specific ASControlNodeEvent values.
*/
@interface ASControlTargetAction : NSObject
/**
The action to be called on the registered target.
*/
@property (nonatomic, readwrite, assign) SEL action;
/**
Event handler target. The specified action will be called on this object.
*/
@property (nonatomic, readwrite, weak) id target;
/**
Indicated whether this target was created without a target, so the action should travel up in the responder chain.
*/
@property (nonatomic, readonly) BOOL createdWithNoTarget;
@end