LOModel 0.1.1

LOModel 0.1.1

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Feb 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by vivalalova.



LOModel 0.1.1

  • By
  • vivalalova

LOModel

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

LOModel is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "LOModel"

Useage

Inherit LOModel

class ExampleModel: LOModel {
    var title:String?
    var id = 0
}

And init with Dictionary

let obj = ExampleModel(dict: ["title":"okok","identifier":123])

print(obj.title)
print(obj.id)
print(obj.toDictionary())

Notice

  • Some types like integer and double must has default value example for 0

Author

vivalalova

License

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