Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Merge branch 'development' #384

Merged
merged 7 commits into from
Aug 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions Example/FSCalendar.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

/* Begin PBXBuildFile section */
30024F951BD1015300B1C04C /* DelegateAppearanceViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 30024F941BD1015300B1C04C /* DelegateAppearanceViewController.m */; };
30145EF11D6D754D00AA5F72 /* FSCalendarTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EE638CF51B8A1F550006DD1A /* FSCalendarTests.m */; };
30145EF21D6D755A00AA5F72 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = EE638CF41B8A1F550006DD1A /* Info.plist */; };
3031F3EF1CDEDFC500C174D7 /* ScopeHandleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3031F3EE1CDEDFC500C174D7 /* ScopeHandleViewController.m */; };
3065CA961CD31B81006C218D /* FSCalendarScopeHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = 3065CA941CD31B81006C218D /* FSCalendarScopeHandle.h */; settings = {ATTRIBUTES = (Private, ); }; };
3065CA971CD31B81006C218D /* FSCalendarScopeHandle.m in Sources */ = {isa = PBXBuildFile; fileRef = 3065CA951CD31B81006C218D /* FSCalendarScopeHandle.m */; };
Expand Down Expand Up @@ -76,6 +78,13 @@
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
30671DCC1D6D574C00BCFC4E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = EE0D7FBF1B89C5D3003C287B /* Project object */;
proxyType = 1;
remoteGlobalIDString = EE0D7FC61B89C5D3003C287B;
remoteInfo = FSCalendarExample;
};
30B0BA961B8D8B02004B9476 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = EE0D7FBF1B89C5D3003C287B /* Project object */;
Expand Down Expand Up @@ -108,6 +117,7 @@
3065CA951CD31B81006C218D /* FSCalendarScopeHandle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarScopeHandle.m; sourceTree = "<group>"; };
3065CA9F1CD34ED0006C218D /* FSCalendar+DateTools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "FSCalendar+DateTools.m"; sourceTree = "<group>"; };
3065CAA61CD3506A006C218D /* FSCalendar+Deprecated.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "FSCalendar+Deprecated.m"; sourceTree = "<group>"; };
30671DC71D6D574C00BCFC4E /* FSCalendarTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FSCalendarTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
307E05B71C61EC5C0052A9B4 /* FSCalendarEventIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSCalendarEventIndicator.h; sourceTree = "<group>"; };
307E05B81C61EC5C0052A9B4 /* FSCalendarEventIndicator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSCalendarEventIndicator.m; sourceTree = "<group>"; };
307E05BC1C61ED320052A9B4 /* CALayer+FSExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CALayer+FSExtension.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -170,6 +180,13 @@
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
30671DC41D6D574C00BCFC4E /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
EE0D7FC41B89C5D3003C287B /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -304,6 +321,7 @@
children = (
EE0D7FC71B89C5D3003C287B /* FSCalendarExample.app */,
EE638CE21B8A1F550006DD1A /* FSCalendar.framework */,
30671DC71D6D574C00BCFC4E /* FSCalendarTests.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -425,6 +443,24 @@
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
30671DC61D6D574C00BCFC4E /* FSCalendarTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 30671DCE1D6D574C00BCFC4E /* Build configuration list for PBXNativeTarget "FSCalendarTests" */;
buildPhases = (
30671DC31D6D574C00BCFC4E /* Sources */,
30671DC41D6D574C00BCFC4E /* Frameworks */,
30671DC51D6D574C00BCFC4E /* Resources */,
);
buildRules = (
);
dependencies = (
30671DCD1D6D574C00BCFC4E /* PBXTargetDependency */,
);
name = FSCalendarTests;
productName = FSCalendarTests;
productReference = 30671DC71D6D574C00BCFC4E /* FSCalendarTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
EE0D7FC61B89C5D3003C287B /* FSCalendarExample */ = {
isa = PBXNativeTarget;
buildConfigurationList = EE0D7FEA1B89C5D3003C287B /* Build configuration list for PBXNativeTarget "FSCalendarExample" */;
Expand Down Expand Up @@ -471,6 +507,10 @@
LastUpgradeCheck = 0700;
ORGANIZATIONNAME = wenchaoios;
TargetAttributes = {
30671DC61D6D574C00BCFC4E = {
CreatedOnToolsVersion = 7.3;
TestTargetID = EE0D7FC61B89C5D3003C287B;
};
EE0D7FC61B89C5D3003C287B = {
CreatedOnToolsVersion = 6.4;
};
Expand All @@ -497,11 +537,20 @@
targets = (
EE0D7FC61B89C5D3003C287B /* FSCalendarExample */,
EE638CE11B8A1F550006DD1A /* FSCalendar */,
30671DC61D6D574C00BCFC4E /* FSCalendarTests */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
30671DC51D6D574C00BCFC4E /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
30145EF21D6D755A00AA5F72 /* Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
EE0D7FC51B89C5D3003C287B /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -523,6 +572,14 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
30671DC31D6D574C00BCFC4E /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
30145EF11D6D754D00AA5F72 /* FSCalendarTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
EE0D7FC31B89C5D3003C287B /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -586,6 +643,11 @@
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
30671DCD1D6D574C00BCFC4E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = EE0D7FC61B89C5D3003C287B /* FSCalendarExample */;
targetProxy = 30671DCC1D6D574C00BCFC4E /* PBXContainerItemProxy */;
};
30B0BA971B8D8B02004B9476 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = EE638CE11B8A1F550006DD1A /* FSCalendar */;
Expand Down Expand Up @@ -613,6 +675,35 @@
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
30671DCF1D6D574C00BCFC4E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
INFOPLIST_FILE = FSCalendarTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.wenchao.FSCalendarTests;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FSCalendarExample.app/FSCalendarExample";
};
name = Debug;
};
30671DD01D6D574C00BCFC4E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ANALYZER_NONNULL = YES;
INFOPLIST_FILE = FSCalendarTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.wenchao.FSCalendarTests;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FSCalendarExample.app/FSCalendarExample";
};
name = Release;
};
EE0D7FE81B89C5D3003C287B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -771,6 +862,15 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
30671DCE1D6D574C00BCFC4E /* Build configuration list for PBXNativeTarget "FSCalendarTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
30671DCF1D6D574C00BCFC4E /* Debug */,
30671DD01D6D574C00BCFC4E /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
EE0D7FC21B89C5D3003C287B /* Build configuration list for PBXProject "FSCalendar" */ = {
isa = XCConfigurationList;
buildConfigurations = (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?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>classNames</key>
<dict>
<key>FSCalendarTests</key>
<dict>
<key>testIndexPathForDatePerformance</key>
<dict>
<key>com.apple.XCTPerformanceMetric_WallClockTime</key>
<dict>
<key>baselineAverage</key>
<real>0</real>
<key>baselineIntegrationDisplayName</key>
<string>Local Baseline</string>
</dict>
</dict>
<key>testNSCacheReading</key>
<dict>
<key>com.apple.XCTPerformanceMetric_WallClockTime</key>
<dict>
<key>baselineAverage</key>
<real>1.1193e-06</real>
<key>baselineIntegrationDisplayName</key>
<string>Local Baseline</string>
</dict>
</dict>
<key>testPerformanceExample</key>
<dict>
<key>com.apple.XCTPerformanceMetric_WallClockTime</key>
<dict>
<key>baselineAverage</key>
<real>8.0435e-05</real>
<key>baselineIntegrationDisplayName</key>
<string>Local Baseline</string>
</dict>
</dict>
</dict>
</dict>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?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>runDestinationsByUUID</key>
<dict>
<key>A165CA85-3EFC-487B-954E-5AD1DC2EB21D</key>
<dict>
<key>localComputer</key>
<dict>
<key>busSpeedInMHz</key>
<integer>100</integer>
<key>cpuCount</key>
<integer>1</integer>
<key>cpuKind</key>
<string>Intel Core i7</string>
<key>cpuSpeedInMHz</key>
<integer>2500</integer>
<key>logicalCPUCoresPerPackage</key>
<integer>8</integer>
<key>modelCode</key>
<string>MacBookPro11,5</string>
<key>physicalCPUCoresPerPackage</key>
<integer>4</integer>
<key>platformIdentifier</key>
<string>com.apple.platform.macosx</string>
</dict>
<key>targetArchitecture</key>
<string>x86_64</string>
<key>targetDevice</key>
<dict>
<key>modelCode</key>
<string>iPhone7,2</string>
<key>platformIdentifier</key>
<string>com.apple.platform.iphonesimulator</string>
</dict>
</dict>
</dict>
</dict>
</plist>
27 changes: 20 additions & 7 deletions Example/FSCalendarTests/FSCalendarTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,30 @@
// FSCalendarTests.m
// FSCalendarTests
//
// Created by Wenchao Ding on 8/23/15.
// Copyright (c) 2015 wenchaoios. All rights reserved.
// Created by dingwenchao on 8/24/16.
// Copyright © 2016 wenchaoios. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import "FSCalendar.h"
#import "FSCalendarDynamicHeader.h"

@interface FSCalendarTests : XCTestCase

@property (strong, nonatomic) FSCalendar *calendar;
@property (strong, nonatomic) NSDate *date;
@property (strong, nonatomic) NSIndexPath *indexPath;

@end

@implementation FSCalendarTests

- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
self.calendar = [[FSCalendar alloc] initWithFrame:CGRectMake(0, 0, 320, 300)];
self.indexPath = [NSIndexPath indexPathForItem:25 inSection:0];
self.date = [self.calendar dateForIndexPath:self.indexPath];
}

- (void)tearDown {
Expand All @@ -27,13 +35,18 @@ - (void)tearDown {

- (void)testExample {
// This is an example of a functional test case.
XCTAssert(YES, @"Pass");
// Use XCTAssert and related functions to verify your tests produce the correct results.
}

- (void)testIndexPathForDatePerformance {
[self measureBlock:^{
[self.calendar indexPathForDate:self.date];
}];
}

- (void)testPerformanceExample {
// This is an example of a performance test case.
- (void)testDateForIndexPathPerformance {
[self measureBlock:^{
// Put the code you want to measure the time of here.
[self.calendar dateForIndexPath:self.indexPath];
}];
}

Expand Down
2 changes: 1 addition & 1 deletion Example/FSCalendarTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.wenchao.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
2 changes: 1 addition & 1 deletion FSCalendar.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "FSCalendar"
s.version = "2.3.0"
s.version = "2.3.1"
s.summary = "A superiorly awesome iOS7+ calendar control, compatible with both Objective-C and Swift2."

s.homepage = "https://github.com/WenchaoD/FSCalendar"
Expand Down
2 changes: 1 addition & 1 deletion FSCalendar/FSCalendar+IBExtension.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ - (UIColor *)eventDefaultColor

- (void)setEventSelectionColor:(UIColor *)eventSelectionColor
{
self.eventSelectionColor = eventSelectionColor;
self.appearance.eventSelectionColor = eventSelectionColor;
}

- (UIColor *)eventSelectionColor
Expand Down
2 changes: 1 addition & 1 deletion FSCalendar/FSCalendar.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ IB_DESIGNABLE
*
* calendar.locale = [NSLocale localeWithLocaleIdentifier:@"zh-CN"];
*/
@property (strong, nonatomic) NSLocale *locale;
@property (copy, nonatomic) NSLocale *locale;

/**
* Represents the NSCalendarIdentifier of calendar. Default is NSCalendarIdentifierGregorian.
Expand Down
Loading