DSearchBar Xcode10.2 Swift5
Gif
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Installation
DSearchBar is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'DSearchBar'
Version 0.4.0 new function
The character limit function of 10 characters or less was added.
this Code
sbObject.mySearchBar.tag = 10
dsearchBar.pass (st: sbObject.mySearchBar.text!,
tag: sbObject.mySearchBar.tag ,
searchBar: sbObject.mySearchBar)
Version 0.4.1 new function
Color setting, Radius setting
this code
sbObject.myBackgroundColor = DSearchBarColor.color.colorSet(color: .cyan, alphaColor: 0.5)
sbObject.mySearchBar.layer.cornerRadius = DSearchBarColor.cornerRadius.radiusrSet(cornerRadius: 20)
Version 0.4.2 new function
Animation of the observer
Version 0.4.3 new function
You can implement multiple UISearchBars. The example is described in ViewController.
Version 0.4.5 new function
example HttpBody Set
dSUrlModel.josconObject.insert(["test": "test"], at: 0)
let req = dSUrlModel.dSObject(value: "test", index: 0) ?? ""
example URLSesson closure Currency against America
dSURLSession.dSURLSession(urlPath: "\(dSUrlModel.urlPath)\(searchBar.text!)", data: req.data(using: String.Encoding.utf8), onCompletion:{ (error: NSError?, flickrPhotos: [String: Any]?) -> Void in
let rate = self.dSURLSession.dSObjectSetting.dSObject(value: flickrPhotos!) ?? [String: Any]()
self.rateText = ("\(rate["JPY"]!) + Allrate-->,\(rate)")
DispatchQueue.main.sync {
self.rateTextLabel.text = self.rateText
}
})
Author
daisukenagata, [email protected]
License
DSearchBar is available under the MIT license. See the LICENSE file for more info.