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

Feature/calendar custom #1366

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 29 additions & 5 deletions Example-Swift/FSCalendarSwiftExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
F9CB48401E406A9200C92065 /* FSCalendarSwiftExampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9CB483F1E406A9200C92065 /* FSCalendarSwiftExampleUITests.swift */; };
F9CB48481E406B7300C92065 /* FSCalendarConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 30F4C9281E07C3AD00D2EC4D /* FSCalendarConstants.m */; };
F9DE053B1E3CCAE800902F7D /* CalendarConfigViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9DE053A1E3CCAE800902F7D /* CalendarConfigViewController.swift */; };
FA1B318A2824AF86001860DC /* WorkTypeVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA1B31882824AF86001860DC /* WorkTypeVC.swift */; };
FA1B318B2824AF86001860DC /* WorkTypeVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = FA1B31892824AF86001860DC /* WorkTypeVC.xib */; };
FA1B31932824B675001860DC /* WorkGroupVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA1B31912824B675001860DC /* WorkGroupVC.swift */; };
FA1B31942824B675001860DC /* WorkGroupVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = FA1B31922824B675001860DC /* WorkGroupVC.xib */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -102,6 +106,10 @@
F9CB48411E406A9200C92065 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F9CB48471E406AB700C92065 /* Objc-Bridge-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Objc-Bridge-Header.h"; sourceTree = "<group>"; };
F9DE053A1E3CCAE800902F7D /* CalendarConfigViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CalendarConfigViewController.swift; sourceTree = "<group>"; };
FA1B31882824AF86001860DC /* WorkTypeVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkTypeVC.swift; sourceTree = "<group>"; };
FA1B31892824AF86001860DC /* WorkTypeVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WorkTypeVC.xib; sourceTree = "<group>"; };
FA1B31912824B675001860DC /* WorkGroupVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkGroupVC.swift; sourceTree = "<group>"; };
FA1B31922824B675001860DC /* WorkGroupVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WorkGroupVC.xib; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -184,6 +192,7 @@
EE0954A91B97DDE0007F6964 /* FSCalendarSwiftExample */ = {
isa = PBXGroup;
children = (
FA1B318C2824B1FE001860DC /* WorkType */,
EE0954AC1B97DDE0007F6964 /* AppDelegate.swift */,
303478381DB520C8007BBD2E /* TableViewController.swift */,
F95394791F26BF07005B83E5 /* LunarFormatter.swift */,
Expand Down Expand Up @@ -221,6 +230,17 @@
path = FSCalendarSwiftExampleUITests;
sourceTree = "<group>";
};
FA1B318C2824B1FE001860DC /* WorkType */ = {
isa = PBXGroup;
children = (
FA1B31882824AF86001860DC /* WorkTypeVC.swift */,
FA1B31892824AF86001860DC /* WorkTypeVC.xib */,
FA1B31912824B675001860DC /* WorkGroupVC.swift */,
FA1B31922824B675001860DC /* WorkGroupVC.xib */,
);
name = WorkType;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -271,7 +291,7 @@
TargetAttributes = {
EE0954A61B97DDE0007F6964 = {
CreatedOnToolsVersion = 6.4;
DevelopmentTeam = HZF422TY46;
DevelopmentTeam = 9689HPSFXL;
LastSwiftMigration = 0900;
};
F9CB483C1E406A9200C92065 = {
Expand Down Expand Up @@ -309,6 +329,8 @@
buildActionMask = 2147483647;
files = (
EE0954B21B97DDE0007F6964 /* Main.storyboard in Resources */,
FA1B31942824B675001860DC /* WorkGroupVC.xib in Resources */,
FA1B318B2824AF86001860DC /* WorkTypeVC.xib in Resources */,
EE0954B71B97DDE0007F6964 /* LaunchScreen.xib in Resources */,
EE0954B41B97DDE0007F6964 /* Images.xcassets in Resources */,
);
Expand All @@ -329,6 +351,7 @@
buildActionMask = 2147483647;
files = (
F9DE053B1E3CCAE800902F7D /* CalendarConfigViewController.swift in Sources */,
FA1B31932824B675001860DC /* WorkGroupVC.swift in Sources */,
30F4C9441E07C3AD00D2EC4D /* FSCalendarExtensions.m in Sources */,
30F4C93D1E07C3AD00D2EC4D /* FSCalendarCalculator.m in Sources */,
30F4C9411E07C3AD00D2EC4D /* FSCalendarConstants.m in Sources */,
Expand All @@ -351,6 +374,7 @@
30D458E91DB4E2DB00B163C7 /* LoadViewExampleViewController.swift in Sources */,
30031AAA1DCEA83200FC34FE /* DIYCalendarCell.swift in Sources */,
EE0954AD1B97DDE0007F6964 /* AppDelegate.swift in Sources */,
FA1B318A2824AF86001860DC /* WorkTypeVC.swift in Sources */,
EE0954AF1B97DDE0007F6964 /* InterfaceBuilderViewController.swift in Sources */,
30F4C9421E07C3AD00D2EC4D /* FSCalendarDelegationFactory.m in Sources */,
);
Expand Down Expand Up @@ -498,9 +522,9 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = HZF422TY46;
DEVELOPMENT_TEAM = 9689HPSFXL;
INFOPLIST_FILE = "$(SRCROOT)/FSCalendarSwiftExample/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSCalendarSwiftExample;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -515,9 +539,9 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = HZF422TY46;
DEVELOPMENT_TEAM = 9689HPSFXL;
INFOPLIST_FILE = "$(SRCROOT)/FSCalendarSwiftExample/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.wenchaod.FSCalendarSwiftExample;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DIYExampleViewController: UIViewController, FSCalendarDataSource, FSCalend
view.backgroundColor = UIColor.groupTableViewBackground
self.view = view

let height: CGFloat = UIDevice.current.model.hasPrefix("iPad") ? 400 : 300
let height: CGFloat = UIDevice.current.model.hasPrefix("iPad") ? 600 : 500
let calendar = FSCalendar(frame: CGRect(x: 0, y: self.navigationController!.navigationBar.frame.maxY, width: view.frame.size.width, height: height))
calendar.dataSource = self
calendar.delegate = self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class DelegateAppearanceViewController: UIViewController, FSCalendarDataSource,
view.backgroundColor = UIColor.groupTableViewBackground
self.view = view

let height: CGFloat = UIDevice.current.model.hasPrefix("iPad") ? 450 : 300
let height: CGFloat = UIDevice.current.model.hasPrefix("iPad") ? 600 : 500
let calendar = FSCalendar(frame: CGRect(x:0, y:64, width:self.view.bounds.size.width, height:height))
calendar.dataSource = self
calendar.delegate = self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ class FSCalendarScopeExampleViewController: UIViewController, UITableViewDataSou
super.viewDidLoad()

if UIDevice.current.model.hasPrefix("iPad") {
self.calendarHeightConstraint.constant = 400
self.calendarHeightConstraint.constant = 600
} else {
self.calendarHeightConstraint.constant = 500
}

self.calendar.select(Date())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ class InterfaceBuilderViewController: UIViewController, FSCalendarDataSource, FS
super.viewDidLoad()

if UIDevice.current.model.hasPrefix("iPad") {
self.calendarHeightConstraint.constant = 400
self.calendarHeightConstraint.constant = 600
} else {
self.calendarHeightConstraint.constant = 500
}

self.calendar.appearance.caseOptions = [.headerUsesUpperCase,.weekdayUsesUpperCase]
Expand All @@ -87,6 +89,7 @@ class InterfaceBuilderViewController: UIViewController, FSCalendarDataSource, FS

// For UITest
self.calendar.accessibilityIdentifier = "calendar"
self.calendar.locale = Locale(identifier: "ko")

}

Expand Down
Loading