         UIApplication.shared.keyWindow?.rootViewController?.present(alertController, animated: true, completion: nil)
     }
     
-    func pickerHeightAdjustmentFromBottom() -> CGFloat {
-        let screenHeight: CGFloat = UIScreen.main.bounds.height
-        
-        if screenHeight < 600.0 {
-            return CGFloat(450)
-        }else if screenHeight < 700 {
-            return CGFloat(550)
-        }else if screenHeight > 700 {
-            return CGFloat(600)
-        }else{
-            return CGFloat(450)
-        }
-    }
-    
     func getSelectedCalendar() -> EKCalendar {
         return calendars.filter { $0.calendarIdentifier == AppointmentView.pickedCalenderIdentifier}.first!
     }

        label.font = UIFont(name: "Helvetica", size: 13.0)
        label.text = text
        label.sizeToFit()
        return label.frame.height
    }
    
    @IBAction func addToCalendar(_ sender: Any) {

        if calendarPermissionsGranted() {
            self.calendars = eventStore.calendars(for: EKEntityType.event).filter { $0.allowsContentModifications}
            if self.calendars.count > 1 {
                let frame = CGRect(x: 0, y: 120, width: 270, height: 80)
                let calendarPicker = UIPickerView(frame: frame)
                alertController.message?.append("\n\n\n\n\n\n\n")
                calendarPicker.delegate = self
