https://github.com/younatics/objectification
🔍 Return objects where string is contained in object! (useful with Search)
https://github.com/younatics/objectification
mirror object search string swift
Last synced: 5 months ago
JSON representation
🔍 Return objects where string is contained in object! (useful with Search)
- Host: GitHub
- URL: https://github.com/younatics/objectification
- Owner: younatics
- License: mit
- Created: 2017-04-23T13:13:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-07T09:23:32.000Z (over 8 years ago)
- Last Synced: 2025-04-18T14:09:36.878Z (6 months ago)
- Topics: mirror, object, search, string, swift
- Language: Swift
- Homepage:
- Size: 116 KB
- Stars: 22
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Objectification
[](http://cocoapods.org/pods/Objectification)
[](https://github.com/Carthage/Carthage)
[](https://github.com/younatics/Objectification/blob/master/LICENSE)
[](https://travis-ci.org/younatics/Objectification)
[](http://cocoapods.org/pods/Objectification)
[](https://developer.apple.com/swift/)#### See [Stringfication](https://github.com/younatics/Stringfication) if you want to change objects to string
#### See [YNSearch](https://github.com/younatics/YNSearch) for usage## Updates
See [CHANGELOG](https://github.com/younatics/Objectification/blob/master/CHANGELOG.md) for details## Intoduction
🔍 Return objects where string is contained in object! This library will be useful when you develop search function :)## Requirements
`Objectification` is written in Swift 3. Compatible with iOS 8.0+
## Installation
### Cocoapods
Objectification is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'Objectification'
```
### Carthage
```
github "younatics/Objectification"
```## Usage
Import `Objectification`
```swift
import Objectification
```Set Datas `[Any]` and Type `ObjectificationType`
```swift
let data1 = YNDropDownMenu()
let data2 = YNSearch()
let data3 = YNExpandableCell()
let datas = [data1, data2, data3] as [Any]
// Three types you can use (.properties, .values, .all) you can see `Stringfication` for more information
let objectification = Objectification(objects: datas, type: .all)
```Get objects with `String`
```swift
print(objectification.objects(contain: "Awesome"))
//-> [YNDropDownMenu, YNSearch, YNExpandableCell]
```## References
#### Please tell me or make pull request if you use this library in your application :)
#### [YNSearch](https://github.com/younatics/YNSearch)
#### [Stringfication](https://github.com/younatics/Stringfication)## Author
[younatics 🇰🇷](http://younatics.github.io)## License
Objectification is available under the MIT license. See the LICENSE file for more info.