                 
                 
                 if((openedSlice?.transform) != nil)  {
-                    delegate?.willCloseSliceAtIndex(oldSelected)
+                    delegate?.willCloseSliceAtIndex!(oldSelected)
                     openedSlice?.transform = oldTransform!
-                    delegate?.didCloseSliceAtIndex(oldSelected)
+                    delegate?.didCloseSliceAtIndex!(oldSelected)
                 }
                 
                 

                let translate = CATransform3DMakeTranslation(transX, transY, 0);
                
                
                delegate?.willOpenSliceAtIndex(cpt)
                openedSlice?.transform = translate
                delegate?.didOpenSliceAtIndex(cpt)
                
                
                


}

@objc protocol TurnDelegate {
    
    optional func willOpenSliceAtIndex(index:Int)
    optional func willCloseSliceAtIndex(index:Int)
    
    optional func didOpenSliceAtIndex(index:Int)
    optional func didCloseSliceAtIndex(index:Int)
    
}

