ASControlNode
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
/**
@abstract Kinds of events possible for control nodes.
@discussion These events are identical to their UIControl counterparts.
*/
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
};let node = ASControlNode()
node.addTarget(target: self, action: #selector(TODO:), for: .touchUpInside)let node = ASControlNode()
// negative -> 터치영역 증
node.hitTestSlop = .init(top: -100.0, left: -100.0, bottom: -100.0, right: -100.0)let node = ASControlNode()
// positive -> 터치영역 감소
node.hitTestSlop = .init(top: 10.0, left: 10.0, bottom: 10.0, right: 10.0)