Created
December 7, 2014 00:18
-
-
Save jsclayton/5a14cfb8b5fdcfb0e331 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Load: RLMObject { | |
dynamic var localIdentifier: String? | |
dynamic var name: String? = "" | |
dynamic var loadDescription: String? = "" | |
dynamic var weapon: Weapon? = nil | |
dynamic var bullet: Bullet? = nil | |
dynamic var powder: Powder? = nil | |
dynamic var brass: Brass? = nil | |
dynamic var primer: Primer? = nil | |
dynamic var overallLength: Float = 0.0 | |
dynamic var comparatorLength: Float = 0.0 | |
dynamic var trimLength: Float = 0.0 | |
dynamic var powderCharge: Float = 0.0 | |
} | |
extension Load: FXForm { | |
func fields() -> [AnyObject]! { | |
return [ | |
"name", | |
"loadDescription", | |
"weapon", | |
"bullet", | |
"powder", | |
"brass", | |
"primer", | |
"overallLength", | |
"comparatorLength", | |
"trimLength", | |
"powderCharge" | |
] | |
} | |
func bulletField() -> NSDictionary { | |
return [ FXFormFieldHeader: "Components" ] | |
} | |
func loadDescriptionField() -> NSDictionary { | |
return [ FXFormFieldTitle: "Description", FXFormFieldType: FXFormFieldTypeLongText ] | |
} | |
func overallLengthField() -> NSDictionary { | |
return [ FXFormFieldHeader: "Measurements" ] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment