Swiftgram/AsyncDisplayKit/ASCellNode.h
2015-03-26 21:11:13 -07:00

46 lines
1.5 KiB
Objective-C

/* 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 <AsyncDisplayKit/ASDisplayNode.h>
/**
* Generic cell node. Subclass ASCellNode instead of <ASDisplayNode> to use <ASTableView>.
*/
@interface ASCellNode : ASDisplayNode
/*
* ASTableView uses these properties when configuring UITableViewCells that host ASCellNodes.
*/
//@property (atomic, retain) UIColor *backgroundColor;
@property (nonatomic) UITableViewCellSelectionStyle selectionStyle;
/*
* ASCellNode must forward touch events in order for UITableView and UICollectionView tap handling to work. Overriding
* these methods (e.g. for highlighting) requires the super method be called.
*/
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event ASDISPLAYNODE_REQUIRES_SUPER;
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event ASDISPLAYNODE_REQUIRES_SUPER;
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event ASDISPLAYNODE_REQUIRES_SUPER;
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event ASDISPLAYNODE_REQUIRES_SUPER;
@end
/**
* Simple label-style cell node. Read its source for an example of custom <ASCellNode>s.
*/
@interface ASTextCellNode : ASCellNode
/**
* Text to display.
*/
@property (nonatomic, copy) NSString *text;
@end