Disable unnecessary UIAppearance hacks on iOS 16
This commit is contained in:
parent
01bb37b0f6
commit
f5ac2616ad
|
@ -110,11 +110,15 @@ struct ComposeAttachmentsList: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func didAppear() {
|
private func didAppear() {
|
||||||
|
if #available(iOS 16.0, *) {
|
||||||
|
// these appearance proxy hacks are no longer necessary
|
||||||
|
} else {
|
||||||
let proxy = UITableView.appearance(whenContainedInInstancesOf: [ComposeHostingController.self])
|
let proxy = UITableView.appearance(whenContainedInInstancesOf: [ComposeHostingController.self])
|
||||||
// enable drag and drop to reorder on iPhone
|
// enable drag and drop to reorder on iPhone
|
||||||
proxy.dragInteractionEnabled = true
|
proxy.dragInteractionEnabled = true
|
||||||
proxy.isScrollEnabled = false
|
proxy.isScrollEnabled = false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private func attachmentsChanged(attachments: [CompositionAttachment]) {
|
private func attachmentsChanged(attachments: [CompositionAttachment]) {
|
||||||
var copy = rowHeights
|
var copy = rowHeights
|
||||||
|
|
|
@ -46,8 +46,12 @@ struct OppositeCollapseKeywordsView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func updateAppearance() {
|
private func updateAppearance() {
|
||||||
|
if #available(iOS 16.0, *) {
|
||||||
|
// no longer necessary
|
||||||
|
} else {
|
||||||
UIScrollView.appearance(whenContainedInInstancesOf: [PreferencesNavigationController.self]).keyboardDismissMode = .interactive
|
UIScrollView.appearance(whenContainedInInstancesOf: [PreferencesNavigationController.self]).keyboardDismissMode = .interactive
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private func commitExisting(at index: Int) -> () -> Void {
|
private func commitExisting(at index: Int) -> () -> Void {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue