Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

Size with superView #14

Closed
Horray opened this issue Jun 3, 2015 · 7 comments
Closed

Size with superView #14

Horray opened this issue Jun 3, 2015 · 7 comments

Comments

@Horray
Copy link

Horray commented Jun 3, 2015

The DIDatePicker doesn't re-size together with it's super view

@yconst
Copy link

yconst commented Jul 30, 2015

This is because autoresizingMask affects the view itself, instead of the child collectionView (a bug in implementation). To fix this, insert the following:

_datesCollectionView.autoresizingMask = UIViewAutoresizingFlexibleWidth;

before [self addSubview:_datesCollectionView]; , in the -(UICollectionView *)datesCollectionView; method implementation.

@yconst
Copy link

yconst commented Jul 30, 2015

Also remove duplicate from - (void)setupViews

@nbalaji0610
Copy link

Thanks...

@allyrgb
Copy link

allyrgb commented Sep 9, 2015

That works, thanks, but I can't then get the date cells to automatically resize to align with the screen edges with iPhone 6, like they do with iPhone 5. This is with Swift - the Obj-C demo works ok in this respect.

@almaskz
Copy link

almaskz commented Oct 16, 2015

this can be easily solved my adding DIDatePicker as a subview to UIView that autoresizes correctly.
@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

@allyrgb
Copy link

allyrgb commented Oct 22, 2015

Thank you.

@noxt
Copy link
Owner

noxt commented Oct 1, 2016

Try my new version https://github.com/noxt/ScrollableDatepicker

@noxt noxt closed this as completed Oct 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants