{{ message }}
Repository navigation
Fix issues #2009 - #2010
Open
CainLuo wants to merge 1 commit into
Open
Fix issues #2009#2010CainLuo wants to merge 1 commit into
CainLuo wants to merge 1 commit into
Conversation
[bug] ASCellNode has no background color in iOS 13
Author
|
Regarding the above issue, I found the specific problem, in the - (void)setElement:(ASCollectionElement *)element method of the ASTableView.mm file, the backgroundColor of node is used to set the _ ASTableViewCell's backgroundColor, I think this is incorrect, because node's backgroundColor should not be used to set as _ASTableViewCell's backgroundColor, but to open a separate property value of color to set separately. The temporary solution is to comment out self.backgroundColor = node.backgroundColor; and hope that it can be solved in subsequent versions of Texture. #2010 Before: No cellBackgroundColor propertyAfterASCellNode.h add cellBackgroundColor /* @abstract The inset of the cell background color
* ASTableView uses these properties when configuring UITableViewCells that host ASCellNodes.
*/
@property UIColor *cellBackgroundColor;ASTableNode.mm update setElement method: - (void)setElement:(ASCollectionElement *)element
{
_element = element;
ASCellNode *node = element.node;
if (node) {
if (node.cellBackgroundColor != nil) {
self.backgroundColor = node.cellBackgroundColor;
}
if (node.selectedBackgroundView != nil) {
self.selectedBackgroundView = node.selectedBackgroundView;
}
#if TARGET_OS_IOS
self.separatorInset = node.separatorInset;
#endif
self.selectionStyle = node.selectionStyle;
self.focusStyle = node.focusStyle;
self.accessoryType = node.accessoryType;
if (node.tintColor != nil) {
self.tintColor = node.tintColor;
}
// the following ensures that we clip the entire cell to it's bounds if node.clipsToBounds is set (the default)
// This is actually a workaround for a bug we are seeing in some rare cases (selected background view
// overlaps other cells if size of ASCellNode has changed.)
self.clipsToBounds = node.clipsToBounds;
}
[node __setSelectedFromUIKit:self.selected];
[node __setHighlightedFromUIKit:self.highlighted];
} |
Author
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

[bug] ASCellNode has no background color in iOS 13