Fix toolbar issues

This commit is contained in:
Justin Mazzocchi 2021-01-18 21:16:21 -08:00
parent 32f557866a
commit 0f4c2f6d01
No known key found for this signature in database
GPG key ID: E223E6937AAFB01C

View file

@ -17,7 +17,10 @@ final class CompositionInputAccessoryView: UIToolbar {
self.viewModel = viewModel self.viewModel = viewModel
self.parentViewModel = parentViewModel self.parentViewModel = parentViewModel
super.init(frame: .zero) super.init(
frame: .init(
origin: .zero,
size: .init(width: UIScreen.main.bounds.width, height: .minimumButtonDimension)))
initialSetup() initialSetup()
} }
@ -31,6 +34,8 @@ final class CompositionInputAccessoryView: UIToolbar {
private extension CompositionInputAccessoryView { private extension CompositionInputAccessoryView {
// swiftlint:disable:next function_body_length // swiftlint:disable:next function_body_length
func initialSetup() { func initialSetup() {
autoresizingMask = .flexibleHeight
var attachmentActions = [ var attachmentActions = [
UIAction( UIAction(
title: NSLocalizedString("compose.browse", comment: ""), title: NSLocalizedString("compose.browse", comment: ""),