Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
4a4279a
Use real UITableView section headers for months
Aug 24, 2013
a328eaf
Fix bottom row calculation
Aug 25, 2013
4444599
Remove extra semicolon from init methods
Aug 25, 2013
d97ac9f
Make "not this month" button labels transparent to support non-opaque…
Aug 25, 2013
043d0df
Bump version to 2.0.0
Aug 25, 2013
05fa303
Replace deprecated UITextAlignmentCenter with NSTextAlignmentCenter
Aug 25, 2013
0f38df2
Fix support for pinsHeaderToTop
Aug 25, 2013
213d8bb
Day buttons should respond to TouchUpInside instead of TouchDown
Aug 31, 2013
1100fed
Exposed "day of month" font and text color for today's date
Oct 30, 2013
c54bca1
Bumped version number in pod spec
Oct 30, 2013
fa5a629
Apply content inset when calculating the size of the background view
Nov 3, 2013
82afbda
iOS 7.1 changed the behavior for setting the title on disabled buttons.
Mar 13, 2014
250d6c7
Fix not-this-month buttons on iOS 7.
Apr 10, 2014
a4caf74
expose the monthDateFormatter so we can override it in subclasses
simX Apr 10, 2014
fdf7c1c
fix calendar day buttons disabled by the delegate (but which are stil…
simX Apr 28, 2014
00d2fc2
Fix iOS8 scrolling issue for resized calendar view
Sep 12, 2014
670f66d
fix warning about iOS 7 deprecation
simX Sep 18, 2014
5d2ebbf
merge from upstream
simX Mar 25, 2015
d534c7d
add framework target/scheme for carthage, use new calendar units inst…
simX Mar 25, 2015
7cde615
add i386 to valid archs for Carthage
simX Mar 25, 2015
d1b53bc
roll back the 'number of weeks in month' calculation to the iOS 7 uni…
simX Mar 30, 2015
5ef6325
manually copy public headers for some reason
simX Apr 1, 2015
de307b2
Fix iOS 8.3 warning
Apr 9, 2015
146ee81
get rid of extra framework header
simX Apr 17, 2015
19cff87
Merge branch 'section-headers' of github.com:opentable/objc-TimesSqua…
simX Apr 17, 2015
dd1d06c
calendar cell has a second title + new delegate
Jul 24, 2015
8d661cb
removed blah blah
Jul 27, 2015
251848f
font for secondtitle
Aug 12, 2015
8d8586f
fixed title not showing problem on selected day
Aug 14, 2015
978628c
moved day title label up by 10 pt
Aug 20, 2015
bdae533
merge upstream
simX Aug 25, 2015
3f161ea
change secondTitle name to subtitle; allow for custom date and subtit…
simX Sep 11, 2015
b81c079
add a separate subtitle symbol label for the + so we can truncate the…
simX Sep 29, 2015
a9aae18
fix an annoying warning
simX Jan 8, 2016
6c7df21
expose all colors are overrideable
krunk4ever Feb 4, 2016
4252d69
expose contentSize for calendar view
krunk4ever Feb 5, 2016
771b741
prevent nil from being passed into [NSCalendar components:fromDate:]
krunk4ever Feb 5, 2016
37f88be
add button type property
krunk4ever Feb 5, 2016
7631d70
update to recommended project settings
krunk4ever Feb 6, 2016
ca6b3c7
make day button remember which day it is
krunk4ever Feb 6, 2016
f5420da
no need to update background image every update
krunk4ever Feb 6, 2016
bb66e0b
allow user to disable scrolling on the calendar view
krunk4ever Feb 6, 2016
1b31be1
internalize subtitle labels on day button
krunk4ever Feb 8, 2016
df49044
add ability to specify today icon
krunk4ever Feb 8, 2016
8cfe562
fix a couple subtitle issues
krunk4ever Feb 8, 2016
6564582
layout subtitle and symbol correctly based on cell size.
krunk4ever Feb 8, 2016
e9bd6b2
fix typo for symbol
krunk4ever Feb 9, 2016
68d502a
move to observation model to relayout subviews for calendar day button
krunk4ever Feb 9, 2016
bf7e13b
tint icon the same color as the selected text when selected
krunk4ever Feb 9, 2016
43be965
need to reload table data whenever initial date changes
krunk4ever Feb 9, 2016
82aa279
SIGH… Forgot to negate
krunk4ever Feb 9, 2016
dedd423
Merge branch 'feature/user_defined_colors' into section-headers
krunk4ever Feb 9, 2016
66109ab
initial day selection should go away as soon as user selects a day
krunk4ever Feb 10, 2016
4133d7f
allow initial date to be selected.
krunk4ever Feb 10, 2016
b9ce33e
fix colors for initial date when disabled or special day
krunk4ever Feb 10, 2016
856088b
make frames land on integers
krunk4ever Feb 10, 2016
64f2e83
do not show today icon when it's for other month
krunk4ever Mar 31, 2016
435de14
Use new NSCalendarUnit enums to replace deprecated enums
krunk4ever Aug 10, 2016
5618c0e
allow delegate to provide additional text attributes to the date
krunk4ever Aug 10, 2016
d19d187
ignore selectedDate if cell doesn't exist
krunk4ever Apr 3, 2017
789fd36
remove unused property
simX Apr 7, 2017
92015b2
add pragma mark separators
simX Apr 7, 2017
f37f50d
add a way to hide the vertical scroll indicator if needed
simX Apr 7, 2017
cc7ceee
allow delegate to specify background image
krunk4ever Feb 27, 2018
fd55cfc
update project settings
krunk4ever Feb 27, 2018
500ff82
Merge pull request #2 from opentable/feature/customizable-background
krunk4ever Feb 27, 2018
5e8904a
add support for delegated selected text color
krunk4ever Feb 27, 2018
110c96b
add foreground image view to TSQCalendarDayButton
krunk4ever Mar 1, 2018
40a277d
add ability to delete to set foreground image on button
krunk4ever Mar 1, 2018
4e516d1
provide button size to delegate method for fetching background and fo…
krunk4ever Mar 1, 2018
f81aada
remove foreground image
krunk4ever Mar 1, 2018
c2d0d8c
track isInitialDay on button
krunk4ever Mar 1, 2018
bb4bb0b
correctly handle selected button's background image
krunk4ever Mar 1, 2018
8905f1b
update accessibilityLabels for disabled days.
mjoe23 Feb 16, 2019
e59dfce
fix(reuse): clear button images on reuse and before layout pass
Jun 25, 2020
ca6b262
fix(reuse): only remove images in frame
Jun 25, 2020
c05fc75
feat(reuse): add back in reuse call outside of loop
Jun 25, 2020
d4b6b2c
fix(reuse): remove duplicate reuse
Jun 25, 2020
c70315b
fix(reuse): attempt 2
Jun 25, 2020
c292e64
fix(reuse): remove extra reloads
Jun 25, 2020
9933f3a
fix(reuse): update reuse
Jun 25, 2020
f639b67
feat(Experience): RO-8459 remove commented out lines and extra reloads
Jun 25, 2020
8f38ab4
fix(reuse): adding back reuse 1 at a time
Jun 25, 2020
9569343
fix(reuse): avoid unneeded change
Jun 25, 2020
438d4a0
fix(reuse): reuse tuning
Jun 25, 2020
0ddf321
fix(image setting): cleanup
Jun 26, 2020
e287b1f
fix(duplication); don't show the same icon if date is shown in 2 months
Jun 29, 2020
3dbfb7f
fix(current day): fine tune showing background image for current day …
Jun 29, 2020
5ea08b0
fix(duplicate icons): use parameter for current month
Jun 29, 2020
a79856c
fix(duplicate background): fix this month logic for current day
Jun 29, 2020
1709330
fix(initial day): remove logging and set background image again for i…
Jun 29, 2020
fd80e2f
fix(duplicate): fix current day selection
Jun 29, 2020
40a122b
Merge pull request #4 from opentable/MG/reusev2
jbakerlent Jun 30, 2020
61c8a9b
fix(deselection): clean up selection state setting and add function f…
Jul 1, 2020
523f2d4
fix(selection): consistent selection check
Jul 1, 2020
e16c0a0
Merge pull request #5 from opentable/MG/deslection-fix
Jul 1, 2020
a6e92a3
fix(crash): Fixed exception due to adding nil to array
jagdeep-manik Jan 26, 2022
701a52c
Merge pull request #6 from opentable/JM/exception-when-laying-out-cal…
jagdeep-manik Jan 26, 2022
46e3491
build: Updated project settings for best xcframework support
jagdeep-manik Jan 26, 2022
2498b1b
fix(ios15): Renamed variable to avoid clash with iOS 15 subtitle label
jagdeep-manik Jan 26, 2022
20a5860
Merge pull request #7 from opentable/JM/pbxproj-updates
jagdeep-manik Jan 27, 2022
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
32 changes: 32 additions & 0 deletions TimesSquare-iOS/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>NSPrincipalClass</key>
<string></string>
<key>UIAppFonts</key>
<array>
<string></string>
</array>
</dict>
</plist>
2 changes: 1 addition & 1 deletion TimesSquare.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Pod::Spec.new do |s|
s.platform = :ios, '5.0'
s.source_files = 'TimesSquare/*.{h,m}'
s.requires_arc = true
end
end
279 changes: 274 additions & 5 deletions TimesSquare.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0640"
LastUpgradeVersion = "1320"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -23,21 +23,22 @@
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
Expand All @@ -48,14 +49,12 @@
ReferencedContainer = "container:TimesSquare.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
Expand Down
109 changes: 109 additions & 0 deletions TimesSquare.xcodeproj/xcshareddata/xcschemes/TimesSquare-iOS.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1320"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5C4733981AC3575B00269A66"
BuildableName = "TimesSquare.framework"
BlueprintName = "TimesSquare-iOS"
ReferencedContainer = "container:TimesSquare.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5C4733A21AC3575C00269A66"
BuildableName = "TimesSquare-iOSTests.xctest"
BlueprintName = "TimesSquare-iOSTests"
ReferencedContainer = "container:TimesSquare.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5C4733981AC3575B00269A66"
BuildableName = "TimesSquare.framework"
BlueprintName = "TimesSquare-iOS"
ReferencedContainer = "container:TimesSquare.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5C4733A21AC3575C00269A66"
BuildableName = "TimesSquare-iOSTests.xctest"
BlueprintName = "TimesSquare-iOSTests"
ReferencedContainer = "container:TimesSquare.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5C4733981AC3575B00269A66"
BuildableName = "TimesSquare.framework"
BlueprintName = "TimesSquare-iOS"
ReferencedContainer = "container:TimesSquare.xcodeproj">
</BuildableReference>
</MacroExpansion>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5C4733981AC3575B00269A66"
BuildableName = "TimesSquare.framework"
BlueprintName = "TimesSquare-iOS"
ReferencedContainer = "container:TimesSquare.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0640"
LastUpgradeVersion = "1320"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -23,10 +23,10 @@
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -41,13 +41,14 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
Expand All @@ -58,14 +59,12 @@
ReferencedContainer = "container:TimesSquare.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
Expand Down
1 change: 1 addition & 0 deletions TimesSquare/TSQCalendarCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,5 @@
*/
- (void)layoutViewsForColumnAtIndex:(NSUInteger)index inRect:(CGRect)rect;


@end
3 changes: 2 additions & 1 deletion TimesSquare/TSQCalendarCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ - (NSUInteger)daysInWeek;
{
static NSUInteger daysInWeek = 0;
if (daysInWeek == 0) {
daysInWeek = [self.calendar maximumRangeOfUnit:NSWeekdayCalendarUnit].length;
daysInWeek = [self.calendar maximumRangeOfUnit:NSCalendarUnitWeekday].length;
}
return daysInWeek;
}
Expand Down Expand Up @@ -118,6 +118,7 @@ - (void)layoutSubviews;
[self layoutViewsForColumnAtIndex:displayIndex inRect:columnBounds];
start += width + self.columnSpacing;
}


}

Expand Down
32 changes: 32 additions & 0 deletions TimesSquare/TSQCalendarDayButton.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// TSQCalendarDayButton.h
// TimesSquare
//
// Created by Loretta Chan on 7/23/15.
// Copyright (c) 2015 Square. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, CalendarButtonType) {
CalendarButtonTypeNormalDay = 0,
CalendarButtonTypeOtherMonth = 1,
CalendarButtonTypeSelected = 2,
CalendarButtonTypeInitialDay = 3,
};

@interface TSQCalendarDayButton : UIButton

@property (nonatomic, assign) CalendarButtonType type;
@property (nonatomic, strong) NSDate *day;

@property (nonatomic, strong) UILabel *tsqSubtitleLabel;
@property (nonatomic, strong) UILabel *subtitleSymbolLabel;
@property (nonatomic, strong) UIImageView *iconImageView;

@property (nonatomic, assign) BOOL isInitialDay;

- (BOOL)isForToday;
- (BOOL)isForDay:(NSDate *)date;

@end
Loading