     }
 }
 
+
+// MARK: - CVCalendarViewDelegate & CVCalendarMenuViewDelegate
+
+extension IqamaViewController: CVCalendarViewDelegate, CVCalendarMenuViewDelegate {
+    
+    /// Required method to implement!
+    func presentationMode() -> CalendarMode {
+        return .WeekView
+    }
+    
+    /// Required method to implement!
+    func firstWeekday() -> Weekday {
+        return .Sunday
+    }
+    
+    
+    // MARK: Optional methods
+    
+    func shouldShowWeekdaysOut() -> Bool {
+        return true
+    }
+    
+}

        configureView()
        setupConstraints()
        
    }

    override func didReceiveMemoryWarning() {

    //MARK: drawing the view
    
    private func configureView() {
        // Calendar view
        menuView.menuViewDelegate = self
        calendarView.calendarDelegate = self
        
        self.view.addSubview(menuView)
        self.view.addSubview(calendarView)
    
        // supportButton
        supportButton.setTitle("SUPPORT THE ICB", forState: .Normal)
        supportButton.backgroundColor = Constants.themeColor
        supportButton.rippleColor = UIColor.whiteColor()
        supportButton.addTarget(self, action: #selector(showSupportOptions), forControlEvents: .TouchUpInside)
        
        self.view.addSubview(supportButton)
    }
    
    private func setupConstraints() {
        supportButton.snp_makeConstraints { make in
            make.left.right.equalTo(self.view)
            make.bottom.equalTo(self.bottomLayoutGuide)
            make.height.equalTo(50)
        }
        
        menuView.snp_makeConstraints { make in
            make.left.right.equalTo(self.view)
            make.height.equalTo(24)

            if let offset = self.navigationController?.navigationBar.frame.height {
                make.top.equalTo(self.topLayoutGuide).offset(offset+20)
            } else {
                make.top.equalTo(self.topLayoutGuide)

            }
        }
        
        calendarView.snp_makeConstraints { make in
            make.left.right.equalTo(self.view)
            make.top.equalTo(menuView)
            make.height.equalTo(100)
        }
    }
    
