Open martinjo opened 10 years ago
// yes I had the same problem, what i did is I introduced scroll view and added DIDatePicker as its subview code bellow. NOTE: will need to set contentSize for scroll view manually @IBOutlet weak var dateView: UIView! // ui to add DIDatePicker as a subview to it @IBOutlet weak var scrollView: UIScrollView! // extra addition to get the scrolling effect when used inside table view let datePicker = DIDatepicker(frame: self.dateView.frame) self.scrollView.addSubview(datePicker) // will need to set contentSize for scroll view manually
Depending on your use case - I think it's related to the auto resizing to fit the width. This fixed issue for me.
- (void)setupViews
{
// self.autoresizingMask = UIViewAutoresizingFlexibleWidth;
self.backgroundColor = [UIColor whiteColor];
self.bottomLineColor = [UIColor colorWithWhite:0.816 alpha:1.000];
self.selectedDateBottomLineColor = self.tintColor;
}
Seems something changed with iOS 8. When compiling with the new SDK my dates won't scroll if the gesture is started inside one of the "date sub views".
Has anyone else seen this?