Skip to content

πŸ” Return objects where string is contained in object! (useful with Search)

License

Notifications You must be signed in to change notification settings

younatics/Objectification

Repository files navigation

Objectification

Version Carthage Compatible License: MIT Build Status Platform Swift 3.0

See Stringfication if you want to change objects to string

See YNSearch for usage

Updates

See CHANGELOG 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. To install it, simply add the following line to your Podfile:

pod 'Objectification'

Carthage

github "younatics/Objectification"

Usage

Import Objectification

import Objectification

Set Datas [Any] and Type ObjectificationType

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

print(objectification.objects(contain: "Awesome"))
//-> [YNDropDownMenu, YNSearch, YNExpandableCell]

References

Please tell me or make pull request if you use this library in your application :)

Author

younatics πŸ‡°πŸ‡·

License

Objectification is available under the MIT license. See the LICENSE file for more info.