From 015f98758eaf9136b95973a0fc2833b1030c0da8 Mon Sep 17 00:00:00 2001 From: "Matthew J. Lazar" Date: Fri, 27 Mar 2015 11:48:55 -0400 Subject: [PATCH] Make initializers public. --- templates/machine.swift.motemplate | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/machine.swift.motemplate b/templates/machine.swift.motemplate index f1705ce9..cf90c504 100644 --- a/templates/machine.swift.motemplate +++ b/templates/machine.swift.motemplate @@ -44,10 +44,12 @@ class _<$managedObjectClassName$>: <$customSuperentity$> { // MARK: - Life cycle methods + public override init(entity: NSEntityDescription, insertIntoManagedObjectContext context: NSManagedObjectContext!) { super.init(entity: entity, insertIntoManagedObjectContext: context) } - + + public convenience init(managedObjectContext: NSManagedObjectContext!) { let entity = _<$managedObjectClassName$>.entity(managedObjectContext) self.init(entity: entity, insertIntoManagedObjectContext: managedObjectContext)