noxt / DIDatepicker

Yet another datepicker for iOS
MIT License
238 stars 43 forks source link

[iOS 8] Pan gesture swallowed by DIDatePickerDateView? #7

Open martinjo opened 10 years ago

martinjo commented 10 years ago

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?

almaskz commented 9 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

johndpope commented 7 years ago

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;
}