Fix live text button being behind edit attachment description text view
This commit is contained in:
parent
370b589a6b
commit
86e1403230
@ -76,6 +76,16 @@ class AttachmentWrapperGalleryContentViewController: UIViewController, GalleryCo
|
||||
if !visible {
|
||||
editDescriptionViewController.textView?.resignFirstResponder()
|
||||
}
|
||||
if #available(iOS 16.0, macCatalyst 17.0, *),
|
||||
let wrapped = wrapped as? ImageGalleryContentViewController,
|
||||
let interaction = wrapped.analysisInteraction {
|
||||
if visible {
|
||||
let bottom = editDescriptionViewController.view.bounds.height - editDescriptionViewController.view.keyboardLayoutGuide.layoutFrame.height
|
||||
interaction.supplementaryInterfaceContentInsets = UIEdgeInsets(top: 0, left: 0, bottom: bottom, right: 0)
|
||||
} else {
|
||||
interaction.supplementaryInterfaceContentInsets = .zero
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func galleryContentDidAppear() {
|
||||
|
@ -25,7 +25,7 @@ open class ImageGalleryContentViewController: UIViewController, GalleryContentVi
|
||||
private static let analyzer = ImageAnalyzer()
|
||||
private var _analysisInteraction: AnyObject?
|
||||
@available(iOS 16.0, macCatalyst 17.0, *)
|
||||
private var analysisInteraction: ImageAnalysisInteraction? { _analysisInteraction as? ImageAnalysisInteraction }
|
||||
public var analysisInteraction: ImageAnalysisInteraction? { _analysisInteraction as? ImageAnalysisInteraction }
|
||||
|
||||
public init(image: UIImage, caption: String?, gifController: GIFController?) {
|
||||
self.caption = caption
|
||||
|
Loading…
x
Reference in New Issue
Block a user