leverdeterre / calendarios7 Goto Github PK
View Code? Open in Web Editor NEWCalendar component for iOS apps
License: MIT License
Calendar component for iOS apps
License: MIT License
I'm using the dayStyle "CALDayCollectionViewCellDayUIStyleIOS7" and the year of the month isn't shown, what i have to do for display the agenda as in the center example of the image https://github.com/leverdeterre/CalendarIOS7/raw/master/Screenshots/Calendar.png ?
Hi @leverdeterre,
Firstly, let me say a big thanks to you for making this awesome component. It's really great!
As in Demo, I saw the component supports vertical scroll to jump into next/previous month. It's very very very great if we can support horizontal scroll as the below image shows. So, could you make this case happen?
Again, big thanks for sharing!
Regards,
Hugo
is this in cocoapods? I can't find anything with the name calendariOS7.
2015-08-07 23:42:15.297 CalendarIOS7[788:14504] �[31m*** Assertion failure in -[UICollectionViewData validateLayoutInRect:], /SourceCache/UIKit_Sim/UIKit-3347.44/UICollectionViewData.m:435
�[0m2015-08-07 23:42:15.300 CalendarIOS7[788:14504] �[31m*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'layout attributes for supplementary item at index path (<NSIndexPath: 0xc000000000000016> {length = 2, path = 0 - 0}) changed from <UICollectionViewLayoutAttributes: 0x7fbcbbea3ce0> index path: (<NSIndexPath: 0xc000000000000016> {length = 2, path = 0 - 0}); element kind: (UICollectionElementKindSectionHeader); frame = (0 383.5; 320 30); zIndex = 1024; to <UICollectionViewLayoutAttributes: 0x7fbcbbd65860> index path: (<NSIndexPath: 0xc000000000000016> {length = 2, path = 0 - 0}); element kind: (UICollectionElementKindSectionHeader); frame = (0 44.5; 320 30); zIndex = 1024; without invalidating the layout'
*** First throw call stack:
(
0 CoreFoundation 0x00000001099fcc65 exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000109695bb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001099fcaca +[NSException raise:format:arguments:] + 106
3 Foundation 0x00000001092aa98f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 UIKit 0x00000001085846dd __45-[UICollectionViewData validateLayoutInRect:]_block_invoke + 855
5 UIKit 0x0000000108583efd -[UICollectionViewData validateLayoutInRect:] + 3092
6 UIKit 0x00000001085479b0 -[UICollectionView layoutSubviews] + 194
7 UIKit 0x0000000107fa3a2b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 536
8 QuartzCore 0x0000000109eebec2 -[CALayer layoutSublayers] + 146
9 QuartzCore 0x0000000109ee06d6 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
10 QuartzCore 0x0000000109ee0546 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
11 QuartzCore 0x0000000109e4c886 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
12 QuartzCore 0x0000000109e4da3a _ZN2CA11Transaction6commitEv + 462
13 QuartzCore 0x0000000109f0f075 _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 489
14 CoreFoundation 0x0000000109964174 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 20
15 CoreFoundation 0x0000000109963d35 __CFRunLoopDoTimer + 1045
16 CoreFoundation 0x0000000109925d3d __CFRunLoopRun + 1901
17 CoreFoundation 0x0000000109925366 CFRunLoopRunSpecific + 470
18 GraphicsServices 0x000000010c208a3e GSEventRunModal + 161
19 UIKit 0x0000000107f23900 UIApplicationMain + 1282
20 CalendarIOS7 0x0000000107c1a07f main + 111
21 libdyld.dylib 0x000000010a2b6145 start + 1
22 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
When using horizontal calendar the days are not correctly distributed.
For instance today April 1st, should be on Wednesday but in the calendar its under Sunday
In below your code,
how to set unlimited number fromDate and endDate in your code?
NSDateComponents *components = [NSDateComponents new];
components.month = 1;
components.day = 1;
components.year = 1980;
NSDate *fromDate = [[NSDate gregorianCalendar] dateFromComponents:components];
components.year = 2040;
components.month = 12;
components.day = 31;
NSDate *toDate = [[NSDate gregorianCalendar] dateFromComponents:components];
self.calendarVC.calendarManager.beginDate = fromDate;
self.calendarVC.calendarManager.endDate = toDate;
There is a slight lag when scrolling and I wonder if there is any way that it can be improved
I was running the project under Xcode 6.1. It works totally fine in iOS 7.1 simulator, while which crashed in iOS 8.1 simulator after the date was picked and the following animation.
The error log is here as follow:
2015-01-05 17:12:43.886 CalendarIOS7[96693:7856404] *** Assertion failure in -[UICollectionViewData validateLayoutInRect:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/UICollectionViewData.m:426
2015-01-05 17:12:47.084 CalendarIOS7[96693:7856404] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'layout attributes for supplementary item at index path (<NSIndexPath: 0xc000000000000016> {length = 2, path = 0 - 0}) changed from <UICollectionViewLayoutAttributes: 0x7fea296342c0> index path: (<NSIndexPath: 0xc000000000000016> {length = 2, path = 0 - 0}); element kind: (UICollectionElementKindSectionHeader); frame = (0 383.5; 320 30); zIndex = 1024; to <UICollectionViewLayoutAttributes: 0x7fea2964c0c0> index path: (<NSIndexPath: 0xc000000000000016> {length = 2, path = 0 - 0}); element kind: (UICollectionElementKindSectionHeader); frame = (0 0; 320 30); zIndex = 1024; without invalidating the layout'
*** First throw call stack:
(
0 CoreFoundation 0x000000010fe04f35 exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010fa9dbb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010fe04d9a +[NSException raise:format:arguments:] + 106
3 Foundation 0x000000010f6ba5df -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 UIKit 0x000000010e9b23f7 __45-[UICollectionViewData validateLayoutInRect:]_block_invoke + 855
5 UIKit 0x000000010e9b1b6e -[UICollectionViewData validateLayoutInRect:] + 2747
6 UIKit 0x000000010e9797b8 -[UICollectionView layoutSubviews] + 170
7 UIKit 0x000000010e3bf973 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 521
8 QuartzCore 0x00000001102eade8 -[CALayer layoutSublayers] + 150
9 QuartzCore 0x00000001102dfa0e _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
10 QuartzCore 0x00000001102df87e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
11 QuartzCore 0x000000011024d63e _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
12 QuartzCore 0x000000011024e74a _ZN2CA11Transaction6commitEv + 390
13 QuartzCore 0x000000011024edb5 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 89
14 CoreFoundation 0x000000010fd39dc7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
15 CoreFoundation 0x000000010fd39d20 __CFRunLoopDoObservers + 368
16 CoreFoundation 0x000000010fd2fb53 __CFRunLoopRun + 1123
17 CoreFoundation 0x000000010fd2f486 CFRunLoopRunSpecific + 470
18 GraphicsServices 0x00000001126e09f0 GSEventRunModal + 161
19 UIKit 0x000000010e346420 UIApplicationMain + 1282
20 CalendarIOS7 0x000000010e03cba3 main + 115
21 libdyld.dylib 0x00000001106b8145 start + 1
22 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Hello Team!
I am making application for Hotel Booking. Where user supposed to enter check in date as well as check out date. how can we select two date in your calendar?
Thanks-
Ashutosh
Testing the header issue, I noticed that the months that start on a Sunday, the whole first week is blank, and so day 1 sunday doesn't start until the second week/row.
Examples are September 2013, and December 2013.
Hi @leverdeterre,
Firstly, let me say a big thanks to you for making this awesome component. It's really great!
As in Demo, I saw the component supports vertical scroll to jump into next/previous month. It's very very very great if we can support horizontal scroll as the below image shows. So, could you make this case happen?
Again, big thanks for sharing!
Regards,
Hugo
I'd like to add a tableview underneath a single data calendar, is this possible?
it would be awesome to have an example project included too, then I could have a play and see if I get to to work with my requirements.
Thanks.
Not sure how much of an issue this is to fix, but when running the example project, the dates are calculating incorrectly. The first month we are presented with is February 2014... the 1st starts on the correct day, but it indicates that February has 31 days instead of the 28 that it should have. Following that, I looked to see if March was correct with just the offset of the extra days that February had, but instead of 31 days, March only had 30. The only month that had the correct amount of days was July.
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.