     }
     
     func presentationPreAnimation(transition: DrawerMenuTransition) {
+        guard let view = view else { return }
+        
         view.setNeedsLayout()
         view.layoutIfNeeded()
         


class ContactListTransitionAnimator: DrawerMenuTransitionDelegate {
    
    var view: ContactListView!
    
    private(set) var toX: CGFloat!
    private(set) var toBackgroundColor: UIColor!
    
    func dismissalPreAnimation(transition: DrawerMenuTransition) {
        toX = -max(view.tableView.frame.width, view.searchTextField.frame.width)
        toBackgroundColor = toBackgroundColor.withAlphaComponent(0.0)
    }

    }
    
    private func animate() {
        guard let view = view else { return }
        
        view.backgroundColor = toBackgroundColor
        view.tableView.frame.origin.x = toX
        view.searchTextField.frame.origin.x = toX
