Skip to content

Commit

Permalink
replaced CGRectNull with more appropriate CGRectZero
Browse files Browse the repository at this point in the history
  • Loading branch information
jumartin committed Nov 3, 2016
1 parent cd47d08 commit 7e222e8
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CalendarDemo/YearViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ - (void)moveToPreviousPageAnimated:(BOOL)animated

- (void)loadView
{
MGCYearCalendarView *view = [[MGCYearCalendarView alloc]initWithFrame:CGRectNull];
MGCYearCalendarView *view = [[MGCYearCalendarView alloc]initWithFrame:CGRectZero];
view.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
self.view = view;
}
Expand Down
2 changes: 1 addition & 1 deletion CalendarLib/MGCDayColumnCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ - (instancetype)initWithFrame:(CGRect)frame
_separatorColor = [UIColor lightGrayColor];
_headerHeight = 50;

_dayLabel = [[UILabel alloc] initWithFrame:CGRectNull];
_dayLabel = [[UILabel alloc] initWithFrame:CGRectZero];
_dayLabel.numberOfLines = 0;
_dayLabel.adjustsFontSizeToFitWidth = YES;
_dayLabel.minimumScaleFactor = .7;
Expand Down
8 changes: 4 additions & 4 deletions CalendarLib/MGCDayPlannerView.m
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ - (NSDate*)prevDateForPagingBeforeDate:(NSDate*)date
- (UICollectionView*)timedEventsView
{
if (!_timedEventsView) {
_timedEventsView = [[UICollectionView alloc] initWithFrame:CGRectNull collectionViewLayout:self.timedEventsViewLayout];
_timedEventsView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:self.timedEventsViewLayout];
_timedEventsView.backgroundColor = [UIColor clearColor];
_timedEventsView.dataSource = self;
_timedEventsView.delegate = self;
Expand Down Expand Up @@ -819,7 +819,7 @@ - (UICollectionView*)timedEventsView
- (UICollectionView*)allDayEventsView
{
if (!_allDayEventsView && self.showsAllDayEvents) {
_allDayEventsView = [[UICollectionView alloc] initWithFrame:CGRectNull collectionViewLayout:self.allDayEventsViewLayout];
_allDayEventsView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:self.allDayEventsViewLayout];
_allDayEventsView.backgroundColor = [UIColor clearColor];
_allDayEventsView.dataSource = self;
_allDayEventsView.delegate = self;
Expand Down Expand Up @@ -853,7 +853,7 @@ - (UICollectionView*)dayColumnsView
layout.minimumInteritemSpacing = 0;
layout.minimumLineSpacing = 0;

_dayColumnsView = [[UICollectionView alloc] initWithFrame:CGRectNull collectionViewLayout:layout];
_dayColumnsView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
_dayColumnsView.backgroundColor = [UIColor clearColor];
_dayColumnsView.dataSource = self;
_dayColumnsView.delegate = self;
Expand Down Expand Up @@ -894,7 +894,7 @@ - (UIScrollView*)timeScrollView
- (UIView*)allDayEventsBackgroundView
{
if (!_allDayEventsBackgroundView) {
_allDayEventsBackgroundView = [[UIView alloc] initWithFrame:CGRectNull];
_allDayEventsBackgroundView = [[UIView alloc] initWithFrame:CGRectZero];
_allDayEventsBackgroundView.backgroundColor = [UIColor colorWithRed:.8 green:.8 blue:.83 alpha:1.];
_allDayEventsBackgroundView.clipsToBounds = YES;
_allDayEventsBackgroundView.layer.borderColor = [UIColor lightGrayColor].CGColor;
Expand Down
2 changes: 1 addition & 1 deletion CalendarLib/MGCEventsRowView.m
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ - (void)reload
NSUInteger hiddenCount = [[daysWithMoreEvents objectForKey:@(day)]unsignedIntegerValue];
if (hiddenCount)
{
UILabel *label = [[UILabel alloc]initWithFrame:CGRectNull];
UILabel *label = [[UILabel alloc]initWithFrame:CGRectZero];
label.text = [NSString stringWithFormat:NSLocalizedString(@"%lu more...", nil), (unsigned long)hiddenCount];
label.textColor = [UIColor grayColor];
label.textAlignment = NSTextAlignmentRight;
Expand Down
2 changes: 1 addition & 1 deletion CalendarLib/MGCMonthPlannerViewDayCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ - (id)initWithFrame:(CGRect)frame
self.headerHeight = 20;
self.backgroundColor = [UIColor whiteColor];

self.dayLabel = [[UILabel alloc]initWithFrame:CGRectNull];
self.dayLabel = [[UILabel alloc]initWithFrame:CGRectZero];
self.dayLabel.font = [UIFont systemFontOfSize:[UIFont smallSystemFontSize]];
self.dayLabel.numberOfLines = 1;
self.dayLabel.adjustsFontSizeToFitWidth = YES;
Expand Down
2 changes: 1 addition & 1 deletion CalendarLib/MGCStandardEventView.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ - (instancetype)initWithFrame:(CGRect)frame
_color = [UIColor blackColor];
_style = MGCStandardEventViewStylePlain|MGCStandardEventViewStyleSubtitle;
_font = [UIFont systemFontOfSize:[UIFont smallSystemFontSize]];
_leftBorderView = [[UIView alloc]initWithFrame:CGRectNull];
_leftBorderView = [[UIView alloc]initWithFrame:CGRectZero];
[self addSubview:_leftBorderView];
}
return self;
Expand Down
2 changes: 1 addition & 1 deletion CalendarLib/MGCYearCalendarView.m
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ - (UICollectionView*)eventsView
UICollectionViewFlowLayout *layout = [UICollectionViewFlowLayout new];
layout.scrollDirection = UICollectionViewScrollDirectionVertical;

_eventsView = [[YearEventsView alloc]initWithFrame:CGRectNull collectionViewLayout:layout];
_eventsView = [[YearEventsView alloc]initWithFrame:CGRectZero collectionViewLayout:layout];
_eventsView.yearView = self;
_eventsView.backgroundColor = [UIColor whiteColor];
_eventsView.dataSource = self;
Expand Down

0 comments on commit 7e222e8

Please sign in to comment.