Swiftgram/AsyncDisplayKit/ASCellNode.h
Nadine Salter a3e78d1cee Support background colour and selection style on ASCellNodes.
Most UITableViewCell properties aren't useful in conjunction with
ASCellNode -- the system's UIView properties are unsupported for
performance reasons, and properties that configure them (e.g., content
indentation) don't affect custom node hierarchies.  This patch adds
support to _ASTableViewCell for the properties that *are* useful.

r=scottg
2014-11-03 17:45:40 -08:00

36 lines
936 B
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;
@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