Various fixes

This commit is contained in:
Ilya Laktyushin
2021-02-14 12:01:17 +04:00
parent f1d322a717
commit 3b155f9d52
32 changed files with 260 additions and 269 deletions

View File

@@ -150,10 +150,6 @@ private final class AutoremoveTimeoutSelectorItemNode: ActionSheetItemNode, UIPi
self.pickerView.selectRow(index, inComponent: 0, animated: false)
}
override func calculateSizeThatFits(_ constrainedSize: CGSize) -> CGSize {
return CGSize(width: constrainedSize.width, height: 180.0)
}
func numberOfComponents(in pickerView: UIPickerView) -> Int {
return 1
}
@@ -178,9 +174,12 @@ private final class AutoremoveTimeoutSelectorItemNode: ActionSheetItemNode, UIPi
self.valueChanged(self.timeoutValues[row])
}
override func layout() {
super.layout()
public override func updateLayout(constrainedSize: CGSize, transition: ContainedViewLayoutTransition) -> CGSize {
let size = CGSize(width: constrainedSize.width, height: 180.0)
self.pickerView.frame = CGRect(origin: CGPoint(), size: CGSize(width: self.bounds.size.width, height: 180.0))
self.pickerView.frame = CGRect(origin: CGPoint(), size: CGSize(width: size.width, height: 180.0))
self.updateInternalLayout(size)
return size
}
}