Fix an issue where buttons in text overlay toolbar could be too small.
The cause of this issue was that ImageEditorViewController's view was created with zero dimensions. Those dimensions were then used to pre-calculate size of the toolbar which ended up being incorrect. The fix is to let UIKit create the root view and move everything we did in `loadView` to `viewDidLoad`.
This commit is contained in:
parent
2a738fb459
commit
ee2f39d3d1
@ -234,10 +234,8 @@ class ImageEditorViewController: OWSViewController {
|
||||
model.add(observer: self)
|
||||
}
|
||||
|
||||
override func loadView() {
|
||||
view = UIView()
|
||||
override func viewDidLoad() {
|
||||
view.backgroundColor = .black
|
||||
view.isOpaque = true
|
||||
|
||||
imageEditorView.configureSubviews()
|
||||
view.addSubview(imageEditorView)
|
||||
@ -268,10 +266,6 @@ class ImageEditorViewController: OWSViewController {
|
||||
strokeWidthSliderPosition = strokeWidthSliderContainer.centerXAnchor.constraint(equalTo: view.leadingAnchor)
|
||||
strokeWidthSliderPosition?.autoInstall()
|
||||
strokeWidthSliderContainer.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(handleSliderContainerTap(_:))))
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
updateUIForCurrentMode()
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user