All Projects → Geri-Borbas → Ios.blog.swiftui_search_bar_in_navigation_bar

Geri-Borbas / Ios.blog.swiftui_search_bar_in_navigation_bar

🔍 SwiftUI search bar in the navigation bar.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Ios.blog.swiftui search bar in navigation bar

Evncustomsearchbar
🔍Born for iOS 11 and iPhone X SearchBar
Stars: ✭ 52 (-58.06%)
Mutual labels:  navigationbar, searchbar
Tlyshynavbar
Unlike all those arrogant UINavigationBar, this one is shy and humble! Easily create auto-scrolling navigation bars!
Stars: ✭ 3,780 (+2948.39%)
Mutual labels:  uikit, navigationbar
Pilot
Cross-platform MVVM in Swift
Stars: ✭ 103 (-16.94%)
Mutual labels:  uikit
Movieflex ios
iOS application for Movie / Actor information with clean / intuitive UI and MVVM architecture.
Stars: ✭ 119 (-4.03%)
Mutual labels:  uikit
Vuikit
A responsive Vue UI library for web site interfaces
Stars: ✭ 1,479 (+1092.74%)
Mutual labels:  uikit
Aiolos
A floating panel for your iOS Apps
Stars: ✭ 1,544 (+1145.16%)
Mutual labels:  uikit
Vue Notus
Vue Notus: Free Tailwind CSS UI Kit and Admin
Stars: ✭ 108 (-12.9%)
Mutual labels:  uikit
Custom bubble navigation bar
A custom navigation bar with bubble click effect in Flutter
Stars: ✭ 104 (-16.13%)
Mutual labels:  navigationbar
Ct Material Kit Pro
Premium Bootstrap 4 UI Kit based on Google's Material Design
Stars: ✭ 123 (-0.81%)
Mutual labels:  uikit
Uikit React
UIkit components built with React
Stars: ✭ 111 (-10.48%)
Mutual labels:  uikit
Distancepicker
Custom UIKit control to select a distance with a pan gesture, written in Swift
Stars: ✭ 118 (-4.84%)
Mutual labels:  uikit
Mtransparentnav
Change NavigationBar's color and transparency 导航栏颜色渐变,通过给viewController添加属性,可方便控制title、item、导航栏颜色变化
Stars: ✭ 109 (-12.1%)
Mutual labels:  navigationbar
Swifterswift
A handy collection of more than 500 native Swift extensions to boost your productivity.
Stars: ✭ 10,706 (+8533.87%)
Mutual labels:  uikit
Edge To Edge
Full screen Android apps using simple Kotlin DSL
Stars: ✭ 118 (-4.84%)
Mutual labels:  navigationbar
Bubble Navigation
🎉 [Android Library] A light-weight library to easily make beautiful Navigation Bar with ton of 🎨 customization option.
Stars: ✭ 1,537 (+1139.52%)
Mutual labels:  navigationbar
Downloadbutton
Customizable App Store style download button
Stars: ✭ 1,532 (+1135.48%)
Mutual labels:  uikit
Customnavigationbarsample
Navigation Bar Customization in Xamarin Forms
Stars: ✭ 104 (-16.13%)
Mutual labels:  navigationbar
Elepy
Elepy, The Headless Content Management Framework
Stars: ✭ 109 (-12.1%)
Mutual labels:  uikit
Weui Sketch
weui sketch by ZTfer
Stars: ✭ 116 (-6.45%)
Mutual labels:  uikit
Awesome Tca
Awesome list for The Composable Architecture
Stars: ✭ 124 (+0%)
Mutual labels:  uikit

SwiftUI Search Bar in Navigation Bar

🔍 SwiftUI search bar in the navigation bar.

Complementary repository for article SwiftUI Search Bar in the Navigation Bar. For more details on motivations and implementation please refer to the full article, or lookup the basic usage example below otherwise.

struct ContentView: View
{
    
    var planets =
        ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] +
        ["Ceres", "Pluto", "Haumea", "Makemake", "Eris"]
    
    @ObservedObject var searchBar: SearchBar = SearchBar()
    
    var body: some View {
        NavigationView {
            List {                
                ForEach(
                    planets.filter {
                        searchBar.text.isEmpty ||
                        $0.localizedStandardContains(searchBar.text)
                    },
                    id: \.self
                ) { eachPlanet in
                    Text(eachPlanet)
                }
            }
                .navigationBarTitle("Planets")
                .add(self.searchBar)
        }
    }
}

License

Licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].