0
要素をクリックすると、日付ピッカーが表示されるコレクションビューが表示されます。今、私はそれが日付ピッカーによって隠されているが運がない場合、私のビューをスクロールしようとしています。どんな助けもありがとう。 これは私があなたのコレクションビューのコードを参照することはできませんDatePickerでセルが隠されているときにスクロールビューを移動する
func createUIPickerView(){
//:Creating a date picker and the toolbar
picker = UIDatePicker(frame: CGRect(x: 0, y: self.view.frame.size.height-216, width: self.view.frame.size.width, height: 216))
picker.backgroundColor = UIColor.white
picker.datePickerMode = .time
toolBar = UIToolbar(frame: CGRect(x: 0, y: self.view.frame.size.height - 50 - 216, width: self.view.frame.size.width, height: 50))
toolBar.barStyle = .default
toolBar.barTintColor = UIColor.white
toolBar.isTranslucent = true
let doneButton = UIBarButtonItem(title: "Done", style: .plain, target: self, action: #selector(CalenderVC.doneClick))
let spaceButton = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil)
let cancelButton = UIBarButtonItem(title: "Cancel", style: .plain, target: self, action: #selector(CalenderVC.cancelClick))
toolBar.setItems([cancelButton, spaceButton, doneButton], animated: false)
toolBar.isUserInteractionEnabled = true
self.view.addSubview(toolBar)
self.view.addSubview(picker)
}