Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Calendar.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down
2 changes: 1 addition & 1 deletion CalendarLib/MGCDayPlannerEKViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ - (void)dayPlannerView:(MGCDayPlannerView*)view moveEventOfType:(MGCEventType)ty
EKEvent *ev = [self eventOfType:type atIndex:index date:date];

if (ev) {
NSDateComponents *duration = [self.calendar components:NSMinuteCalendarUnit fromDate:ev.startDate toDate:ev.endDate options:0];
NSDateComponents *duration = [self.calendar components:NSCalendarUnitMinute fromDate:ev.startDate toDate:ev.endDate options:0];
if (ev.allDay && targetType == MGCTimedEventType) {
duration.minute = view.durationForNewTimedEvent / 60;
}
Expand Down
4 changes: 0 additions & 4 deletions CalendarLib/MGCDayPlannerView.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,12 @@ typedef NS_ENUM(NSUInteger, MGCDayPlannerCoveringType) {
/*!
@abstract Returns the number of timed events at the specified day.
@param date Day for which events are requested (time portion is ignored)
@discussion
*/
- (NSInteger)numberOfTimedEventsAtDate:(NSDate*)date;

/*!
@abstract Returns the number of all-day events at the specified date.
@param date Day for which events are requested (time portion is ignored)
@discussion
*/
- (NSInteger)numberOfAllDayEventsAtDate:(NSDate*)date;

Expand Down Expand Up @@ -668,7 +666,6 @@ typedef NS_ENUM(NSUInteger, MGCDayPlannerCoveringType) {
@param type The type of the event.
@param index The index of the event.
@param date The starting day of the event.
@return YES if the event should be selected or NO if it should not.
@discussion The day planner view calls this method when the user successfully selects an event. It does not call this method when
you programmatically set the selection.
*/
Expand All @@ -680,7 +677,6 @@ typedef NS_ENUM(NSUInteger, MGCDayPlannerCoveringType) {
@param type The type of the event.
@param index The index of the event.
@param date The starting day of the event.
@return YES if the event should be selected or NO if it should not.
@discussion The day planner view calls this method when the user successfully deselects an event. It does not call this method when
you programmatically deselect the event.
*/
Expand Down
9 changes: 6 additions & 3 deletions CalendarLib/MGCDayPlannerView.m
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ - (void)setup
_canCreateEvents = YES;
_canMoveEvents = YES;
_allowsSelection = YES;
_eventCoveringType = TimedEventCoveringTypeClassic;
_eventCoveringType = MGCDayPlannerCoveringTypeClassic;

_reuseQueue = [[MGCReusableObjectQueue alloc] init];
_loadingDays = [NSMutableOrderedSet orderedSetWithCapacity:14];
Expand Down Expand Up @@ -1566,7 +1566,7 @@ - (void)reloadEventsAtDate:(NSDate*)date
[self.timedEventsView reloadData];

MGCTimedEventsViewLayoutInvalidationContext *context = [MGCTimedEventsViewLayoutInvalidationContext new];
context.invalidatedSections = [NSIndexSet indexSetWithIndex:section];
context.invalidatedSections = [NSMutableIndexSet indexSetWithIndex:section];
[self.timedEventsView.collectionViewLayout invalidateLayoutWithContext:context];

[self refreshEventMarkForColumnAtDate:date];
Expand All @@ -1579,7 +1579,7 @@ - (void)reloadDimmedTimeRanges
[self.dimmedTimeRangesCache removeAllObjects];

MGCTimedEventsViewLayoutInvalidationContext *context = [MGCTimedEventsViewLayoutInvalidationContext new];
context.invalidatedSections = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, self.numberOfLoadedDays)];
context.invalidatedSections = [NSMutableIndexSet indexSetWithIndexesInRange:NSMakeRange(0, self.numberOfLoadedDays)];
context.invalidateEventCells = NO;
context.invalidateDimmingViews = YES;
[self.timedEventsView.collectionViewLayout invalidateLayoutWithContext:context];
Expand Down Expand Up @@ -1933,6 +1933,9 @@ - (UICollectionReusableView*)collectionView:(UICollectionView*)collectionView vi

return view;
}
else {
return nil;
}
}

