diff --git a/.travis.yml b/.travis.yml index 0d58743..1d400bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,4 @@ language: objective-c osx_image: xcode6.4 script: - pod lib lint --verbose --fail-fast - - xctool -project PDTSimpleCalendarDemo/PDTSimpleCalendarDemo.xcodeproj -scheme PDTSimpleCalendarDemo -sdk iphonesimulator ACTIVE_ARCH_ONLY=0 build test \ No newline at end of file + - xctool -workspace PDTSimpleCalendar.xcworkspace -scheme PDTSimpleCalendar -sdk iphonesimulator ACTIVE_ARCH_ONLY=0 build test \ No newline at end of file diff --git a/PDTSimpleCalendar.podspec b/PDTSimpleCalendar.podspec index 6b40908..091775d 100644 --- a/PDTSimpleCalendar.podspec +++ b/PDTSimpleCalendar.podspec @@ -15,8 +15,7 @@ Pod::Spec.new do |s| s.author = { "Jerome Miglino" => "jerome.miglino@jivesoftware.com" } s.platform = :ios, '6.0' s.source = { :git => "https://github.com/jivesoftware/PDTSimpleCalendar.git", :tag => s.version.to_s } - s.source_files = 'PDTSimpleCalendar/*.{h,m}', - s.exclude_files = 'PDTSimpleCalendarDemo' + s.source_files = 'PDTSimpleCalendar/**/*.{h,m}' s.requires_arc = true end diff --git a/PDTSimpleCalendar.xcodeproj/project.pbxproj b/PDTSimpleCalendar.xcodeproj/project.pbxproj index 6125aca..3e1c9ae 100644 --- a/PDTSimpleCalendar.xcodeproj/project.pbxproj +++ b/PDTSimpleCalendar.xcodeproj/project.pbxproj @@ -7,9 +7,8 @@ objects = { /* Begin PBXBuildFile section */ - 1B4E30FF1B6FBA6000BF77A7 /* PDTSimpleCalendarViewWeekdayHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1B4E30FD1B6FBA6000BF77A7 /* PDTSimpleCalendarViewWeekdayHeader.h */; }; + 1B4E30FF1B6FBA6000BF77A7 /* PDTSimpleCalendarViewWeekdayHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1B4E30FD1B6FBA6000BF77A7 /* PDTSimpleCalendarViewWeekdayHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1B4E31001B6FBA6000BF77A7 /* PDTSimpleCalendarViewWeekdayHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B4E30FE1B6FBA6000BF77A7 /* PDTSimpleCalendarViewWeekdayHeader.m */; }; - 37E204DA1B3D16330017CE84 /* PDTSimpleCalendar.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37E204CE1B3D16330017CE84 /* PDTSimpleCalendar.framework */; }; 37E204F31B3D16F20017CE84 /* PDTSimpleCalendar.h in Headers */ = {isa = PBXBuildFile; fileRef = 37E204EA1B3D16F20017CE84 /* PDTSimpleCalendar.h */; settings = {ATTRIBUTES = (Public, ); }; }; 37E204F41B3D16F20017CE84 /* PDTSimpleCalendarViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 37E204EB1B3D16F20017CE84 /* PDTSimpleCalendarViewCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; 37E204F51B3D16F20017CE84 /* PDTSimpleCalendarViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 37E204EC1B3D16F20017CE84 /* PDTSimpleCalendarViewCell.m */; }; @@ -19,10 +18,28 @@ 37E204F91B3D16F20017CE84 /* PDTSimpleCalendarViewFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 37E204F01B3D16F20017CE84 /* PDTSimpleCalendarViewFlowLayout.m */; }; 37E204FA1B3D16F20017CE84 /* PDTSimpleCalendarViewHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 37E204F11B3D16F20017CE84 /* PDTSimpleCalendarViewHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 37E204FB1B3D16F20017CE84 /* PDTSimpleCalendarViewHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 37E204F21B3D16F20017CE84 /* PDTSimpleCalendarViewHeader.m */; }; + 894BD52F1B77A2EE00DFC64A /* PDTSimpleCalendarViewControllerSnapshotTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 894BD52E1B77A2EE00DFC64A /* PDTSimpleCalendarViewControllerSnapshotTests.m */; }; + 894BD5311B77AA4700DFC64A /* PDTSimpleCalendarViewHeaderSnapshotTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 894BD5301B77AA4700DFC64A /* PDTSimpleCalendarViewHeaderSnapshotTests.m */; }; + 897EED3D1B755BDA00AE9049 /* PDTSimpleCalendarViewWeekdayHeaderSnapshotTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 897EED3C1B755BDA00AE9049 /* PDTSimpleCalendarViewWeekdayHeaderSnapshotTests.m */; }; + 897EED761B756BB300AE9049 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 897EED751B756BB300AE9049 /* main.m */; }; + 897EED791B756BB300AE9049 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 897EED781B756BB300AE9049 /* AppDelegate.m */; }; + 897EED811B756BB300AE9049 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 897EED801B756BB300AE9049 /* Images.xcassets */; }; + 897EED841B756BB300AE9049 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 897EED821B756BB300AE9049 /* LaunchScreen.xib */; }; + 89875F4F1B755A5400CE4345 /* PDTSimpleCalendar.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 37E204CE1B3D16330017CE84 /* PDTSimpleCalendar.framework */; }; + 89875F551B755A9600CE4345 /* PDTSimpleCalendarTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 89875F4D1B755A5400CE4345 /* PDTSimpleCalendarTests.m */; }; + 899618041B78EFEF0094E8AB /* PDTSimpleCalendarViewCellSnapshotTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 899618031B78EFEF0094E8AB /* PDTSimpleCalendarViewCellSnapshotTests.m */; }; + D02EFBF69ED7B15BC1B11C82 /* libPods-PDTSimpleCalendarTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 28013C07C5A7CAE0E8045DFB /* libPods-PDTSimpleCalendarTests.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 37E204DB1B3D16330017CE84 /* PBXContainerItemProxy */ = { + 897EED971B756BD400AE9049 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 37E204C51B3D16330017CE84 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 897EED701B756BB300AE9049; + remoteInfo = PDTSimpleCalendarTestsHostApp; + }; + 89875F501B755A5400CE4345 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 37E204C51B3D16330017CE84 /* Project object */; proxyType = 1; @@ -34,9 +51,10 @@ /* Begin PBXFileReference section */ 1B4E30FD1B6FBA6000BF77A7 /* PDTSimpleCalendarViewWeekdayHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDTSimpleCalendarViewWeekdayHeader.h; sourceTree = ""; }; 1B4E30FE1B6FBA6000BF77A7 /* PDTSimpleCalendarViewWeekdayHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDTSimpleCalendarViewWeekdayHeader.m; sourceTree = ""; }; + 1CB6C10A9425D3E010C169C8 /* Pods-PDTSimpleCalendarTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PDTSimpleCalendarTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PDTSimpleCalendarTests/Pods-PDTSimpleCalendarTests.debug.xcconfig"; sourceTree = ""; }; + 28013C07C5A7CAE0E8045DFB /* libPods-PDTSimpleCalendarTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-PDTSimpleCalendarTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 37E204CE1B3D16330017CE84 /* PDTSimpleCalendar.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PDTSimpleCalendar.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 37E204D21B3D16330017CE84 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 37E204D91B3D16330017CE84 /* PDTSimpleCalendarTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PDTSimpleCalendarTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 37E204EA1B3D16F20017CE84 /* PDTSimpleCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDTSimpleCalendar.h; sourceTree = ""; }; 37E204EB1B3D16F20017CE84 /* PDTSimpleCalendarViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDTSimpleCalendarViewCell.h; sourceTree = ""; }; 37E204EC1B3D16F20017CE84 /* PDTSimpleCalendarViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDTSimpleCalendarViewCell.m; sourceTree = ""; }; @@ -46,6 +64,21 @@ 37E204F01B3D16F20017CE84 /* PDTSimpleCalendarViewFlowLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDTSimpleCalendarViewFlowLayout.m; sourceTree = ""; }; 37E204F11B3D16F20017CE84 /* PDTSimpleCalendarViewHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDTSimpleCalendarViewHeader.h; sourceTree = ""; }; 37E204F21B3D16F20017CE84 /* PDTSimpleCalendarViewHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDTSimpleCalendarViewHeader.m; sourceTree = ""; }; + 894BD52E1B77A2EE00DFC64A /* PDTSimpleCalendarViewControllerSnapshotTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDTSimpleCalendarViewControllerSnapshotTests.m; sourceTree = ""; }; + 894BD5301B77AA4700DFC64A /* PDTSimpleCalendarViewHeaderSnapshotTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDTSimpleCalendarViewHeaderSnapshotTests.m; sourceTree = ""; }; + 897EED3C1B755BDA00AE9049 /* PDTSimpleCalendarViewWeekdayHeaderSnapshotTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDTSimpleCalendarViewWeekdayHeaderSnapshotTests.m; sourceTree = ""; }; + 897EED711B756BB300AE9049 /* PDTSimpleCalendarTestsHostApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PDTSimpleCalendarTestsHostApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 897EED741B756BB300AE9049 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 897EED751B756BB300AE9049 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 897EED771B756BB300AE9049 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 897EED781B756BB300AE9049 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 897EED801B756BB300AE9049 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 897EED831B756BB300AE9049 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 89875F491B755A5400CE4345 /* PDTSimpleCalendarTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PDTSimpleCalendarTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 89875F4C1B755A5400CE4345 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 89875F4D1B755A5400CE4345 /* PDTSimpleCalendarTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PDTSimpleCalendarTests.m; sourceTree = ""; }; + 899618031B78EFEF0094E8AB /* PDTSimpleCalendarViewCellSnapshotTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PDTSimpleCalendarViewCellSnapshotTests.m; sourceTree = ""; }; + 9784531216811FF98EE8049F /* Pods-PDTSimpleCalendarTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PDTSimpleCalendarTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-PDTSimpleCalendarTests/Pods-PDTSimpleCalendarTests.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -56,11 +89,19 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 37E204D61B3D16330017CE84 /* Frameworks */ = { + 897EED6E1B756BB300AE9049 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 89875F461B755A5400CE4345 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 37E204DA1B3D16330017CE84 /* PDTSimpleCalendar.framework in Frameworks */, + 89875F4F1B755A5400CE4345 /* PDTSimpleCalendar.framework in Frameworks */, + D02EFBF69ED7B15BC1B11C82 /* libPods-PDTSimpleCalendarTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -71,7 +112,11 @@ isa = PBXGroup; children = ( 37E204D01B3D16330017CE84 /* PDTSimpleCalendar */, + 89875F4A1B755A5400CE4345 /* PDTSimpleCalendarTests */, + 897EED721B756BB300AE9049 /* PDTSimpleCalendarTestsHostApp */, 37E204CF1B3D16330017CE84 /* Products */, + 62C8D50298499303484AAB4D /* Pods */, + E1BEEB1AD49A925B28505E4D /* Frameworks */, ); sourceTree = ""; }; @@ -79,7 +124,8 @@ isa = PBXGroup; children = ( 37E204CE1B3D16330017CE84 /* PDTSimpleCalendar.framework */, - 37E204D91B3D16330017CE84 /* PDTSimpleCalendarTests.xctest */, + 89875F491B755A5400CE4345 /* PDTSimpleCalendarTests.xctest */, + 897EED711B756BB300AE9049 /* PDTSimpleCalendarTestsHostApp.app */, ); name = Products; sourceTree = ""; @@ -111,6 +157,65 @@ name = "Supporting Files"; sourceTree = ""; }; + 62C8D50298499303484AAB4D /* Pods */ = { + isa = PBXGroup; + children = ( + 1CB6C10A9425D3E010C169C8 /* Pods-PDTSimpleCalendarTests.debug.xcconfig */, + 9784531216811FF98EE8049F /* Pods-PDTSimpleCalendarTests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + 897EED721B756BB300AE9049 /* PDTSimpleCalendarTestsHostApp */ = { + isa = PBXGroup; + children = ( + 897EED771B756BB300AE9049 /* AppDelegate.h */, + 897EED781B756BB300AE9049 /* AppDelegate.m */, + 897EED801B756BB300AE9049 /* Images.xcassets */, + 897EED821B756BB300AE9049 /* LaunchScreen.xib */, + 897EED731B756BB300AE9049 /* Supporting Files */, + ); + path = PDTSimpleCalendarTestsHostApp; + sourceTree = ""; + }; + 897EED731B756BB300AE9049 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 897EED741B756BB300AE9049 /* Info.plist */, + 897EED751B756BB300AE9049 /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 89875F4A1B755A5400CE4345 /* PDTSimpleCalendarTests */ = { + isa = PBXGroup; + children = ( + 89875F4D1B755A5400CE4345 /* PDTSimpleCalendarTests.m */, + 899618031B78EFEF0094E8AB /* PDTSimpleCalendarViewCellSnapshotTests.m */, + 894BD52E1B77A2EE00DFC64A /* PDTSimpleCalendarViewControllerSnapshotTests.m */, + 894BD5301B77AA4700DFC64A /* PDTSimpleCalendarViewHeaderSnapshotTests.m */, + 897EED3C1B755BDA00AE9049 /* PDTSimpleCalendarViewWeekdayHeaderSnapshotTests.m */, + 89875F4B1B755A5400CE4345 /* Supporting Files */, + ); + path = PDTSimpleCalendarTests; + sourceTree = ""; + }; + 89875F4B1B755A5400CE4345 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 89875F4C1B755A5400CE4345 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + E1BEEB1AD49A925B28505E4D /* Frameworks */ = { + isa = PBXGroup; + children = ( + 28013C07C5A7CAE0E8045DFB /* libPods-PDTSimpleCalendarTests.a */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -148,22 +253,42 @@ productReference = 37E204CE1B3D16330017CE84 /* PDTSimpleCalendar.framework */; productType = "com.apple.product-type.framework"; }; - 37E204D81B3D16330017CE84 /* PDTSimpleCalendarTests */ = { + 897EED701B756BB300AE9049 /* PDTSimpleCalendarTestsHostApp */ = { isa = PBXNativeTarget; - buildConfigurationList = 37E204E71B3D16330017CE84 /* Build configuration list for PBXNativeTarget "PDTSimpleCalendarTests" */; + buildConfigurationList = 897EED911B756BB400AE9049 /* Build configuration list for PBXNativeTarget "PDTSimpleCalendarTestsHostApp" */; buildPhases = ( - 37E204D51B3D16330017CE84 /* Sources */, - 37E204D61B3D16330017CE84 /* Frameworks */, - 37E204D71B3D16330017CE84 /* Resources */, + 897EED6D1B756BB300AE9049 /* Sources */, + 897EED6E1B756BB300AE9049 /* Frameworks */, + 897EED6F1B756BB300AE9049 /* Resources */, ); buildRules = ( ); dependencies = ( - 37E204DC1B3D16330017CE84 /* PBXTargetDependency */, + ); + name = PDTSimpleCalendarTestsHostApp; + productName = PDTSimpleCalendarTestsHostApp; + productReference = 897EED711B756BB300AE9049 /* PDTSimpleCalendarTestsHostApp.app */; + productType = "com.apple.product-type.application"; + }; + 89875F481B755A5400CE4345 /* PDTSimpleCalendarTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 89875F521B755A5400CE4345 /* Build configuration list for PBXNativeTarget "PDTSimpleCalendarTests" */; + buildPhases = ( + EDFBE19C6AAD0C18F9F07490 /* Check Pods Manifest.lock */, + 89875F451B755A5400CE4345 /* Sources */, + 89875F461B755A5400CE4345 /* Frameworks */, + 89875F471B755A5400CE4345 /* Resources */, + CCD1FCB2FEBF4BC55BA9D2F1 /* Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + 89875F511B755A5400CE4345 /* PBXTargetDependency */, + 897EED981B756BD400AE9049 /* PBXTargetDependency */, ); name = PDTSimpleCalendarTests; productName = PDTSimpleCalendarTests; - productReference = 37E204D91B3D16330017CE84 /* PDTSimpleCalendarTests.xctest */; + productReference = 89875F491B755A5400CE4345 /* PDTSimpleCalendarTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ @@ -178,8 +303,12 @@ 37E204CD1B3D16330017CE84 = { CreatedOnToolsVersion = 6.3.2; }; - 37E204D81B3D16330017CE84 = { - CreatedOnToolsVersion = 6.3.2; + 897EED701B756BB300AE9049 = { + CreatedOnToolsVersion = 6.4; + }; + 89875F481B755A5400CE4345 = { + CreatedOnToolsVersion = 6.4; + TestTargetID = 897EED701B756BB300AE9049; }; }; }; @@ -189,6 +318,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = 37E204C41B3D16330017CE84; productRefGroup = 37E204CF1B3D16330017CE84 /* Products */; @@ -196,7 +326,8 @@ projectRoot = ""; targets = ( 37E204CD1B3D16330017CE84 /* PDTSimpleCalendar */, - 37E204D81B3D16330017CE84 /* PDTSimpleCalendarTests */, + 89875F481B755A5400CE4345 /* PDTSimpleCalendarTests */, + 897EED701B756BB300AE9049 /* PDTSimpleCalendarTestsHostApp */, ); }; /* End PBXProject section */ @@ -209,7 +340,16 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 37E204D71B3D16330017CE84 /* Resources */ = { + 897EED6F1B756BB300AE9049 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 897EED841B756BB300AE9049 /* LaunchScreen.xib in Resources */, + 897EED811B756BB300AE9049 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 89875F471B755A5400CE4345 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -218,6 +358,39 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + CCD1FCB2FEBF4BC55BA9D2F1 /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PDTSimpleCalendarTests/Pods-PDTSimpleCalendarTests-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + EDFBE19C6AAD0C18F9F07490 /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + 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"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 37E204C91B3D16330017CE84 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -231,23 +404,53 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 37E204D51B3D16330017CE84 /* Sources */ = { + 897EED6D1B756BB300AE9049 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 897EED791B756BB300AE9049 /* AppDelegate.m in Sources */, + 897EED761B756BB300AE9049 /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 89875F451B755A5400CE4345 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 894BD5311B77AA4700DFC64A /* PDTSimpleCalendarViewHeaderSnapshotTests.m in Sources */, + 894BD52F1B77A2EE00DFC64A /* PDTSimpleCalendarViewControllerSnapshotTests.m in Sources */, + 89875F551B755A9600CE4345 /* PDTSimpleCalendarTests.m in Sources */, + 897EED3D1B755BDA00AE9049 /* PDTSimpleCalendarViewWeekdayHeaderSnapshotTests.m in Sources */, + 899618041B78EFEF0094E8AB /* PDTSimpleCalendarViewCellSnapshotTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 37E204DC1B3D16330017CE84 /* PBXTargetDependency */ = { + 897EED981B756BD400AE9049 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 897EED701B756BB300AE9049 /* PDTSimpleCalendarTestsHostApp */; + targetProxy = 897EED971B756BD400AE9049 /* PBXContainerItemProxy */; + }; + 89875F511B755A5400CE4345 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 37E204CD1B3D16330017CE84 /* PDTSimpleCalendar */; - targetProxy = 37E204DB1B3D16330017CE84 /* PBXContainerItemProxy */; + targetProxy = 89875F501B755A5400CE4345 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ +/* Begin PBXVariantGroup section */ + 897EED821B756BB300AE9049 /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 897EED831B756BB300AE9049 /* Base */, + ); + name = LaunchScreen.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + /* Begin XCBuildConfiguration section */ 37E204E21B3D16330017CE84 /* Debug */ = { isa = XCBuildConfiguration; @@ -286,7 +489,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -327,7 +530,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -370,8 +573,35 @@ }; name = Release; }; - 37E204E81B3D16330017CE84 /* Debug */ = { + 897EED921B756BB400AE9049 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = PDTSimpleCalendarTestsHostApp/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 897EED931B756BB400AE9049 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = PDTSimpleCalendarTestsHostApp/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 89875F531B755A5400CE4345 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 1CB6C10A9425D3E010C169C8 /* Pods-PDTSimpleCalendarTests.debug.xcconfig */; buildSettings = { FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", @@ -382,21 +612,26 @@ "$(inherited)", ); INFOPLIST_FILE = PDTSimpleCalendarTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.4; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PDTSimpleCalendarTestsHostApp.app/PDTSimpleCalendarTestsHostApp"; }; name = Debug; }; - 37E204E91B3D16330017CE84 /* Release */ = { + 89875F541B755A5400CE4345 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 9784531216811FF98EE8049F /* Pods-PDTSimpleCalendarTests.release.xcconfig */; buildSettings = { FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", ); INFOPLIST_FILE = PDTSimpleCalendarTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.4; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PDTSimpleCalendarTestsHostApp.app/PDTSimpleCalendarTestsHostApp"; }; name = Release; }; @@ -421,11 +656,20 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 37E204E71B3D16330017CE84 /* Build configuration list for PBXNativeTarget "PDTSimpleCalendarTests" */ = { + 897EED911B756BB400AE9049 /* Build configuration list for PBXNativeTarget "PDTSimpleCalendarTestsHostApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 897EED921B756BB400AE9049 /* Debug */, + 897EED931B756BB400AE9049 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 89875F521B755A5400CE4345 /* Build configuration list for PBXNativeTarget "PDTSimpleCalendarTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 37E204E81B3D16330017CE84 /* Debug */, - 37E204E91B3D16330017CE84 /* Release */, + 89875F531B755A5400CE4345 /* Debug */, + 89875F541B755A5400CE4345 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/PDTSimpleCalendar.xcodeproj/xcshareddata/xcschemes/PDTSimpleCalendar.xcscheme b/PDTSimpleCalendar.xcodeproj/xcshareddata/xcschemes/PDTSimpleCalendar.xcscheme index 4ad6b71..eb956b0 100644 --- a/PDTSimpleCalendar.xcodeproj/xcshareddata/xcschemes/PDTSimpleCalendar.xcscheme +++ b/PDTSimpleCalendar.xcodeproj/xcshareddata/xcschemes/PDTSimpleCalendar.xcscheme @@ -28,6 +28,16 @@ shouldUseLaunchSchemeArgsEnv = "YES" buildConfiguration = "Debug"> + + + + + + + + diff --git a/PDTSimpleCalendar.xcworkspace/contents.xcworkspacedata b/PDTSimpleCalendar.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..93730ca --- /dev/null +++ b/PDTSimpleCalendar.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/PDTSimpleCalendar/PDTSimpleCalendarViewCell.h b/PDTSimpleCalendar/PDTSimpleCalendarViewCell.h index 6d25a6d..7e41c1c 100644 --- a/PDTSimpleCalendar/PDTSimpleCalendarViewCell.h +++ b/PDTSimpleCalendar/PDTSimpleCalendarViewCell.h @@ -49,8 +49,6 @@ @end -#import - /** * The `PDTSimpleCalendarViewCell` class displays a day in the calendar. */ @@ -116,7 +114,7 @@ * * @param calendar the calendar. */ -- (void) setDate:(NSDate*)date calendar:(NSCalendar*)calendar; +- (void)setDate:(NSDate*)date calendar:(NSCalendar*)calendar; /** * Force the refresh of the colors for the circle and the text diff --git a/PDTSimpleCalendar/PDTSimpleCalendarViewWeekdayHeader.h b/PDTSimpleCalendar/PDTSimpleCalendarViewWeekdayHeader.h index 3bd968d..03f832a 100644 --- a/PDTSimpleCalendar/PDTSimpleCalendarViewWeekdayHeader.h +++ b/PDTSimpleCalendar/PDTSimpleCalendarViewWeekdayHeader.h @@ -38,7 +38,7 @@ typedef NS_ENUM (NSInteger, PDTSimpleCalendarViewWeekdayTextType) { @property (nonatomic, strong) UIFont *textFont UI_APPEARANCE_SELECTOR; /** - * Customize the head background color. + * Customize the header background color. */ @property (nonatomic, strong) UIColor *headerBackgroundColor UI_APPEARANCE_SELECTOR; diff --git a/PDTSimpleCalendarDemo/PDTSimpleCalendarDemo.xcodeproj/project.pbxproj b/PDTSimpleCalendarDemo/PDTSimpleCalendarDemo.xcodeproj/project.pbxproj index be0e7cf..d08778b 100644 --- a/PDTSimpleCalendarDemo/PDTSimpleCalendarDemo.xcodeproj/project.pbxproj +++ b/PDTSimpleCalendarDemo/PDTSimpleCalendarDemo.xcodeproj/project.pbxproj @@ -19,22 +19,8 @@ 8959434D180CB47B007DEC5D /* PDTSimpleCalendarViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 89594347180CB47B007DEC5D /* PDTSimpleCalendarViewCell.m */; }; 8959434E180CB47B007DEC5D /* PDTSimpleCalendarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 89594349180CB47B007DEC5D /* PDTSimpleCalendarViewController.m */; }; 8959434F180CB47B007DEC5D /* PDTSimpleCalendarViewFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 8959434B180CB47B007DEC5D /* PDTSimpleCalendarViewFlowLayout.m */; }; - 8971B48218CEB0D600736D3B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89594314180CB350007DEC5D /* Foundation.framework */; }; - 8971B48318CEB0D600736D3B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89594318180CB350007DEC5D /* UIKit.framework */; }; - 8971B48918CEB0D600736D3B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8971B48718CEB0D600736D3B /* InfoPlist.strings */; }; - 8971B48B18CEB0D600736D3B /* PDTSimpleCalendarDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8971B48A18CEB0D600736D3B /* PDTSimpleCalendarDemoTests.m */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 8971B48D18CEB0D600736D3B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 89594309180CB350007DEC5D /* Project object */; - proxyType = 1; - remoteGlobalIDString = 89594310180CB350007DEC5D; - remoteInfo = PDTSimpleCalendarDemo; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXFileReference section */ 1B4E30FA1B6FB97F00BF77A7 /* PDTSimpleCalendarViewWeekdayHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDTSimpleCalendarViewWeekdayHeader.h; path = ../PDTSimpleCalendar/PDTSimpleCalendarViewWeekdayHeader.h; sourceTree = ""; }; 1B4E30FB1B6FB97F00BF77A7 /* PDTSimpleCalendarViewWeekdayHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PDTSimpleCalendarViewWeekdayHeader.m; path = ../PDTSimpleCalendar/PDTSimpleCalendarViewWeekdayHeader.m; sourceTree = ""; }; @@ -58,12 +44,6 @@ 89594349180CB47B007DEC5D /* PDTSimpleCalendarViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PDTSimpleCalendarViewController.m; path = ../PDTSimpleCalendar/PDTSimpleCalendarViewController.m; sourceTree = ""; }; 8959434A180CB47B007DEC5D /* PDTSimpleCalendarViewFlowLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDTSimpleCalendarViewFlowLayout.h; path = ../PDTSimpleCalendar/PDTSimpleCalendarViewFlowLayout.h; sourceTree = ""; }; 8959434B180CB47B007DEC5D /* PDTSimpleCalendarViewFlowLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PDTSimpleCalendarViewFlowLayout.m; path = ../PDTSimpleCalendar/PDTSimpleCalendarViewFlowLayout.m; sourceTree = ""; }; - 8971B47F18CEB0D600736D3B /* PDTSimpleCalendarDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PDTSimpleCalendarDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 8971B48618CEB0D600736D3B /* PDTSimpleCalendarDemoTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PDTSimpleCalendarDemoTests-Info.plist"; sourceTree = ""; }; - 8971B48818CEB0D600736D3B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 8971B48A18CEB0D600736D3B /* PDTSimpleCalendarDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PDTSimpleCalendarDemoTests.m; sourceTree = ""; }; - 8971B48C18CEB0D600736D3B /* PDTSimpleCalendarDemoTests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PDTSimpleCalendarDemoTests-Prefix.pch"; sourceTree = ""; }; - 8971B49218CEB55700736D3B /* PDTSimpleCalendarViewController+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PDTSimpleCalendarViewController+Private.h"; sourceTree = ""; }; 89D411BF18109DA1001584CC /* PDTSimpleCalendar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PDTSimpleCalendar.h; path = ../PDTSimpleCalendar/PDTSimpleCalendar.h; sourceTree = ""; }; /* End PBXFileReference section */ @@ -78,15 +58,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 8971B47C18CEB0D600736D3B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8971B48318CEB0D600736D3B /* UIKit.framework in Frameworks */, - 8971B48218CEB0D600736D3B /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -95,7 +66,6 @@ children = ( 89594343180CB46B007DEC5D /* PDTSimpleCalendar */, 8959431A180CB350007DEC5D /* PDTSimpleCalendarDemo */, - 8971B48418CEB0D600736D3B /* PDTSimpleCalendarDemoTests */, 89594313180CB350007DEC5D /* Frameworks */, 89594312180CB350007DEC5D /* Products */, ); @@ -105,7 +75,6 @@ isa = PBXGroup; children = ( 89594311180CB350007DEC5D /* PDTSimpleCalendarDemo.app */, - 8971B47F18CEB0D600736D3B /* PDTSimpleCalendarDemoTests.xctest */, ); name = Products; sourceTree = ""; @@ -161,26 +130,6 @@ name = PDTSimpleCalendar; sourceTree = ""; }; - 8971B48418CEB0D600736D3B /* PDTSimpleCalendarDemoTests */ = { - isa = PBXGroup; - children = ( - 8971B49218CEB55700736D3B /* PDTSimpleCalendarViewController+Private.h */, - 8971B48A18CEB0D600736D3B /* PDTSimpleCalendarDemoTests.m */, - 8971B48518CEB0D600736D3B /* Supporting Files */, - ); - path = PDTSimpleCalendarDemoTests; - sourceTree = ""; - }; - 8971B48518CEB0D600736D3B /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 8971B48618CEB0D600736D3B /* PDTSimpleCalendarDemoTests-Info.plist */, - 8971B48718CEB0D600736D3B /* InfoPlist.strings */, - 8971B48C18CEB0D600736D3B /* PDTSimpleCalendarDemoTests-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -201,24 +150,6 @@ productReference = 89594311180CB350007DEC5D /* PDTSimpleCalendarDemo.app */; productType = "com.apple.product-type.application"; }; - 8971B47E18CEB0D600736D3B /* PDTSimpleCalendarDemoTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8971B49118CEB0D600736D3B /* Build configuration list for PBXNativeTarget "PDTSimpleCalendarDemoTests" */; - buildPhases = ( - 8971B47B18CEB0D600736D3B /* Sources */, - 8971B47C18CEB0D600736D3B /* Frameworks */, - 8971B47D18CEB0D600736D3B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 8971B48E18CEB0D600736D3B /* PBXTargetDependency */, - ); - name = PDTSimpleCalendarDemoTests; - productName = PDTSimpleCalendarDemoTests; - productReference = 8971B47F18CEB0D600736D3B /* PDTSimpleCalendarDemoTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -229,11 +160,6 @@ LastTestingUpgradeCheck = 0610; LastUpgradeCheck = 0610; ORGANIZATIONNAME = Producteev; - TargetAttributes = { - 8971B47E18CEB0D600736D3B = { - TestTargetID = 89594310180CB350007DEC5D; - }; - }; }; buildConfigurationList = 8959430C180CB350007DEC5D /* Build configuration list for PBXProject "PDTSimpleCalendarDemo" */; compatibilityVersion = "Xcode 3.2"; @@ -248,7 +174,6 @@ projectRoot = ""; targets = ( 89594310180CB350007DEC5D /* PDTSimpleCalendarDemo */, - 8971B47E18CEB0D600736D3B /* PDTSimpleCalendarDemoTests */, ); }; /* End PBXProject section */ @@ -263,14 +188,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 8971B47D18CEB0D600736D3B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8971B48918CEB0D600736D3B /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -288,24 +205,8 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 8971B47B18CEB0D600736D3B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8971B48B18CEB0D600736D3B /* PDTSimpleCalendarDemoTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 8971B48E18CEB0D600736D3B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 89594310180CB350007DEC5D /* PDTSimpleCalendarDemo */; - targetProxy = 8971B48D18CEB0D600736D3B /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin PBXVariantGroup section */ 8959431D180CB350007DEC5D /* InfoPlist.strings */ = { isa = PBXVariantGroup; @@ -315,14 +216,6 @@ name = InfoPlist.strings; sourceTree = ""; }; - 8971B48718CEB0D600736D3B /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 8971B48818CEB0D600736D3B /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -424,46 +317,6 @@ }; name = Release; }; - 8971B48F18CEB0D600736D3B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/PDTSimpleCalendarDemo.app/PDTSimpleCalendarDemo"; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests-Prefix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = "PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUNDLE_LOADER)"; - }; - name = Debug; - }; - 8971B49018CEB0D600736D3B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/PDTSimpleCalendarDemo.app/PDTSimpleCalendarDemo"; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests-Prefix.pch"; - INFOPLIST_FILE = "PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUNDLE_LOADER)"; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -485,15 +338,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 8971B49118CEB0D600736D3B /* Build configuration list for PBXNativeTarget "PDTSimpleCalendarDemoTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 8971B48F18CEB0D600736D3B /* Debug */, - 8971B49018CEB0D600736D3B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ }; rootObject = 89594309180CB350007DEC5D /* Project object */; diff --git a/PDTSimpleCalendarDemo/PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests-Prefix.pch b/PDTSimpleCalendarDemo/PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests-Prefix.pch deleted file mode 100644 index 3fdee9d..0000000 --- a/PDTSimpleCalendarDemo/PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests-Prefix.pch +++ /dev/null @@ -1,10 +0,0 @@ -// -// Prefix header -// -// The contents of this file are implicitly included at the beginning of every source file. -// - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/PDTSimpleCalendarDemo/PDTSimpleCalendarDemoTests/PDTSimpleCalendarViewController+Private.h b/PDTSimpleCalendarDemo/PDTSimpleCalendarDemoTests/PDTSimpleCalendarViewController+Private.h deleted file mode 100644 index cbff5d1..0000000 --- a/PDTSimpleCalendarDemo/PDTSimpleCalendarDemoTests/PDTSimpleCalendarViewController+Private.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// PDTSimpleCalendarViewController+Private.h -// PDTSimpleCalendarDemo -// -// Created by Jerome Miglino on 3/10/14. -// Copyright (c) 2014 Producteev. All rights reserved. -// - -#import "PDTSimpleCalendarViewController.h" - -@interface PDTSimpleCalendarViewController (Private) - -@property (nonatomic, readonly) NSDate *firstDateMonth; -@property (nonatomic, readonly) NSDate *lastDateMonth; -@property (nonatomic, assign) NSUInteger daysPerWeek; - -@end diff --git a/PDTSimpleCalendarDemo/PDTSimpleCalendarDemoTests/en.lproj/InfoPlist.strings b/PDTSimpleCalendarDemo/PDTSimpleCalendarDemoTests/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28f..0000000 --- a/PDTSimpleCalendarDemo/PDTSimpleCalendarDemoTests/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/PDTSimpleCalendarDemo/PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests-Info.plist b/PDTSimpleCalendarTests/Info.plist similarity index 78% rename from PDTSimpleCalendarDemo/PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests-Info.plist rename to PDTSimpleCalendarTests/Info.plist index 1c33452..7f1e50b 100644 --- a/PDTSimpleCalendarDemo/PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests-Info.plist +++ b/PDTSimpleCalendarTests/Info.plist @@ -5,11 +5,13 @@ CFBundleDevelopmentRegion en CFBundleExecutable - ${EXECUTABLE_NAME} + $(EXECUTABLE_NAME) CFBundleIdentifier - com.producteev.${PRODUCT_NAME:rfc1034identifier} + com.producteev.$(PRODUCT_NAME:rfc1034identifier) CFBundleInfoDictionaryVersion 6.0 + CFBundleName + $(PRODUCT_NAME) CFBundlePackageType BNDL CFBundleShortVersionString diff --git a/PDTSimpleCalendarDemo/PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests.m b/PDTSimpleCalendarTests/PDTSimpleCalendarTests.m similarity index 64% rename from PDTSimpleCalendarDemo/PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests.m rename to PDTSimpleCalendarTests/PDTSimpleCalendarTests.m index ecfc951..5a9f969 100644 --- a/PDTSimpleCalendarDemo/PDTSimpleCalendarDemoTests/PDTSimpleCalendarDemoTests.m +++ b/PDTSimpleCalendarTests/PDTSimpleCalendarTests.m @@ -1,22 +1,30 @@ // -// PDTSimpleCalendarDemoTests.m -// PDTSimpleCalendarDemoTests +// PDTSimpleCalendarTests.m +// PDTSimpleCalendarTests // -// Created by Jerome Miglino on 3/10/14. -// Copyright (c) 2014 Producteev. All rights reserved. +// Created by Jerome Miglino on 8/7/15. +// Copyright (c) 2015 Jive Software. All rights reserved. // +#import #import #import "PDTSimpleCalendarViewController.h" -#import "PDTSimpleCalendarViewController+Private.h" -@interface PDTSimpleCalendarDemoTests : XCTestCase +@interface PDTSimpleCalendarViewController (Private) + +@property (nonatomic, readonly) NSDate *firstDateMonth; +@property (nonatomic, readonly) NSDate *lastDateMonth; +@property (nonatomic, assign) NSUInteger daysPerWeek; + +@end + +@interface PDTSimpleCalendarTests : XCTestCase @property (nonatomic, strong) PDTSimpleCalendarViewController *calendarController; @end -@implementation PDTSimpleCalendarDemoTests +@implementation PDTSimpleCalendarTests - (void)setUp { @@ -40,22 +48,22 @@ - (void)testDatesDefaultBehavior components.day = 1; NSDate *expectedFirstDate = [currentCalendar dateFromComponents:components]; - XCTAssertTrue([_calendarController.firstDate isEqualToDate:expectedFirstDate], @"firstDate should be equal to the first day of the month"); - XCTAssertTrue([_calendarController.firstDateMonth isEqualToDate:expectedFirstDate], @"firstDateMonth should be equal to the first day of the month"); + XCTAssertTrue([self.calendarController.firstDate isEqualToDate:expectedFirstDate], @"firstDate should be equal to the first day of the month"); + XCTAssertTrue([self.calendarController.firstDateMonth isEqualToDate:expectedFirstDate], @"firstDateMonth should be equal to the first day of the month"); NSDateComponents *addOneYearComponents = [[NSDateComponents alloc] init]; addOneYearComponents.year =1; addOneYearComponents.day = -1; NSDate *expectedLastDate = [currentCalendar dateByAddingComponents:addOneYearComponents toDate:expectedFirstDate options:0]; - XCTAssertTrue([_calendarController.lastDate isEqualToDate:expectedLastDate], @"lastDate should be equal to the last day of the month in one year"); - XCTAssertTrue([_calendarController.lastDateMonth isEqualToDate:expectedLastDate], @"lastDateMonth should be equal to the last day of the month in one year"); + XCTAssertTrue([self.calendarController.lastDate isEqualToDate:expectedLastDate], @"lastDate should be equal to the last day of the month in one year"); + XCTAssertTrue([self.calendarController.lastDateMonth isEqualToDate:expectedLastDate], @"lastDateMonth should be equal to the last day of the month in one year"); } - (void)testSetFirstDate { NSDate *today = [NSDate date]; - _calendarController.firstDate = today; + self.calendarController.firstDate = today; NSCalendar *currentCalendar = [NSCalendar currentCalendar]; NSDateComponents *components = [currentCalendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:today]; @@ -64,11 +72,11 @@ - (void)testSetFirstDate components.day = 1; NSDate *expectedFirstDate = [currentCalendar dateFromComponents:components]; - XCTAssertTrue([_calendarController.firstDate isEqualToDate:clampedToday], @"firstDate should be today"); - XCTAssertTrue([_calendarController.firstDateMonth isEqualToDate:expectedFirstDate], @"firstDateMonth should be equal to the first day of the month"); + XCTAssertTrue([self.calendarController.firstDate isEqualToDate:clampedToday], @"firstDate should be today"); + XCTAssertTrue([self.calendarController.firstDateMonth isEqualToDate:expectedFirstDate], @"firstDateMonth should be equal to the first day of the month"); //Just to be sure - NSDateComponents *firstDateMonthComponents = [currentCalendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:_calendarController.firstDateMonth]; - NSDateComponents *firstDateComponents = [currentCalendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:_calendarController.firstDate]; + NSDateComponents *firstDateMonthComponents = [currentCalendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:self.calendarController.firstDateMonth]; + NSDateComponents *firstDateComponents = [currentCalendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:self.calendarController.firstDate]; XCTAssertTrue(firstDateComponents.month == firstDateMonthComponents.month, @"FirstDate & firstDateMonth should be in the same month"); XCTAssertTrue(firstDateComponents.day >= firstDateMonthComponents.day, @"firstDate day should be >= firstDateMonth"); } @@ -84,9 +92,9 @@ - (void)testSetLastDate NSDateComponents *addComponents = [[NSDateComponents alloc] init]; addComponents.month = 3; NSDate *lastDate = [currentCalendar dateByAddingComponents:addComponents toDate:clampedToday options:0]; - _calendarController.lastDate = lastDate; + self.calendarController.lastDate = lastDate; - XCTAssertTrue([_calendarController.lastDate isEqualToDate:lastDate], @"lastDate should be in 3 months from today"); + XCTAssertTrue([self.calendarController.lastDate isEqualToDate:lastDate], @"lastDate should be in 3 months from today"); //Calculate Last Day of Month components = [currentCalendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:lastDate]; @@ -95,31 +103,22 @@ - (void)testSetLastDate //Next month with day zero, gives the last day of month. NSDate *expectedLastDayMonthDate = [currentCalendar dateFromComponents:components]; - XCTAssertTrue([_calendarController.lastDateMonth isEqualToDate:expectedLastDayMonthDate], @"firstDateMonth should be equal to the first day of the month"); + XCTAssertTrue([self.calendarController.lastDateMonth isEqualToDate:expectedLastDayMonthDate], @"firstDateMonth should be equal to the first day of the month"); //Just to be sure - NSDateComponents *lastDateMonthComponents = [currentCalendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:_calendarController.lastDateMonth]; - NSDateComponents *lastDateComponents = [currentCalendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:_calendarController.lastDate]; + NSDateComponents *lastDateMonthComponents = [currentCalendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:self.calendarController.lastDateMonth]; + NSDateComponents *lastDateComponents = [currentCalendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:self.calendarController.lastDate]; XCTAssertTrue(lastDateComponents.month == lastDateMonthComponents.month, @"LastDate & lastDateMonth should be in the same month"); XCTAssertTrue(lastDateComponents.day <= lastDateMonthComponents.day, @"LastDate day should be < lastDateMonth"); } - (void)testNumberOfDaysPerWeek { - NSCalendar *gregorianCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; - [_calendarController setCalendar:gregorianCalendar]; + NSCalendar *gregorianCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; + [self.calendarController setCalendar:gregorianCalendar]; //We know that the gregorian calendar has 7 days per week //If you know a calendar who doesn't have 7 days per week and is supported by iOS let me know ;-) XCTAssertTrue(_calendarController.daysPerWeek == 7, @"Should be 7 days a week"); } -- (void)testBasicPerformance { - //Time: 0.623sec (4% STDEV) - [self measureBlock:^{ - PDTSimpleCalendarViewController *calendarViewController = [[PDTSimpleCalendarViewController alloc] init]; - XCTAssert(calendarViewController.view); - calendarViewController.selectedDate = [NSDate date]; - }]; -} - @end diff --git a/PDTSimpleCalendarTests/PDTSimpleCalendarViewCellSnapshotTests.m b/PDTSimpleCalendarTests/PDTSimpleCalendarViewCellSnapshotTests.m new file mode 100644 index 0000000..2463e7f --- /dev/null +++ b/PDTSimpleCalendarTests/PDTSimpleCalendarViewCellSnapshotTests.m @@ -0,0 +1,100 @@ +// +// PDTSimpleCalendarViewCellSnapshotTests.m +// PDTSimpleCalendar +// +// Created by Jerome Miglino on 8/10/15. +// Copyright 2015 Jive Software. All rights reserved. +// + +#import "PDTSimpleCalendarViewCell.h" +#import "FBSnapshotTestCase.h" + +@interface PDTSimpleCalendarViewCellSnapshotTests : FBSnapshotTestCase +@property (nonatomic, strong) PDTSimpleCalendarViewCell *cell; +@end + +@implementation PDTSimpleCalendarViewCellSnapshotTests + +- (void)setUp { + [super setUp]; + + self.recordMode = NO; +} + +- (void)tearDown { + [self resetAppearanceProxy]; + [super tearDown]; +} + +- (void)testDefaultValue { + FBSnapshotVerifyView([self testCell], nil); +} + +- (void)testIsToday { + PDTSimpleCalendarViewCell *testCell = [self testCell]; + testCell.isToday = YES; + FBSnapshotVerifyView(testCell, nil); +} + +- (void)testIsSelected { + PDTSimpleCalendarViewCell *testCell = [self testCell]; + testCell.selected = YES; + FBSnapshotVerifyView(testCell, nil); +} + +- (void)testAppeareanceProxyDefault { + [[PDTSimpleCalendarViewCell appearance] setCircleDefaultColor:[UIColor orangeColor]]; + [[PDTSimpleCalendarViewCell appearance] setTextDefaultColor:[UIColor grayColor]]; + [[PDTSimpleCalendarViewCell appearance] setTextDefaultFont:[UIFont fontWithName:@"HelveticaNeue-Medium" size:12.0]]; + PDTSimpleCalendarViewCell *testCell = [self testCell]; + FBSnapshotVerifyView(testCell, nil); +} + +- (void)testAppeareanceProxyToday { + [[PDTSimpleCalendarViewCell appearance] setCircleTodayColor:[UIColor yellowColor]]; + [[PDTSimpleCalendarViewCell appearance] setTextTodayColor:[UIColor lightGrayColor]]; + PDTSimpleCalendarViewCell *testCell = [self testCell]; + testCell.isToday = YES; + FBSnapshotVerifyView(testCell, nil); +} + +- (void)testAppeareanceProxySelected { + [[PDTSimpleCalendarViewCell appearance] setCircleSelectedColor:[UIColor greenColor]]; + [[PDTSimpleCalendarViewCell appearance] setTextSelectedColor:[UIColor blackColor]]; + PDTSimpleCalendarViewCell *testCell = [self testCell]; + testCell.selected = YES; + FBSnapshotVerifyView(testCell, nil); +} + +#pragma mark - Helpers + +- (void)resetAppearanceProxy { + [[PDTSimpleCalendarViewCell appearance] setCircleDefaultColor:nil]; + [[PDTSimpleCalendarViewCell appearance] setCircleSelectedColor:nil]; + [[PDTSimpleCalendarViewCell appearance] setCircleTodayColor:nil]; + [[PDTSimpleCalendarViewCell appearance] setTextDefaultColor:nil]; + [[PDTSimpleCalendarViewCell appearance] setTextSelectedColor:nil]; + [[PDTSimpleCalendarViewCell appearance] setTextTodayColor:nil]; + [[PDTSimpleCalendarViewCell appearance] setTextDisabledColor:nil]; + [[PDTSimpleCalendarViewCell appearance] setTextDefaultFont:nil]; +} + +- (NSDateFormatter *)dateFormatter { + static NSDateFormatter *formatter = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + formatter = [[NSDateFormatter alloc] init]; + formatter.dateFormat = @"dd/MM/yyyy"; + }); + + return formatter; +} + +- (PDTSimpleCalendarViewCell *)testCell { + PDTSimpleCalendarViewCell *testCell = [[PDTSimpleCalendarViewCell alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; + [testCell setDate:[[self dateFormatter] dateFromString:@"28/10/2015"] calendar:[NSCalendar currentCalendar]]; + + return testCell; +} + +@end \ No newline at end of file diff --git a/PDTSimpleCalendarTests/PDTSimpleCalendarViewControllerSnapshotTests.m b/PDTSimpleCalendarTests/PDTSimpleCalendarViewControllerSnapshotTests.m new file mode 100644 index 0000000..c1fcb60 --- /dev/null +++ b/PDTSimpleCalendarTests/PDTSimpleCalendarViewControllerSnapshotTests.m @@ -0,0 +1,87 @@ +// +// PDTSimpleCalendarViewControllerSnapshotTests.m +// PDTSimpleCalendar +// +// Created by Jerome Miglino on 8/9/15. +// Copyright 2015 Jive Software. All rights reserved. +// + +#import "PDTSimpleCalendarViewController.h" +#import "FBSnapshotTestCase.h" + +@interface PDTSimpleCalendarViewControllerSnapshotTests : FBSnapshotTestCase +@property (nonatomic, strong) PDTSimpleCalendarViewController *calendarViewController; +@end + +@implementation PDTSimpleCalendarViewControllerSnapshotTests + +- (void)setUp { + [super setUp]; + self.recordMode = NO; + self.calendarViewController = [[PDTSimpleCalendarViewController alloc] init]; + self.calendarViewController.firstDate = [[self dateFormatter] dateFromString:@"01/05/2015"]; +} + +- (void)tearDown { + self.calendarViewController = nil; + [super tearDown]; +} + +- (void)testWithCustomFirstDate { + [self prepareCalendarViewControllerForTest]; + FBSnapshotVerifyView(self.calendarViewController.view, nil); +} + +- (void)testWithFirstDateNotTheFirst { + self.calendarViewController.firstDate = [[self dateFormatter] dateFromString:@"09/05/2015"]; + [self prepareCalendarViewControllerForTest]; + FBSnapshotVerifyView(self.calendarViewController.view, nil); +} + +- (void)testWithWeekDayHeaderEnabled { + self.calendarViewController.weekdayHeaderEnabled = YES; + [self prepareCalendarViewControllerForTest]; + FBSnapshotVerifyView(self.calendarViewController.view, nil); +} + +- (void)testWithCustomLastDate { + self.calendarViewController.lastDate = [[self dateFormatter] dateFromString:@"23/05/2015"]; + [self prepareCalendarViewControllerForTest]; + FBSnapshotVerifyView(self.calendarViewController.view, nil); +} + +- (void)testWithCustomFirstAndLastDate { + self.calendarViewController.firstDate = [[self dateFormatter] dateFromString:@"09/05/2015"]; + self.calendarViewController.lastDate = [[self dateFormatter] dateFromString:@"23/05/2015"]; + [self prepareCalendarViewControllerForTest]; + FBSnapshotVerifyView(self.calendarViewController.view, nil); +} + +- (void)testWithSelectedDate { + [self prepareCalendarViewControllerForTest]; + self.calendarViewController.selectedDate = [[self dateFormatter] dateFromString:@"10/05/2015"]; + FBSnapshotVerifyView(self.calendarViewController.view, nil); +} + +#pragma mark - Helpers + +- (NSDateFormatter *)dateFormatter { + static NSDateFormatter *formatter = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + formatter = [[NSDateFormatter alloc] init]; + formatter.dateFormat = @"dd/MM/yyyy"; + }); + + return formatter; +} + +- (void)prepareCalendarViewControllerForTest { + //As a convenience, force the test on iPhone 5 screen size. + //We could also have device-specific folders using FBSnapshotVerifyViewWithOptions + [self.calendarViewController beginAppearanceTransition:YES animated:NO]; + [self.calendarViewController.view setFrame:CGRectMake(0, 0, 320, 568)]; + [self.calendarViewController endAppearanceTransition]; +} + +@end \ No newline at end of file diff --git a/PDTSimpleCalendarTests/PDTSimpleCalendarViewHeaderSnapshotTests.m b/PDTSimpleCalendarTests/PDTSimpleCalendarViewHeaderSnapshotTests.m new file mode 100644 index 0000000..54a93c4 --- /dev/null +++ b/PDTSimpleCalendarTests/PDTSimpleCalendarViewHeaderSnapshotTests.m @@ -0,0 +1,66 @@ +// +// PDTSimpleCalendarViewHeaderSnapshotTests.m +// PDTSimpleCalendar +// +// Created by Jerome Miglino on 8/9/15. +// Copyright 2015 Jive Software. All rights reserved. +// + +#import "PDTSimpleCalendarViewHeader.h" +#import "PDTSimpleCalendarViewFlowLayout.h" +#import "FBSnapshotTestCase.h" + +@interface PDTSimpleCalendarViewHeaderSnapshotTests : FBSnapshotTestCase +@end + +@implementation PDTSimpleCalendarViewHeaderSnapshotTests + +- (void)setUp { + [super setUp]; + self.recordMode = NO; + + //Reset Appearance + [[PDTSimpleCalendarViewHeader appearance] setTextColor:nil]; + [[PDTSimpleCalendarViewHeader appearance] setTextFont:nil]; + [[PDTSimpleCalendarViewHeader appearance] setSeparatorColor:nil]; +} + +- (void)tearDown { + [super tearDown]; +} + +- (void)testDefaultSettings { + PDTSimpleCalendarViewHeader *headerView = [self headerView]; + FBSnapshotVerifyView(headerView, nil); +} + +- (void)testTextColorAppearance { + [[PDTSimpleCalendarViewHeader appearance] setTextColor:[UIColor lightGrayColor]]; + PDTSimpleCalendarViewHeader *headerView = [self headerView]; + FBSnapshotVerifyView(headerView, nil); +} + +- (void)testTextFontAppearance { + [[PDTSimpleCalendarViewHeader appearance] setTextFont:[UIFont boldSystemFontOfSize:9]]; + PDTSimpleCalendarViewHeader *headerView = [self headerView]; + FBSnapshotVerifyView(headerView, nil); +} + +- (void)testSeparatorColorAppearance { + [[PDTSimpleCalendarViewHeader appearance] setSeparatorColor:[UIColor orangeColor]]; + PDTSimpleCalendarViewHeader *headerView = [self headerView]; + FBSnapshotVerifyView(headerView, nil); +} + +#pragma mark - Helpers + +- (PDTSimpleCalendarViewHeader *)headerView { + PDTSimpleCalendarViewHeader *headerView = [[PDTSimpleCalendarViewHeader alloc] init]; + headerView.frame = CGRectMake(0, 0, 320, PDTSimpleCalendarFlowLayoutHeaderHeight); + headerView.titleLabel.text = @"AUGUST 2015"; + + return headerView; +} + + +@end \ No newline at end of file diff --git a/PDTSimpleCalendarTests/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests.m b/PDTSimpleCalendarTests/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests.m new file mode 100644 index 0000000..9589c98 --- /dev/null +++ b/PDTSimpleCalendarTests/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests.m @@ -0,0 +1,72 @@ +// +// PDTSimpleCalendarViewWeekdayHeaderSnapshotTests.m +// PDTSimpleCalendar +// +// Created by Jerome Miglino on 8/7/15. +// Copyright 2015 Jive Software. All rights reserved. +// + +#import "PDTSimpleCalendarViewWeekdayHeader.h" +#import "FBSnapshotTestCase.h" + +@interface PDTSimpleCalendarViewWeekdayHeaderSnapshotTests : FBSnapshotTestCase + +@end + +@implementation PDTSimpleCalendarViewWeekdayHeaderSnapshotTests + +- (void)setUp { + [super setUp]; + self.recordMode = NO; + [PDTSimpleCalendarViewWeekdayHeader appearance].headerBackgroundColor = nil; + [PDTSimpleCalendarViewWeekdayHeader appearance].textFont = nil; + [PDTSimpleCalendarViewWeekdayHeader appearance].textColor = nil; +} + +- (void)tearDown { + [super tearDown]; +} + +- (void)testWeekdayTextTypeShort { + PDTSimpleCalendarViewWeekdayHeader *weekdayHeaderView = [self weekdayHeaderViewWithType:PDTSimpleCalendarViewWeekdayTextTypeShort]; + FBSnapshotVerifyView(weekdayHeaderView, nil); +} + +- (void)testWeekdayTextTypeVeryShort { + PDTSimpleCalendarViewWeekdayHeader *weekdayHeaderView = [self weekdayHeaderViewWithType:PDTSimpleCalendarViewWeekdayTextTypeVeryShort]; + FBSnapshotVerifyView(weekdayHeaderView, nil); +} + +- (void)testWeekdayTextTypeStandAlone { + PDTSimpleCalendarViewWeekdayHeader *weekdayHeaderView = [self weekdayHeaderViewWithType:PDTSimpleCalendarViewWeekdayTextTypeStandAlone]; + FBSnapshotVerifyView(weekdayHeaderView, nil); +} + +- (void)testHeaderBackgroundColor { + [PDTSimpleCalendarViewWeekdayHeader appearance].headerBackgroundColor = [UIColor lightGrayColor]; + PDTSimpleCalendarViewWeekdayHeader *weekdayHeaderView = [self weekdayHeaderViewWithType:PDTSimpleCalendarViewWeekdayTextTypeVeryShort]; + FBSnapshotVerifyView(weekdayHeaderView, nil); +} + +- (void)testHeaderTextFont { + [PDTSimpleCalendarViewWeekdayHeader appearance].textFont = [UIFont boldSystemFontOfSize:8]; + PDTSimpleCalendarViewWeekdayHeader *weekdayHeaderView = [self weekdayHeaderViewWithType:PDTSimpleCalendarViewWeekdayTextTypeVeryShort]; + FBSnapshotVerifyView(weekdayHeaderView, nil); +} + +- (void)testHeaderTextColor { + [PDTSimpleCalendarViewWeekdayHeader appearance].textColor = [UIColor orangeColor]; + PDTSimpleCalendarViewWeekdayHeader *weekdayHeaderView = [self weekdayHeaderViewWithType:PDTSimpleCalendarViewWeekdayTextTypeVeryShort]; + FBSnapshotVerifyView(weekdayHeaderView, nil); +} + +#pragma mark - Helpers + +- (PDTSimpleCalendarViewWeekdayHeader *)weekdayHeaderViewWithType:(PDTSimpleCalendarViewWeekdayTextType)type { + PDTSimpleCalendarViewWeekdayHeader *weekdayHeaderView = [[PDTSimpleCalendarViewWeekdayHeader alloc] initWithCalendar:[NSCalendar currentCalendar] weekdayTextType:type]; + [weekdayHeaderView setFrame:CGRectMake(0, 0, 320, PDTSimpleCalendarWeekdayHeaderHeight)]; + + return weekdayHeaderView; +} + +@end \ No newline at end of file diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxyDefault@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxyDefault@2x.png new file mode 100644 index 0000000..02f4295 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxyDefault@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxySelected@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxySelected@2x.png new file mode 100644 index 0000000..a636d70 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxySelected@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxyToday@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxyToday@2x.png new file mode 100644 index 0000000..42a96bf Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxyToday@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testDefaultValue@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testDefaultValue@2x.png new file mode 100644 index 0000000..2cbc6b6 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testDefaultValue@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testIsSelected@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testIsSelected@2x.png new file mode 100644 index 0000000..e33c4d9 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testIsSelected@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testIsToday@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testIsToday@2x.png new file mode 100644 index 0000000..f06cc3b Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewCellSnapshotTests/testIsToday@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomFirstAndLastDate@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomFirstAndLastDate@2x.png new file mode 100644 index 0000000..2fda0be Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomFirstAndLastDate@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomFirstDate@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomFirstDate@2x.png new file mode 100644 index 0000000..31e0e3a Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomFirstDate@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomLastDate@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomLastDate@2x.png new file mode 100644 index 0000000..ae99c99 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomLastDate@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithFirstDateNotTheFirst@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithFirstDateNotTheFirst@2x.png new file mode 100644 index 0000000..c559e45 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithFirstDateNotTheFirst@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithSelectedDate@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithSelectedDate@2x.png new file mode 100644 index 0000000..3fbff5f Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithSelectedDate@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithWeekDayHeaderEnabled@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithWeekDayHeaderEnabled@2x.png new file mode 100644 index 0000000..bf3ca40 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewControllerSnapshotTests/testWithWeekDayHeaderEnabled@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewHeaderSnapshotTests/testDefaultSettings@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewHeaderSnapshotTests/testDefaultSettings@2x.png new file mode 100644 index 0000000..52b861b Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewHeaderSnapshotTests/testDefaultSettings@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewHeaderSnapshotTests/testSeparatorColorAppearance@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewHeaderSnapshotTests/testSeparatorColorAppearance@2x.png new file mode 100644 index 0000000..70b7dcc Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewHeaderSnapshotTests/testSeparatorColorAppearance@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewHeaderSnapshotTests/testTextColorAppearance@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewHeaderSnapshotTests/testTextColorAppearance@2x.png new file mode 100644 index 0000000..896b6e8 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewHeaderSnapshotTests/testTextColorAppearance@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewHeaderSnapshotTests/testTextFontAppearance@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewHeaderSnapshotTests/testTextFontAppearance@2x.png new file mode 100644 index 0000000..9d3eef2 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewHeaderSnapshotTests/testTextFontAppearance@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderBackgroundColor@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderBackgroundColor@2x.png new file mode 100644 index 0000000..d4157f2 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderBackgroundColor@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderTextColor@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderTextColor@2x.png new file mode 100644 index 0000000..677d0d2 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderTextColor@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderTextFont@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderTextFont@2x.png new file mode 100644 index 0000000..4372ca7 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderTextFont@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeShort@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeShort@2x.png new file mode 100644 index 0000000..0714ca9 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeShort@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeStandAlone@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeStandAlone@2x.png new file mode 100644 index 0000000..7e6bff4 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeStandAlone@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeVeryShort@2x.png b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeVeryShort@2x.png new file mode 100644 index 0000000..4de2bc7 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_32/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeVeryShort@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxyDefault@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxyDefault@2x.png new file mode 100644 index 0000000..02f4295 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxyDefault@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxySelected@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxySelected@2x.png new file mode 100644 index 0000000..a636d70 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxySelected@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxyToday@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxyToday@2x.png new file mode 100644 index 0000000..42a96bf Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testAppeareanceProxyToday@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testDefaultValue@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testDefaultValue@2x.png new file mode 100644 index 0000000..2cbc6b6 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testDefaultValue@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testIsSelected@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testIsSelected@2x.png new file mode 100644 index 0000000..e33c4d9 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testIsSelected@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testIsToday@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testIsToday@2x.png new file mode 100644 index 0000000..f06cc3b Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewCellSnapshotTests/testIsToday@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomFirstAndLastDate@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomFirstAndLastDate@2x.png new file mode 100644 index 0000000..024f3f7 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomFirstAndLastDate@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomFirstDate@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomFirstDate@2x.png new file mode 100644 index 0000000..86c4b3f Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomFirstDate@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomLastDate@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomLastDate@2x.png new file mode 100644 index 0000000..48f0a4e Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithCustomLastDate@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithFirstDateNotTheFirst@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithFirstDateNotTheFirst@2x.png new file mode 100644 index 0000000..9bf5ff8 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithFirstDateNotTheFirst@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithSelectedDate@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithSelectedDate@2x.png new file mode 100644 index 0000000..631ed8a Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithSelectedDate@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithWeekDayHeaderEnabled@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithWeekDayHeaderEnabled@2x.png new file mode 100644 index 0000000..d5284e4 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewControllerSnapshotTests/testWithWeekDayHeaderEnabled@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewHeaderSnapshotTests/testDefaultSettings@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewHeaderSnapshotTests/testDefaultSettings@2x.png new file mode 100644 index 0000000..52b861b Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewHeaderSnapshotTests/testDefaultSettings@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewHeaderSnapshotTests/testSeparatorColorAppearance@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewHeaderSnapshotTests/testSeparatorColorAppearance@2x.png new file mode 100644 index 0000000..70b7dcc Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewHeaderSnapshotTests/testSeparatorColorAppearance@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewHeaderSnapshotTests/testTextColorAppearance@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewHeaderSnapshotTests/testTextColorAppearance@2x.png new file mode 100644 index 0000000..896b6e8 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewHeaderSnapshotTests/testTextColorAppearance@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewHeaderSnapshotTests/testTextFontAppearance@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewHeaderSnapshotTests/testTextFontAppearance@2x.png new file mode 100644 index 0000000..9d3eef2 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewHeaderSnapshotTests/testTextFontAppearance@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderBackgroundColor@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderBackgroundColor@2x.png new file mode 100644 index 0000000..75194c4 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderBackgroundColor@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderTextColor@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderTextColor@2x.png new file mode 100644 index 0000000..02f68be Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderTextColor@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderTextFont@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderTextFont@2x.png new file mode 100644 index 0000000..4372ca7 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testHeaderTextFont@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeShort@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeShort@2x.png new file mode 100644 index 0000000..3ff5009 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeShort@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeStandAlone@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeStandAlone@2x.png new file mode 100644 index 0000000..83a8187 Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeStandAlone@2x.png differ diff --git a/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeVeryShort@2x.png b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeVeryShort@2x.png new file mode 100644 index 0000000..4db42dd Binary files /dev/null and b/PDTSimpleCalendarTests/ReferenceImages_64/PDTSimpleCalendarViewWeekdayHeaderSnapshotTests/testWeekdayTextTypeVeryShort@2x.png differ diff --git a/PDTSimpleCalendarTestsHostApp/AppDelegate.h b/PDTSimpleCalendarTestsHostApp/AppDelegate.h new file mode 100644 index 0000000..a260ac0 --- /dev/null +++ b/PDTSimpleCalendarTestsHostApp/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// PDTSimpleCalendarTestsHostApp +// +// Created by Jerome Miglino on 8/7/15. +// Copyright (c) 2015 Jive Software. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/PDTSimpleCalendarTestsHostApp/AppDelegate.m b/PDTSimpleCalendarTestsHostApp/AppDelegate.m new file mode 100644 index 0000000..9d91020 --- /dev/null +++ b/PDTSimpleCalendarTestsHostApp/AppDelegate.m @@ -0,0 +1,48 @@ +// +// AppDelegate.m +// PDTSimpleCalendarTestsHostApp +// +// Created by Jerome Miglino on 8/7/15. +// Copyright (c) 2015 Jive Software. All rights reserved. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + // Override point for customization after application launch. + self.window.backgroundColor = [UIColor orangeColor]; + [self.window makeKeyAndVisible]; + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git a/PDTSimpleCalendarTestsHostApp/Base.lproj/LaunchScreen.xib b/PDTSimpleCalendarTestsHostApp/Base.lproj/LaunchScreen.xib new file mode 100644 index 0000000..78029f2 --- /dev/null +++ b/PDTSimpleCalendarTestsHostApp/Base.lproj/LaunchScreen.xib @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PDTSimpleCalendarTestsHostApp/Images.xcassets/AppIcon.appiconset/Contents.json b/PDTSimpleCalendarTestsHostApp/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..118c98f --- /dev/null +++ b/PDTSimpleCalendarTestsHostApp/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PDTSimpleCalendarTestsHostApp/Info.plist b/PDTSimpleCalendarTestsHostApp/Info.plist new file mode 100644 index 0000000..99b5905 --- /dev/null +++ b/PDTSimpleCalendarTestsHostApp/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + com.producteev.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + + diff --git a/PDTSimpleCalendarTestsHostApp/main.m b/PDTSimpleCalendarTestsHostApp/main.m new file mode 100644 index 0000000..d00065c --- /dev/null +++ b/PDTSimpleCalendarTestsHostApp/main.m @@ -0,0 +1,16 @@ +// +// main.m +// PDTSimpleCalendarTestsHostApp +// +// Created by Jerome Miglino on 8/7/15. +// Copyright (c) 2015 Jive Software. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/Podfile b/Podfile new file mode 100644 index 0000000..f4933a3 --- /dev/null +++ b/Podfile @@ -0,0 +1,7 @@ +source 'https://github.com/CocoaPods/Specs' + +platform :ios, '7.0' + +target :PDTSimpleCalendarTests, :exclusive => true do + pod 'FBSnapshotTestCase/Core', '~> 2.0.3' +end diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 0000000..26dd70f --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,10 @@ +PODS: + - FBSnapshotTestCase/Core (2.0.3) + +DEPENDENCIES: + - FBSnapshotTestCase/Core (~> 2.0.3) + +SPEC CHECKSUMS: + FBSnapshotTestCase: d0eeca6bf87958e088b254396ae66873f971cfb1 + +COCOAPODS: 0.37.2