开源软件名称(OpenSource Name):twho/material-design-search-ui-ios开源软件地址(OpenSource Url):https://github.com/twho/material-design-search-ui-ios开源编程语言(OpenSource Language):Swift 99.1%开源软件介绍(OpenSource Introduction):Material Design Search UI iOSMaterial design styled search UI consists of search bar and search results view. You may see the following Medium articles for detailed explanation of developing these UI widgets.
Key Features
Requirements
UsageSearch barDeclarationvar searchbar: Searchbar!
searchbar = Searchbar(
onStartSearch: {
// Your implementation
},
onClearInput: {
// Your implementation
},
delegate: self
) Delegate methodsextension MainViewController: SearchbarDelegate {
func searchbarTextDidChange(_ textField: UITextField) {
}
func textFieldDidBeginEditing(_ textField: UITextField) {
}
func textFieldDidEndEditing(_ textField: UITextField) {
}
func searchbarTextShouldReturn(_ textField: UITextField) -> Bool {
return true
}
} Search results viewDeclarationvar searchResultsView: SearchResultsView!
searchResultsView = SearchResultsView(didSelectAction: {
// Your implementation
}) Load data into results viewsearchResultsView.update(newPlacemarks: placemarks, error: error) Note: I use CLPlacemark here, you can change to whatever data type you'd like to use in your app. Credits |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论