deal with osw profile selector table navigation bar

This commit is contained in:
True Zhuanjia
2026-03-12 18:10:39 +08:00
parent ed8bf5af9e
commit f8badd51c5
3 changed files with 26 additions and 2 deletions
+3 -2
View File
@@ -3171,7 +3171,7 @@
<constraint firstAttribute="height" constant="44" id="lQr-5u-g05"/>
</constraints>
<items>
<navigationItem title="Widget Profiles" id="Q2V-XF-4jq">
<navigationItem title="Widget Profiles" largeTitleDisplayMode="never" style="editor" id="Q2V-XF-4jq">
<leftBarButtonItems>
<barButtonItem title="ExportAll" width="70" style="plain" id="Bhn-IO-Wlt" userLabel="Export Data">
<connections>
@@ -3221,12 +3221,13 @@
<size key="freeformSize" width="1133" height="744"/>
<connections>
<outlet property="profileTableViewNavigationBar" destination="62V-DN-FUk" id="c3i-qa-4ix"/>
<outlet property="profileTableViewNavigationItem" destination="Q2V-XF-4jq" id="TmF-ZM-NKC"/>
<outlet property="tableView" destination="BA3-hd-bDp" id="Jzl-sP-ANp"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="K4u-Tz-tXU" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="3742" y="955"/>
<point key="canvasLocation" x="3712" y="958"/>
</scene>
</scenes>
<resources>
+5
View File
@@ -373,6 +373,11 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
[customToolbarView setItems:[NSArray arrayWithObjects:doneBarButton, windowsBarButton, escapeBarButton, tabBarButton, shiftBarButton, controlBarButton, altBarButton, deleteBarButton, flexibleSpace, nil]];
if (@available(iOS 26.0, *)) {
for(UIBarButtonItem *button in customToolbarView.items){
button.hidesSharedBackground = true;
}
}
keyInputField.inputAccessoryView = customToolbarView;
}
#endif
@@ -20,9 +20,11 @@
const double NAV_BAR_HEIGHT = 50;
@interface OSCProfilesTableViewController () <UIGestureRecognizerDelegate>
@property (weak, nonatomic) IBOutlet UINavigationItem *profileTableViewNavigationItem;
@end
@implementation OSCProfilesTableViewController {
OSCProfilesManager *profilesManager;
}
@@ -70,6 +72,11 @@ const double NAV_BAR_HEIGHT = 50;
self.profileTableViewNavigationBar.layer.masksToBounds = true; // 使圆角生效
self.profileTableViewNavigationBar.layer.mask = maskLayer;
if (GenericUtils.liquidGlassEnabled) {
if (@available(iOS 13.0, *)) {
self.profileTableViewNavigationBar.layer.backgroundColor = UIColor.systemFillColor.CGColor;
}
}
self.tableView.layer.cornerRadius = 15; // 设置圆角半径
self.tableView.layer.masksToBounds = true; // 使圆角生效
@@ -101,6 +108,17 @@ const double NAV_BAR_HEIGHT = 50;
tap.delegate = (id<UIGestureRecognizerDelegate>)self;
[self.view addGestureRecognizer:tap];
if(GenericUtils.liquidGlassEnabled){
if (@available(iOS 26.0, *)) {
for(UIBarButtonItem* button in self.profileTableViewNavigationItem.leftBarButtonItems){
button.hidesSharedBackground = true;
}
for(UIBarButtonItem* button in self.profileTableViewNavigationItem.rightBarButtonItems){
button.hidesSharedBackground = true;
}
}
}
}
- (void)dismissSelf {