Fix action sheet items update

This commit is contained in:
Ilya Laktyushin
2021-02-19 16:02:17 +04:00
parent 324f9d76a0
commit 5597eacb4e
37 changed files with 107 additions and 116 deletions

View File

@@ -22,6 +22,7 @@ public class ActionSheetTextItem: ActionSheetItem {
}
node.setItem(self)
node.requestLayoutUpdate()
}
}
@@ -65,8 +66,6 @@ public class ActionSheetTextNode: ActionSheetItemNode {
self.label.attributedText = NSAttributedString(string: item.title, font: defaultFont, textColor: self.theme.secondaryTextColor, paragraphAlignment: .center)
self.accessibilityArea.accessibilityLabel = item.title
self.setNeedsLayout()
}
public override func updateLayout(constrainedSize: CGSize, transition: ContainedViewLayoutTransition) -> CGSize {
@@ -77,7 +76,7 @@ public class ActionSheetTextNode: ActionSheetItemNode {
self.accessibilityArea.frame = CGRect(origin: CGPoint(), size: size)
self.updateInternalLayout(size)
self.updateInternalLayout(size, constrainedSize: constrainedSize)
return size
}
}