diff --git a/CHANGELOG.md b/CHANGELOG.md index 140fcb916c..d389e0231b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## master * Add your own contributions to the next release on the line below this with your name. +- [ASCellNode] Adds mapping for UITableViewCell focusStyle [Alex Hill](https://github.com/alexhillc) [#727](https://github.com/TextureGroup/Texture/pull/727) - [ASNetworkImageNode] Fix capturing self in the block while loading image in ASNetworkImageNode. [Denis Mororozov](https://github.com/morozkin) [#777](https://github.com/TextureGroup/Texture/pull/777) - [ASTraitCollection] Add new properties of UITraitCollection to ASTraitCollection. [Yevgen Pogribnyi](https://github.com/ypogribnyi) - [ASRectMap] Replace implementation of ASRectTable with a simpler one based on unordered_map.[Scott Goodson](https://github.com/appleguy) [#719](https://github.com/TextureGroup/Texture/pull/719) diff --git a/Source/ASCellNode.h b/Source/ASCellNode.h index 2c911f17ae..b846e549d2 100644 --- a/Source/ASCellNode.h +++ b/Source/ASCellNode.h @@ -190,6 +190,12 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) { */ @property (nonatomic) UITableViewCellSelectionStyle selectionStyle; +/* @abstract The focus style when a cell is focused + * @default UITableViewCellFocusStyleDefault + * ASTableView uses these properties when configuring UITableViewCells that host ASCellNodes. + */ +@property (nonatomic) UITableViewCellFocusStyle focusStyle; + /* @abstract The view used as the background of the cell when it is selected. * ASTableView uses these properties when configuring UITableViewCells that host ASCellNodes. * ASCollectionView uses these properties when configuring UICollectionViewCells that host ASCellNodes. diff --git a/Source/ASCellNode.mm b/Source/ASCellNode.mm index a3816df182..cd3bed4476 100644 --- a/Source/ASCellNode.mm +++ b/Source/ASCellNode.mm @@ -58,6 +58,7 @@ // Use UITableViewCell defaults _selectionStyle = UITableViewCellSelectionStyleDefault; + _focusStyle = UITableViewCellFocusStyleDefault; self.clipsToBounds = YES; return self; diff --git a/Source/ASTableView.mm b/Source/ASTableView.mm index f78a688ea8..9e135d6ad9 100644 --- a/Source/ASTableView.mm +++ b/Source/ASTableView.mm @@ -114,10 +114,10 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; if (node) { self.backgroundColor = node.backgroundColor; - self.selectionStyle = node.selectionStyle; self.selectedBackgroundView = node.selectedBackgroundView; self.separatorInset = node.separatorInset; - self.selectionStyle = node.selectionStyle; + self.selectionStyle = node.selectionStyle; + self.focusStyle = node.focusStyle; self.accessoryType = node.accessoryType; // the following ensures that we clip the entire cell to it's bounds if node.clipsToBounds is set (the default)