From b7c029c43384c6aa0455605e7d253a4ff60e1c10 Mon Sep 17 00:00:00 2001 From: rentzsch Date: Thu, 24 Jul 2014 15:43:54 -0500 Subject: [PATCH] [CHANGE] Swift: use `NSNumber?` so you can set attributes to nil. --- templates/machine.swift.motemplate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/machine.swift.motemplate b/templates/machine.swift.motemplate index 64167919..ac178324 100644 --- a/templates/machine.swift.motemplate +++ b/templates/machine.swift.motemplate @@ -57,10 +57,10 @@ class _<$managedObjectClassName$>: <$customSuperentity$> { <$if Attribute.hasScalarAttributeType$> <$if Attribute.isReadonly$> @NSManaged - let <$Attribute.name$>: <$Attribute.scalarAttributeType$> + let <$Attribute.name$>: NSNumber? <$else$> @NSManaged - var <$Attribute.name$>: <$Attribute.scalarAttributeType$> + var <$Attribute.name$>: NSNumber? <$endif$> <$else$> <$if Attribute.isReadonly$>