Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Merge of #25 Against Master #33

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
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
24 changes: 13 additions & 11 deletions TimesSquare.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
A8068092167010030071C71E /* TSQCalendarRowCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A806808B167010030071C71E /* TSQCalendarRowCell.m */; };
A8068094167010030071C71E /* TSQCalendarView.m in Sources */ = {isa = PBXBuildFile; fileRef = A806808D167010030071C71E /* TSQCalendarView.m */; };
A80B62AB1672720C00792DFE /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A806809E167012980071C71E /* CoreGraphics.framework */; };
EFD8DE6D167AF77B00F87FBE /* TimesSquare.h in Headers */ = {isa = PBXBuildFile; fileRef = A806806316700FD70071C71E /* TimesSquare.h */; settings = {ATTRIBUTES = (Public, ); }; };
EFD8DE6E167AF78100F87FBE /* TSQCalendarCell.h in Headers */ = {isa = PBXBuildFile; fileRef = A8068086167010030071C71E /* TSQCalendarCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
EFD8DE6F167AF78600F87FBE /* TSQCalendarMonthHeaderCell.h in Headers */ = {isa = PBXBuildFile; fileRef = A8068088167010030071C71E /* TSQCalendarMonthHeaderCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
EFD8DE70167AF78C00F87FBE /* TSQCalendarRowCell.h in Headers */ = {isa = PBXBuildFile; fileRef = A806808A167010030071C71E /* TSQCalendarRowCell.h */; settings = {ATTRIBUTES = (Public, ); }; };
EFD8DE71167AF79000F87FBE /* TSQCalendarView.h in Headers */ = {isa = PBXBuildFile; fileRef = A806808C167010030071C71E /* TSQCalendarView.h */; settings = {ATTRIBUTES = (Public, ); }; };
AC0A147617314AEE0080B096 /* TSQCalendarCell.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A8068086167010030071C71E /* TSQCalendarCell.h */; };
AC0A147717314AEE0080B096 /* TSQCalendarMonthHeaderCell.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A8068088167010030071C71E /* TSQCalendarMonthHeaderCell.h */; };
AC0A147817314AEE0080B096 /* TSQCalendarRowCell.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A806808A167010030071C71E /* TSQCalendarRowCell.h */; };
AC0A147917314AEE0080B096 /* TSQCalendarView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A806808C167010030071C71E /* TSQCalendarView.h */; };
AC0A147A173164B30080B096 /* TimesSquare.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A806806316700FD70071C71E /* TimesSquare.h */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -27,6 +27,11 @@
dstPath = "include/${PRODUCT_NAME}";
dstSubfolderSpec = 16;
files = (
AC0A147A173164B30080B096 /* TimesSquare.h in CopyFiles */,
AC0A147617314AEE0080B096 /* TSQCalendarCell.h in CopyFiles */,
AC0A147717314AEE0080B096 /* TSQCalendarMonthHeaderCell.h in CopyFiles */,
AC0A147817314AEE0080B096 /* TSQCalendarRowCell.h in CopyFiles */,
AC0A147917314AEE0080B096 /* TSQCalendarView.h in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -123,11 +128,6 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
EFD8DE6D167AF77B00F87FBE /* TimesSquare.h in Headers */,
EFD8DE6E167AF78100F87FBE /* TSQCalendarCell.h in Headers */,
EFD8DE6F167AF78600F87FBE /* TSQCalendarMonthHeaderCell.h in Headers */,
EFD8DE70167AF78C00F87FBE /* TSQCalendarRowCell.h in Headers */,
EFD8DE71167AF79000F87FBE /* TSQCalendarView.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -175,7 +175,7 @@
A806805216700FD70071C71E /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0450;
LastUpgradeCheck = 0460;
ORGANIZATIONNAME = Square;
};
buildConfigurationList = A806805516700FD70071C71E /* Build configuration list for PBXProject "TimesSquare" */;
Expand Down Expand Up @@ -293,6 +293,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
DEBUGGING_SYMBOLS = YES;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
Expand All @@ -310,6 +311,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0450"
LastUpgradeVersion = "0460"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0450"
LastUpgradeVersion = "0460"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
24 changes: 24 additions & 0 deletions TimesSquare/TSQCalendarCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,42 @@
*/
@property (nonatomic, strong) UIColor *textColor;

/** The text shadow color.

This is used for all text the cell draws; default is white.
*/
@property (nonatomic, strong) UIColor *shadowColor;

/** The text shadow offset.

This is as you would set on `UILabel`.
*/
@property (nonatomic) CGSize shadowOffset;

/** The text color for today's date.

White by default.
*/
@property (nonatomic, strong) UIColor *todayTextColor;

/** The text shadow color for today's date.

Black by default.
*/
@property (nonatomic, strong) UIColor *todayShadowColor;

/** The spacing between columns.

This defaults to one pixel or `1.0 / [UIScreen mainScreen].scale`.
*/
@property (nonatomic) CGFloat columnSpacing;

/** Whether or not to display days that occur outside of the current month.

Defaults to YES.
*/
@property (nonatomic) BOOL showsNotThisMonth;

/** @name Initialization */

/** Initializes the cell.
Expand Down
6 changes: 5 additions & 1 deletion TimesSquare/TSQCalendarCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ - (id)initWithCalendar:(NSCalendar *)calendar reuseIdentifier:(NSString *)reuseI
self.shadowOffset = shadowOffset;
self.columnSpacing = onePixel;
self.textColor = [UIColor colorWithRed:0.47f green:0.5f blue:0.53f alpha:1.0f];

self.shadowColor = [UIColor whiteColor];
self.todayTextColor = [UIColor whiteColor];
self.todayShadowColor = [UIColor colorWithWhite:0.0f alpha:0.75f];
self.showsNotThisMonth = YES;

return self;
}

Expand Down
16 changes: 16 additions & 0 deletions TimesSquare/TSQCalendarRowCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@
*/
@property (nonatomic, weak, readonly) UIImage *notThisMonthBackgroundImage;

/** An array of `UIButton` objects wherein each button represents a day on the calendar.
*/
@property (nonatomic, strong, readonly) NSArray *dayButtons;

/** An array of `UIButton` objects wherein each button represents a day that is outside of the current month being displayed on the calendar.
*/
@property (nonatomic, strong, readonly) NSArray *notThisMonthButtons;

/** @name State Properties Set by Calendar View */

/** The date at the beginning of the week for this cell.
Expand All @@ -65,4 +73,12 @@
*/
- (void)selectColumnForDate:(NSDate *)date;

/** Method to select a specific date within the week.

This is funneled through and called by the calendar view, to facilitate deselection of other rows.

@param date The date to select, or nil to deselect all columns.
*/
- (void)deselectColumnForDate:(NSDate *)date;

@end
Loading