Latest 1.1.1
Homepage https://github.com/JaroVoltix/JKBottomSearchView
License MIT
Platforms ios 9.0
Authors

Build Status

Installation

Cocapods

pod "JKBottomSearchView"

Carthage

github "JeyKeyCom/JKBottomSearchView"

Requirment

  • iOS 9+
  • Xcode 9+
  • Swift 4.1+

Example

You can check out example project that use JKBottomSearchView here:
https://github.com/JaroVoltix/JKBottomSearchViewExample

Usage

Create JKBottomSearchView

func viewDidLoad(){
    super.viewDidLoad()
    let searchView = JKBottomSearchView()
    view.addSubview(searchView)
}

DataSource & Delegate

JKBottomSearchViewDataSource is and alias to UITableViewDataSource.

extension ViewController:JKBottomSearchViewDataSource{}
searchView.dataSource = self

JKBottomSearchViewDelegate is an alias for UITableViewDelegate & UISearchBarDelegate.

extension ViewController:JKBottomSearchViewDelegate{}
searchView.delegate = self

Customization

//Change blur effect. Default nil
searchView.blurEffect = UIBlurEffect(style: .dark)

//Any non tableView and searchBar customization should be performed on contentView
searchView.contentView.backgroundColor = .red

//Customizing searchBar
searchView.barStyle = .black 
searchView.searchBarStyle = .minimal 
searchView.searchBarTintColor = .black
searchView.placeholder = "What are you looking for"
searchView.showsCancelButton = true
searchView.enablesReturnKeyAutomatically = true

//Customizing searchBar textField
let textField = searchView.searchBarTextField
textField.textColor = .red

//Customizing tableView
//You can access tableView and customize as You like by tableView property
searchView.tableView.isScrollEnabled = false

//Customizing expansion 
searchView.minimalYPosition = 100 // distance from top after fully expanding 
searchView.fastExpandindTime = 0.1
searchView.slowExpandingTime = 2
searchView.toggleExpand(.fullyExpanded,fast:false) // fast parameter is optional, default false

License

Icons used in example available at: https://icons8.com

This project is licensed under the MIT License – see the LICENSE.md file for details.

Latest podspec

{
    "name": "JKBottomSearchView",
    "version": "1.1.1",
    "summary": "Search View similar to Apple maps solution",
    "description": "Simple view that contains searchBar and tableView and allows for full customization with native dataSource and delegate classes. SearchView can be dragged and after drop will snap to closest of 3 levels (fully collapsed, middle, fully expanded).",
    "homepage": "https://github.com/JaroVoltix/JKBottomSearchView",
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    },
    "authors": {
        "Jarosu0142aw Krajewski": "[email protected]"
    },
    "source": {
        "git": "https://github.com/JaroVoltix/JKBottomSearchView.git",
        "tag": "v1.1.1"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "Sources/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This