From 1e343e6966065ab3bd326bf0a24a23fe5acfa677 Mon Sep 17 00:00:00 2001 From: Chris Weber Date: Sat, 9 Aug 2014 18:10:52 +0200 Subject: [PATCH] Added swift '?' mark for optional attributes --- 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 b020ce01..72dc3c65 100644 --- a/templates/machine.swift.motemplate +++ b/templates/machine.swift.motemplate @@ -65,10 +65,10 @@ class _<$managedObjectClassName$>: <$customSuperentity$> { <$else$> <$if Attribute.isReadonly$> @NSManaged - let <$Attribute.name$>: <$Attribute.objectAttributeType$> + let <$Attribute.name$>: <$Attribute.objectAttributeType$><$if Attribute.isOptional$>?<$endif$> <$else$> @NSManaged - var <$Attribute.name$>: <$Attribute.objectAttributeType$> + var <$Attribute.name$>: <$Attribute.objectAttributeType$><$if Attribute.isOptional$>?<$endif$> <$endif$> <$endif$> // func validate<$Attribute.name.initialCapitalString$>(value: AutoreleasingUnsafePointer, error: NSErrorPointer) {}