     var frames:[MCreateFrame]
     var selectedFrame:Int
     var selectedBackground:Int
+    private weak var controller:CCreate?
     
     private class func factoryContent() -> [MCreateContentProtocol]
     {

    
    func save(controller:CCreate)
    {
        
    }
}

        addFrame()
    }
    
    private func createFrames(note:DNote)
    {
        if frames.count > 0
        {
            let frame:MCreateFrame = frames.removeFirst()
            
            DManager.sharedInstance?.createData(
                entityName:DNoteFrame.entityName)
            { [weak self] (data) in
                
                guard
                
                    let noteFrame:DNoteFrame = data as? DNoteFrame
                
                else
                {
                    return
                }
                
                noteFrame.duration = frame.duration
                noteFrame.text = frame.text
                note.addToFrames(noteFrame)
                
                self?.createFrames(note:note)
            }
        }
        else
        {
            noteSaved()
        }
    }
    
    private func noteSaved()
    {
        DManager.sharedInstance?.save
        { [weak self] in
            
            self?.controller?.noteSaved()
        }
    }
    
    //MARK: public
    
    func addFrame()
