mirror of
https://github.com/Finb/Bark.git
synced 2025-12-08 21:36:01 +00:00
iOS26适配
This commit is contained in:
parent
3b63fe3045
commit
8fca7486df
2
.github/workflows/testflight.yaml
vendored
2
.github/workflows/testflight.yaml
vendored
@ -14,7 +14,7 @@ on:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-26
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
@ -27,6 +27,11 @@ class MessageSettingsViewController: BaseViewController<MessageSettingsViewModel
|
||||
tableView.register(SpacerCell.self, forCellReuseIdentifier: "\(SpacerCell.self)")
|
||||
tableView.register(DonateCell.self, forCellReuseIdentifier: "\(DonateCell.self)")
|
||||
|
||||
if #available(iOS 26.0, *) {
|
||||
// iOS26 修改的圆角,将其改回
|
||||
tableView.setValue(10, forKeyPath: "sectionCornerRadius")
|
||||
}
|
||||
|
||||
tableView.estimatedSectionHeaderHeight = 10
|
||||
tableView.sectionHeaderHeight = UITableView.automaticDimension
|
||||
|
||||
|
||||
70
Podfile.lock
70
Podfile.lock
@ -6,28 +6,26 @@ PODS:
|
||||
- DropDown (2.3.13)
|
||||
- FDFullscreenPopGesture (1.1)
|
||||
- ImageViewer.swift (3.3.8)
|
||||
- IQKeyboardCore (1.0.7)
|
||||
- IQKeyboardManagerSwift/Core (8.0.0):
|
||||
- IQKeyboardCore (1.0.8)
|
||||
- IQKeyboardManagerSwift/Core (8.0.1):
|
||||
- IQKeyboardNotification
|
||||
- IQTextInputViewNotification
|
||||
- IQKeyboardManagerSwift/IQKeyboardToolbarManager (8.0.0):
|
||||
- IQKeyboardManagerSwift/IQKeyboardToolbarManager (8.0.1):
|
||||
- IQKeyboardManagerSwift/Core
|
||||
- IQKeyboardToolbarManager
|
||||
- IQKeyboardNotification (1.0.3)
|
||||
- IQKeyboardToolbar (1.1.1):
|
||||
- IQKeyboardCore
|
||||
- IQKeyboardToolbar/Core (= 1.1.1)
|
||||
- IQKeyboardToolbar/Core (1.1.1):
|
||||
- IQKeyboardNotification (1.0.6)
|
||||
- IQKeyboardToolbar (1.1.2):
|
||||
- IQKeyboardToolbar/Core (= 1.1.2)
|
||||
- IQKeyboardToolbar/Core (1.1.2):
|
||||
- IQKeyboardCore
|
||||
- IQKeyboardToolbar/Placeholderable
|
||||
- IQKeyboardToolbar/Placeholderable (1.1.1):
|
||||
- IQKeyboardCore
|
||||
- IQKeyboardToolbarManager (1.1.2):
|
||||
- IQKeyboardToolbar/Placeholderable (1.1.2)
|
||||
- IQKeyboardToolbarManager (1.1.4):
|
||||
- IQKeyboardToolbar
|
||||
- IQTextInputViewNotification
|
||||
- IQTextInputViewNotification (1.0.8):
|
||||
- IQTextInputViewNotification (1.0.9):
|
||||
- IQKeyboardCore
|
||||
- Kingfisher (8.1.3)
|
||||
- Kingfisher (8.6.0)
|
||||
- Material (3.1.8):
|
||||
- Material/Core (= 3.1.8)
|
||||
- Material/Core (3.1.8):
|
||||
@ -45,14 +43,14 @@ PODS:
|
||||
- "NSObject+Rx (5.2.2)":
|
||||
- RxSwift (~> 6.2)
|
||||
- ObjectMapper (4.4.2)
|
||||
- Realm (20.0.1):
|
||||
- Realm/Headers (= 20.0.1)
|
||||
- Realm/Headers (20.0.1)
|
||||
- RealmSwift (20.0.1):
|
||||
- Realm (= 20.0.1)
|
||||
- RxCocoa (6.8.0):
|
||||
- RxRelay (= 6.8.0)
|
||||
- RxSwift (= 6.8.0)
|
||||
- Realm (20.0.3):
|
||||
- Realm/Headers (= 20.0.3)
|
||||
- Realm/Headers (20.0.3)
|
||||
- RealmSwift (20.0.3):
|
||||
- Realm (= 20.0.3)
|
||||
- RxCocoa (6.9.0):
|
||||
- RxRelay (= 6.9.0)
|
||||
- RxSwift (= 6.9.0)
|
||||
- RxDataSources (5.0.0):
|
||||
- Differentiator (~> 5.0)
|
||||
- RxCocoa (~> 6.0)
|
||||
@ -60,9 +58,9 @@ PODS:
|
||||
- RxGesture (4.0.4):
|
||||
- RxCocoa (~> 6.0)
|
||||
- RxSwift (~> 6.0)
|
||||
- RxRelay (6.8.0):
|
||||
- RxSwift (= 6.8.0)
|
||||
- RxSwift (6.8.0)
|
||||
- RxRelay (6.9.0):
|
||||
- RxSwift (= 6.9.0)
|
||||
- RxSwift (6.9.0)
|
||||
- SnapKit (5.7.1)
|
||||
- SVProgressHUD (2.3.1):
|
||||
- SVProgressHUD/Core (= 2.3.1)
|
||||
@ -145,13 +143,13 @@ SPEC CHECKSUMS:
|
||||
DropDown: 8a2116376c1981888557f72ec2ffc9a5e0e456ec
|
||||
FDFullscreenPopGesture: a8a620179e3d9c40e8e00256dcee1c1a27c6d0f0
|
||||
ImageViewer.swift: 284cd8127d31af8e5938674fb9f8e695a4cdf6c6
|
||||
IQKeyboardCore: cb7f0a9a17dd32599569f2f478c1418dc28bcebb
|
||||
IQKeyboardManagerSwift: 0c6fbbaa2e60739e48d7cf59f25661471a7a3a65
|
||||
IQKeyboardNotification: d7382c4466c5a5adef92c7452ebf861b36050088
|
||||
IQKeyboardToolbar: d4bdccfb78324aec2f3920659c77bb89acd33312
|
||||
IQKeyboardToolbarManager: 6f4072ac620c2572d4af8c09f42a801f3e4909f7
|
||||
IQTextInputViewNotification: f5e954d8881fd9808b744e49e024cc0d4bcfe572
|
||||
Kingfisher: f2af9028b16baf9dc6c07c570072bc41cbf009ef
|
||||
IQKeyboardCore: 8652977ec919cf5351aa2977fedd1a6546476fbc
|
||||
IQKeyboardManagerSwift: 835fc9c6e4732398113406d84900ad2e8f141218
|
||||
IQKeyboardNotification: eb4910401f5a0e68f97e71c62f8a0c5b7e9d535c
|
||||
IQKeyboardToolbar: a8aab764a27d55892b951e58ebfffdde14a01ce8
|
||||
IQKeyboardToolbarManager: c8a575e8b5fffe5873d0e75312244498a0759473
|
||||
IQTextInputViewNotification: 3b9fb27a16e7ee8958cc9092cfb07a1a9e1fd559
|
||||
Kingfisher: 64278f126a815d0e2d391cdf71311b85882c4de0
|
||||
Material: a2a3f400a3b549d53ef89e56c58c4535b29db387
|
||||
MercariQRScanner: cd024685242f78fe40879cca9734bb7bb2fceb93
|
||||
MJRefresh: ff9e531227924c84ce459338414550a05d2aea78
|
||||
@ -159,13 +157,13 @@ SPEC CHECKSUMS:
|
||||
Moya: 138f0573e53411fb3dc17016add0b748dfbd78ee
|
||||
"NSObject+Rx": 61cf1f7306a73dcef8b36649198af0813ec18dfd
|
||||
ObjectMapper: e6e4d91ff7f2861df7aecc536c92d8363f4c9677
|
||||
Realm: 9572204903ef28caeb3c03bb30c1147f354ee3e7
|
||||
RealmSwift: d230b44017a55a1ba97de6a944da1fe3bedb92b5
|
||||
RxCocoa: 2d33c1e1e5d66492052ad46b11024ae287572880
|
||||
Realm: 853e5089d6042dff807bda000277eadfe2da93d2
|
||||
RealmSwift: f33c19577cefcbf681345d721fcbc7b42be4c949
|
||||
RxCocoa: ac16414696ae706516be3e1ab00fcce5bdc9be8a
|
||||
RxDataSources: aa47cc1ed6c500fa0dfecac5c979b723542d79cf
|
||||
RxGesture: f3efb47ed2d26a8082f7b660d4a59970e275a7f8
|
||||
RxRelay: 335c78b926a2aea8d863a6d25f1ed3b5ad8e8705
|
||||
RxSwift: 4e28be97cbcfeee614af26d83415febbf2bf6f45
|
||||
RxRelay: 6b0c930e5cef57d5fe2032571e5e65b78e3cbdb1
|
||||
RxSwift: 31649ace6aceeb422e16ff71c60804f9c3281ed9
|
||||
SnapKit: d612e99e678a2d3b95bf60b0705ed0a35c03484a
|
||||
SVProgressHUD: 4837c74bdfe2e51e8821c397825996a8d7de6e22
|
||||
SwiftyJSON: f5b1bf1cd8dd53cd25887ac0eabcfd92301c6a5a
|
||||
|
||||
@ -28,14 +28,24 @@ extension UINavigationItem {
|
||||
}
|
||||
|
||||
func setBarButtonItems(items: [UIBarButtonItem], position: UINavigationItemPosition) {
|
||||
if #available(iOS 26.0, *) {
|
||||
// iOS 26 之后的版本,不再微调间距
|
||||
if position == .left {
|
||||
self.leftBarButtonItems = items
|
||||
} else {
|
||||
self.rightBarButtonItems = items
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
guard items.count > 0 else {
|
||||
self.leftBarButtonItems = nil
|
||||
return
|
||||
}
|
||||
var buttonItems = items
|
||||
if #available(iOS 11.0, *) {
|
||||
buttonItems.forEach { item in
|
||||
guard let view = item.customView else { return }
|
||||
for item in buttonItems {
|
||||
guard let view = item.customView else { continue }
|
||||
item.customView?.translatesAutoresizingMaskIntoConstraints = false
|
||||
(item.customView as? HitTestSlopable)?.hitTestSlop = UIEdgeInsets(top: -10, left: -10, bottom: -10, right: -10)
|
||||
(item.customView as? AlignmentRectInsetsOverridable)?.alignmentRectInsetsOverride = UIEdgeInsets(top: 0, left: position == .left ? 8 : -8, bottom: 0, right: position == .left ? -8 : 8)
|
||||
@ -45,16 +55,14 @@ extension UINavigationItem {
|
||||
}
|
||||
}
|
||||
buttonItems.insert(UIBarButtonItem(barButtonSystemItem: .fixedSpace, target: nil, action: nil), at: 0)
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
let spacer = UIBarButtonItem(barButtonSystemItem: .fixedSpace, target: nil, action: nil)
|
||||
spacer.width = -8
|
||||
buttonItems.insert(spacer, at: 0)
|
||||
}
|
||||
if position == .left {
|
||||
self.leftBarButtonItems = buttonItems
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
self.rightBarButtonItems = buttonItems
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user