#pragma mark - MGCTimedEventsViewLayoutDelegate
Expand Down
12 changes: 5 additions & 7 deletions CalendarLib/MGCMonthPlannerView.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,15 @@ typedef NS_ENUM(NSUInteger, MGCMonthPlannerScrollAlignment) {
/*!
@abstract Registers a class for use in creating new event views for the month planner view.
@param viewClass The class of the view that you want to use.
@param identifier The reuse identifier to associate with the specified class.
@param reuseIdentifier The reuse identifier to associate with the specified class.
This parameter must not be nil and must not be an empty string.
@discussion Prior to calling the dequeueReusableCellWithIdentifier:forEventAtIndex:date: method, you must use this method to tell the month planner how to create a new event view.
*/
- (void)registerClass:(Class)viewClass forEventCellReuseIdentifier:(NSString*)reuseIdentifier;

/*!
@abstract Returns a reusable event view object located by its identifier.
@param identifier A string identifying the view object to be reused. This parameter must not be nil.
@param reuseIdentifier A string identifying the view object to be reused. This parameter must not be nil.
@param index The index of the event.
@param date The date of the event.
@return A valid MGCEventView object.
Expand Down Expand Up @@ -326,7 +326,7 @@ typedef NS_ENUM(NSUInteger, MGCMonthPlannerScrollAlignment) {

/*!
@abstract Returns the event view at the specified point in the month planner view.
@param point A point in the month planner view’s coordinate system.
@param pt A point in the month planner view’s coordinate system.
@param date If not nil, it will contain on return the date of the event located at point.
@param index If not nil, it will contain on return the index of the event located at point.
@return The event view at the specified point, or nil if no event was found at the specified point.
Expand All @@ -335,7 +335,7 @@ typedef NS_ENUM(NSUInteger, MGCMonthPlannerScrollAlignment) {

/*!
@abstract Returns the date at the specified point in the month planner view.
@param point A point in the month planner view’s coordinate system.
@param pt A point in the month planner view’s coordinate system.
@return The date at the specified point, or nil if the date can't be determined.
*/
- (NSDate*)dayAtPoint:(CGPoint)pt;
Expand All @@ -361,7 +361,7 @@ typedef NS_ENUM(NSUInteger, MGCMonthPlannerScrollAlignment) {

/*!
@abstract Reloads all events in given date range.
@param range
@param range Range in which events should be reloaded.
@discussion The view discards any currently displayed visible event views in the range and redisplays them.
*/
- (void)reloadEventsInRange:(MGCDateRange*)range;
Expand Down Expand Up @@ -528,7 +528,6 @@ typedef NS_ENUM(NSUInteger, MGCMonthPlannerScrollAlignment) {
@param view The month planner view object notifying about the selection change.
@param index The index of the event.
@param date The day of the event.
@return YES if the event should be selected or NO if it should not.
@discussion The month planner view calls this method when the user successfully selects an event.
It does not call this method when you programmatically set the selection.
*/
Expand All @@ -550,7 +549,6 @@ typedef NS_ENUM(NSUInteger, MGCMonthPlannerScrollAlignment) {
@param view The month planner view object notifying about the selection change.
@param index The index of the event.
@param date The day of the event.
@return YES if the event should be selected or NO if it should not.
@discussion This does not get called when you programmatically deselect an event with the deselectEvent method
*/
- (void)monthPlannerView:(MGCMonthPlannerView*)view didDeselectEventAtIndex:(NSUInteger)index date:(NSDate*)date;
Expand Down
2 changes: 0 additions & 2 deletions CalendarLib/MGCTimedEventsViewLayout.m
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,6 @@ - (NSArray*)adjustLayoutForOverlappingCells:(NSArray*)attributes inSection:(NSUI

- (void)expandCellsToMaxWidthInCluster:(NSMutableArray<MGCEventCellLayoutAttributes *> *)cluster
{
const NSUInteger padding = 2.f;

// Expand the attributes to maximum possible width
NSMutableArray<NSMutableArray<MGCEventCellLayoutAttributes *> *> *columns = [NSMutableArray new];
[columns addObject:[NSMutableArray new]];
Expand Down
8 changes: 4 additions & 4 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ PODS:
- CalendarLib (2.0):
- OrderedDictionary (~> 1.2)
- OSCache (~> 1.2)
- OrderedDictionary (1.2)
- OrderedDictionary (1.4)
- OSCache (1.2.1)

DEPENDENCIES:
- CalendarLib (from `.`)

EXTERNAL SOURCES:
CalendarLib:
:path: "."
:path: .

SPEC CHECKSUMS:
CalendarLib: 6b0f0bcd4cdf21e2090c999ffee7609fcaf52483
OrderedDictionary: 9cc5d69c5c5314ad696ed1839190724e83d534c7
OrderedDictionary: 138c8d2e358d3a0c9adda15c6c7db24e8e3b09e6
OSCache: 826996b68e8542a8a3d8af1ab0a0fc3070d8f357

PODFILE CHECKSUM: f0c33ba38eb3de386c34bcd88371a475e11b702a

COCOAPODS: 1.0.1
COCOAPODS: 1.2.1
8 changes: 4 additions & 4 deletions Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Pods/OrderedDictionary/LICENCE.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 38 additions & 21 deletions Pods/OrderedDictionary/OrderedDictionary/OrderedDictionary.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading