File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ - (void)setSearchBarWithOptions:(NSString *)placeholder
5252 if (@available (iOS 13.0 , *)) {
5353 search.searchBar .searchTextField .backgroundColor = backgroundColor;
5454 }
55-
55+ # if __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000
5656 if (@available (iOS 26.0 , *)) {
5757 if (placement == SearchBarPlacementIntegrated) {
5858 if (focus) {
@@ -64,6 +64,7 @@ - (void)setSearchBarWithOptions:(NSString *)placeholder
6464 self.navigationItem .preferredSearchBarPlacement = UINavigationItemSearchBarPlacementStacked;
6565 }
6666 }
67+ #endif
6768
6869 self.navigationItem .searchController = search;
6970 [self .navigationItem setHidesSearchBarWhenScrolling: hideOnScroll];
@@ -79,6 +80,7 @@ - (void)setSearchBarWithOptions:(NSString *)placeholder
7980 });
8081 }
8182 } else {
83+ #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000
8284 // Update placement on existing searchController (iOS 26+)
8385 if (@available (iOS 26.0 , *)) {
8486 if (placement == SearchBarPlacementIntegrated) {
@@ -91,6 +93,7 @@ - (void)setSearchBarWithOptions:(NSString *)placeholder
9193 self.navigationItem .preferredSearchBarPlacement = UINavigationItemSearchBarPlacementStacked;
9294 }
9395 }
96+ #endif
9497 }
9598}
9699
You can’t perform that action at this time.
0 commit comments