ver2로 하려고 했는데 튜토리얼을 참고하니 간단해서 구현했다.

@IBAction func toggleMonthAndWeekButtonClicked(_ sender: UIButton) {
        
        if isMonthView {
            toggleMonthWeek.setImage(UIImage(systemName: "w.square"), for: .normal)
            constraint.constant = 58.33
            isMonthView.toggle()
            UIView.animate(withDuration: 0.2, animations: {
                self.view.layoutIfNeeded()
            }) { completed in
                self.calendarView.reloadData(withAnchor: Date())
            }
        } else {
            
            toggleMonthWeek.setImage(UIImage(systemName: "m.square"), for: .normal)
            self.constraint.constant = 270
            isMonthView.toggle()
            UIView.animate(withDuration: 0.2, animations: {
                self.view.layoutIfNeeded()
                self.calendarView.reloadData(withAnchor: Date())
            })
        }
    }

Week-view/Month-view