evadne / dayflow Goto Github PK
View Code? Open in Web Editor NEWiOS Date Picker + Infinite Scrolling
iOS Date Picker + Infinite Scrolling
Hi, I'm experiencing some weird behaviour when DFDatePickerViewController is embedded in a Navigation Controller: the date picker view doesn't always scroll to current date when appearing.
After some research, I came to the conclusion that it depends on how the view controller is configured on storyboard/interface builder.
Mostly, I played with two flags that seem to change the behaviour of your component: "Resize view from NIB" (Layout) and "Under Top Bars" (Extend Edges).
The weird thing is that with the same configuration, the view controller may behave differently on 3.5" and 4" devices (either physical or simulated).
This is what I found:
Thank you
For some reason, on larger displays like the iPhone 6 plus there are 8 days in the week.
NSCalendarIdentifierIslamic
is not predictable, so i think you will face some bug's here and there, I suggest to use NSCalendarIdentifierIslamicUmmAlQura
instead.
For more about it check this answer: http://stackoverflow.com/a/8897011
Using NSCalendarIdentifierIslamic
will lead some months to be duplicated and others to be vanished in your project.
And thank you for your amazing project.
Hello-
This is not an issue with the code, more of a question about changing the color of the calendar. I am not very familiar with NSCache, but I am using the calendar and want to let the user to be able to change the color of the calendar. Is there a easy way to update or refresh the NSCache so the calendar color will update, currently it only updates if I close the app and reopen it.
Thank you,
Darin
Hi,
I see that DayFlow has a podspec file, but is not in the cocoapods directory, which makes it kind of inaccessible...
In landscape, DayFlow's day tiles continue beyond the standard layout (7 days per row) that one would expect in a calendar. There are 10 tiles per row in landscape.
Instead, it should stretch each tile horizontally to maintain one week per row.
Hi,
Loving the calendar. I needed to select multiple dates. To do this I subclassed DFDatePickerView
, and overwrote the following methods....
- (UICollectionView *) collectionView;
- (DFDatePickerDayCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath;
- (void) collectionView:(UICollectionView *)collectionView didDeselectItemAtIndexPath: (NSIndexPath *)indexPath;
- (void) collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath;
Nothing to complicated, just adding/removing dates to an array and changing how a cell is displayed based on that array. Then I subclassed DFDatePickerViewController
, and overwrote -(DFDatePickerView*) datePickerView
to use my new subclass. An extra method in the protocol passes the array to the delegate.
This all worked fine when using it within your own dayFlow-sample project. Strangely, when moving the files over to my own project the calendar always opens 6 months in the past. I know you use +/- 6 months when first generating the collection view. However, I can't see why my project would start there, but the same code in your sample project starts in the middle (i.e. now).
I realise this is out of the scope of your project, but if you can think of any reasons why the same code in 2 apps would behave differently I would be very appreciative. Either way, I'd suggest considering allowing multiple dates to be selected, as it seems to be a gap in the 'market'.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.