diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..dfe500f --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: [kharrison] diff --git a/AdaptType/AdaptType.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/AdaptType/AdaptType.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..330b13d --- /dev/null +++ b/AdaptType/AdaptType.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/AdaptType/AdaptType.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/AdaptType/AdaptType.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/AdaptType/AdaptType.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/AdaptivePopover/AdaptivePopover.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/AdaptivePopover/AdaptivePopover.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..997f1a0 --- /dev/null +++ b/AdaptivePopover/AdaptivePopover.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/AdaptivePopover/AdaptivePopover.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/AdaptivePopover/AdaptivePopover.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/AdaptivePopover/AdaptivePopover.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/AlertController/AlertController.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/AlertController/AlertController.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..00f2aca --- /dev/null +++ b/AlertController/AlertController.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/AlertController/AlertController.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/AlertController/AlertController.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/AlertController/AlertController.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/AllVisible/AllVisible.xcodeproj/project.pbxproj b/AllVisible/AllVisible.xcodeproj/project.pbxproj index 6c1007d..68c02d2 100644 --- a/AllVisible/AllVisible.xcodeproj/project.pbxproj +++ b/AllVisible/AllVisible.xcodeproj/project.pbxproj @@ -167,7 +167,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1120; + LastUpgradeCheck = 1340; ORGANIZATIONNAME = "Keith Harrison"; TargetAttributes = { 53AA2EB11DA2A957008EBF84 = { @@ -310,6 +310,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -335,7 +336,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -370,6 +371,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -389,7 +391,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; diff --git a/AllVisible/AllVisible.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/AllVisible/AllVisible.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..78219e1 --- /dev/null +++ b/AllVisible/AllVisible.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/AllVisible/AllVisible.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/AllVisible/AllVisible.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/AllVisible/AllVisible.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/AnimatedConstraints/AnimatedConstraints.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/AnimatedConstraints/AnimatedConstraints.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..729e605 --- /dev/null +++ b/AnimatedConstraints/AnimatedConstraints.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/AnimatedConstraints/AnimatedConstraints.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/AnimatedConstraints/AnimatedConstraints.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/AnimatedConstraints/AnimatedConstraints.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Archive/AirPrinter/AirPrinter.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Archive/AirPrinter/AirPrinter.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..ce2a0d9 --- /dev/null +++ b/Archive/AirPrinter/AirPrinter.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Archive/AirPrinter/AirPrinter.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Archive/AirPrinter/AirPrinter.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Archive/AirPrinter/AirPrinter.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Archive/AlertView/AlertView.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Archive/AlertView/AlertView.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..5fc5b6e --- /dev/null +++ b/Archive/AlertView/AlertView.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Archive/AlertView/AlertView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Archive/AlertView/AlertView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Archive/AlertView/AlertView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Archive/BUG TableView State Restore/restore.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Archive/BUG TableView State Restore/restore.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..948f33d --- /dev/null +++ b/Archive/BUG TableView State Restore/restore.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Archive/BUG TableView State Restore/restore.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Archive/BUG TableView State Restore/restore.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Archive/BUG TableView State Restore/restore.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Archive/Collection/Collection.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Archive/Collection/Collection.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..05bb496 --- /dev/null +++ b/Archive/Collection/Collection.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Archive/Collection/Collection.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Archive/Collection/Collection.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Archive/Collection/Collection.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Archive/MasterSlide/MasterSlide.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Archive/MasterSlide/MasterSlide.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..2c11c20 --- /dev/null +++ b/Archive/MasterSlide/MasterSlide.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Archive/MasterSlide/MasterSlide.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Archive/MasterSlide/MasterSlide.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Archive/MasterSlide/MasterSlide.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Archive/RemindMe/RemindMe.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Archive/RemindMe/RemindMe.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..7c537ff --- /dev/null +++ b/Archive/RemindMe/RemindMe.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,6 @@ + + + + + diff --git a/Archive/RemindMe/RemindMe.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Archive/RemindMe/RemindMe.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Archive/RemindMe/RemindMe.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Archive/StaticTable/StaticTable.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Archive/StaticTable/StaticTable.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..0502574 --- /dev/null +++ b/Archive/StaticTable/StaticTable.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Archive/StaticTable/StaticTable.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Archive/StaticTable/StaticTable.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Archive/StaticTable/StaticTable.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Archive/Stepper/Stepper.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Archive/Stepper/Stepper.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Archive/Stepper/Stepper.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Archive/Stepper/Stepper.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Archive/Stepper/Stepper.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Archive/Stepper/Stepper.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Archive/Styles/Styles.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Archive/Styles/Styles.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..a339ef4 --- /dev/null +++ b/Archive/Styles/Styles.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Archive/Styles/Styles.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Archive/Styles/Styles.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Archive/Styles/Styles.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Archive/SyncMe/SyncMe.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Archive/SyncMe/SyncMe.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..8ac9b61 --- /dev/null +++ b/Archive/SyncMe/SyncMe.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Archive/SyncMe/SyncMe.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Archive/SyncMe/SyncMe.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Archive/SyncMe/SyncMe.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Archive/TCNibLoad/TCNibLoad.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Archive/TCNibLoad/TCNibLoad.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..edc712f --- /dev/null +++ b/Archive/TCNibLoad/TCNibLoad.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Archive/TCNibLoad/TCNibLoad.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Archive/TCNibLoad/TCNibLoad.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Archive/TCNibLoad/TCNibLoad.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Archive/TaskTimer/TaskTimer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Archive/TaskTimer/TaskTimer.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..ef00988 --- /dev/null +++ b/Archive/TaskTimer/TaskTimer.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Archive/TaskTimer/TaskTimer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Archive/TaskTimer/TaskTimer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Archive/TaskTimer/TaskTimer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Archive/TwitterSearch/TwitterSearch.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Archive/TwitterSearch/TwitterSearch.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..82063ef --- /dev/null +++ b/Archive/TwitterSearch/TwitterSearch.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Archive/TwitterSearch/TwitterSearch.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Archive/TwitterSearch/TwitterSearch.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Archive/TwitterSearch/TwitterSearch.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/AutoLayout/AutoLayout.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/AutoLayout/AutoLayout.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..ea9b143 --- /dev/null +++ b/AutoLayout/AutoLayout.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/AutoLayout/AutoLayout.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/AutoLayout/AutoLayout.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/AutoLayout/AutoLayout.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/BlastOff/BlastOff.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/BlastOff/BlastOff.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..dc746e2 --- /dev/null +++ b/BlastOff/BlastOff.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/BlastOff/BlastOff.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/BlastOff/BlastOff.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/BlastOff/BlastOff.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Buttons/Buttons.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Buttons/Buttons.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..3f19229 --- /dev/null +++ b/Buttons/Buttons.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Buttons/Buttons.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Buttons/Buttons.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Buttons/Buttons.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Container/Container-SB/Container.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Container/Container-SB/Container.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..d8ef532 --- /dev/null +++ b/Container/Container-SB/Container.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Container/Container-SB/Container.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Container/Container-SB/Container.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Container/Container-SB/Container.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Container/Container-code/Container.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Container/Container-code/Container.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..d8ef532 --- /dev/null +++ b/Container/Container-code/Container.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Container/Container-code/Container.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Container/Container-code/Container.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Container/Container-code/Container.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/DarkTheme/DarkTheme.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DarkTheme/DarkTheme.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..c73bb89 --- /dev/null +++ b/DarkTheme/DarkTheme.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/DarkTheme/DarkTheme.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/DarkTheme/DarkTheme.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/DarkTheme/DarkTheme.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Designable/Designable.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Designable/Designable.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..31c29ea --- /dev/null +++ b/Designable/Designable.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Designable/Designable.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Designable/Designable.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Designable/Designable.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/DynamicContainer/DynamicContainer-v1/DynamicContainer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DynamicContainer/DynamicContainer-v1/DynamicContainer.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..e92800f --- /dev/null +++ b/DynamicContainer/DynamicContainer-v1/DynamicContainer.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/DynamicContainer/DynamicContainer-v1/DynamicContainer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/DynamicContainer/DynamicContainer-v1/DynamicContainer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/DynamicContainer/DynamicContainer-v1/DynamicContainer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/DynamicContainer/DynamicContainer-v2/DynamicContainer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DynamicContainer/DynamicContainer-v2/DynamicContainer.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..e92800f --- /dev/null +++ b/DynamicContainer/DynamicContainer-v2/DynamicContainer.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/DynamicContainer/DynamicContainer-v2/DynamicContainer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/DynamicContainer/DynamicContainer-v2/DynamicContainer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/DynamicContainer/DynamicContainer-v2/DynamicContainer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/DynamicText/DynamicText.xcodeproj/project.pbxproj b/DynamicText/DynamicText.xcodeproj/project.pbxproj index 8707dce..cf90168 100644 --- a/DynamicText/DynamicText.xcodeproj/project.pbxproj +++ b/DynamicText/DynamicText.xcodeproj/project.pbxproj @@ -9,14 +9,18 @@ /* Begin PBXBuildFile section */ 531B320A1861EFB6005F2332 /* UYLScaledTextStyleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 531B32091861EFB6005F2332 /* UYLScaledTextStyleViewController.m */; }; 53615D2F1F41B67900C7D904 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 53615D2D1F41B67900C7D904 /* LaunchScreen.storyboard */; }; - 5393B52E17F83CB600AD2292 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5393B52D17F83CB600AD2292 /* Foundation.framework */; }; - 5393B53017F83CB600AD2292 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5393B52F17F83CB600AD2292 /* CoreGraphics.framework */; }; - 5393B53217F83CB600AD2292 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5393B53117F83CB600AD2292 /* UIKit.framework */; }; - 5393B53817F83CB600AD2292 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5393B53617F83CB600AD2292 /* InfoPlist.strings */; }; - 5393B53A17F83CB600AD2292 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5393B53917F83CB600AD2292 /* main.m */; }; + 53855AB82655769D0033DD1E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53855AB72655769D0033DD1E /* AppDelegate.swift */; }; + 53855ABA2655769D0033DD1E /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53855AB92655769D0033DD1E /* SceneDelegate.swift */; }; + 53855ABC2655769D0033DD1E /* UYLTextStyleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53855ABB2655769D0033DD1E /* UYLTextStyleViewController.swift */; }; + 53855ACA265577880033DD1E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 53855AC9265577880033DD1E /* main.m */; }; + 53855AD026557D590033DD1E /* UYLScaledTextStyleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53855ACF26557D590033DD1E /* UYLScaledTextStyleViewController.swift */; }; + 53855AD3265581DE0033DD1E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 53855AD1265581DE0033DD1E /* Main.storyboard */; }; + 53855AD52655834B0033DD1E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 53855AD42655834B0033DD1E /* Assets.xcassets */; }; + 53855AD8265583680033DD1E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 53855AD6265583680033DD1E /* LaunchScreen.storyboard */; }; + 53855ADA2655AAA70033DD1E /* UIFont+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53855AD92655AAA70033DD1E /* UIFont+Extension.swift */; }; 5393B53E17F83CB600AD2292 /* UYLAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5393B53D17F83CB600AD2292 /* UYLAppDelegate.m */; }; 5393B54117F83CB600AD2292 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5393B53F17F83CB600AD2292 /* Main.storyboard */; }; - 5393B54617F83CB600AD2292 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5393B54517F83CB600AD2292 /* Images.xcassets */; }; + 5393B54617F83CB600AD2292 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5393B54517F83CB600AD2292 /* Assets.xcassets */; }; 5393B56417F83DB000AD2292 /* UYLTextStyleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5393B56317F83DB000AD2292 /* UYLTextStyleViewController.m */; }; 53FE524C1871CDB700DE5F24 /* UIFont+UYLScaledFont.m in Sources */ = {isa = PBXBuildFile; fileRef = 53FE524B1871CDB700DE5F24 /* UIFont+UYLScaledFont.m */; }; /* End PBXBuildFile section */ @@ -26,18 +30,26 @@ 531B32091861EFB6005F2332 /* UYLScaledTextStyleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UYLScaledTextStyleViewController.m; sourceTree = ""; }; 5325F8AD18020B0B0000A32A /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 53615D2E1F41B67900C7D904 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 53855AB52655769D0033DD1E /* DynamicTextSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DynamicTextSwift.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 53855AB72655769D0033DD1E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 53855AB92655769D0033DD1E /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 53855ABB2655769D0033DD1E /* UYLTextStyleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UYLTextStyleViewController.swift; sourceTree = ""; }; + 53855AC52655769E0033DD1E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 53855AC9265577880033DD1E /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 53855ACF26557D590033DD1E /* UYLScaledTextStyleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UYLScaledTextStyleViewController.swift; sourceTree = ""; }; + 53855AD2265581DE0033DD1E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 53855AD42655834B0033DD1E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 53855AD7265583680033DD1E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 53855AD92655AAA70033DD1E /* UIFont+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+Extension.swift"; sourceTree = ""; }; 5393B52A17F83CB600AD2292 /* DynamicText.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DynamicText.app; sourceTree = BUILT_PRODUCTS_DIR; }; 5393B52D17F83CB600AD2292 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 5393B52F17F83CB600AD2292 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 5393B53117F83CB600AD2292 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 5393B53517F83CB600AD2292 /* DynamicText-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "DynamicText-Info.plist"; sourceTree = ""; }; - 5393B53717F83CB600AD2292 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 5393B53917F83CB600AD2292 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 5393B53B17F83CB600AD2292 /* DynamicText-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "DynamicText-Prefix.pch"; sourceTree = ""; }; + 5393B53517F83CB600AD2292 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5393B53C17F83CB600AD2292 /* UYLAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UYLAppDelegate.h; sourceTree = ""; }; 5393B53D17F83CB600AD2292 /* UYLAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UYLAppDelegate.m; sourceTree = ""; }; 5393B54017F83CB600AD2292 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 5393B54517F83CB600AD2292 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 5393B54517F83CB600AD2292 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 5393B54C17F83CB600AD2292 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 5393B56217F83DB000AD2292 /* UYLTextStyleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UYLTextStyleViewController.h; sourceTree = ""; }; 5393B56317F83DB000AD2292 /* UYLTextStyleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UYLTextStyleViewController.m; sourceTree = ""; }; @@ -46,24 +58,45 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 53855AB22655769D0033DD1E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 5393B52717F83CB600AD2292 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5393B53017F83CB600AD2292 /* CoreGraphics.framework in Frameworks */, - 5393B53217F83CB600AD2292 /* UIKit.framework in Frameworks */, - 5393B52E17F83CB600AD2292 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 53855AB62655769D0033DD1E /* DynamicTextSwift */ = { + isa = PBXGroup; + children = ( + 53855AD42655834B0033DD1E /* Assets.xcassets */, + 53855AD1265581DE0033DD1E /* Main.storyboard */, + 53855AD6265583680033DD1E /* LaunchScreen.storyboard */, + 53855AB72655769D0033DD1E /* AppDelegate.swift */, + 53855AB92655769D0033DD1E /* SceneDelegate.swift */, + 53855ABB2655769D0033DD1E /* UYLTextStyleViewController.swift */, + 53855ACF26557D590033DD1E /* UYLScaledTextStyleViewController.swift */, + 53855AD92655AAA70033DD1E /* UIFont+Extension.swift */, + 53855AC52655769E0033DD1E /* Info.plist */, + ); + path = DynamicTextSwift; + sourceTree = ""; + }; 5393B52117F83CB600AD2292 = { isa = PBXGroup; children = ( 5325F8AD18020B0B0000A32A /* README.md */, 5393B53317F83CB600AD2292 /* DynamicText */, + 53855AB62655769D0033DD1E /* DynamicTextSwift */, 5393B52C17F83CB600AD2292 /* Frameworks */, 5393B52B17F83CB600AD2292 /* Products */, ); @@ -73,6 +106,7 @@ isa = PBXGroup; children = ( 5393B52A17F83CB600AD2292 /* DynamicText.app */, + 53855AB52655769D0033DD1E /* DynamicTextSwift.app */, ); name = Products; sourceTree = ""; @@ -91,6 +125,7 @@ 5393B53317F83CB600AD2292 /* DynamicText */ = { isa = PBXGroup; children = ( + 5393B53F17F83CB600AD2292 /* Main.storyboard */, 5393B53C17F83CB600AD2292 /* UYLAppDelegate.h */, 5393B53D17F83CB600AD2292 /* UYLAppDelegate.m */, 5393B56217F83DB000AD2292 /* UYLTextStyleViewController.h */, @@ -99,9 +134,8 @@ 531B32091861EFB6005F2332 /* UYLScaledTextStyleViewController.m */, 53FE524A1871CDB700DE5F24 /* UIFont+UYLScaledFont.h */, 53FE524B1871CDB700DE5F24 /* UIFont+UYLScaledFont.m */, - 5393B53F17F83CB600AD2292 /* Main.storyboard */, + 5393B54517F83CB600AD2292 /* Assets.xcassets */, 53615D2D1F41B67900C7D904 /* LaunchScreen.storyboard */, - 5393B54517F83CB600AD2292 /* Images.xcassets */, 5393B53417F83CB600AD2292 /* Supporting Files */, ); path = DynamicText; @@ -110,10 +144,8 @@ 5393B53417F83CB600AD2292 /* Supporting Files */ = { isa = PBXGroup; children = ( - 5393B53517F83CB600AD2292 /* DynamicText-Info.plist */, - 5393B53617F83CB600AD2292 /* InfoPlist.strings */, - 5393B53917F83CB600AD2292 /* main.m */, - 5393B53B17F83CB600AD2292 /* DynamicText-Prefix.pch */, + 53855AC9265577880033DD1E /* main.m */, + 5393B53517F83CB600AD2292 /* Info.plist */, ); name = "Supporting Files"; sourceTree = ""; @@ -121,6 +153,23 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 53855AB42655769D0033DD1E /* DynamicTextSwift */ = { + isa = PBXNativeTarget; + buildConfigurationList = 53855AC62655769E0033DD1E /* Build configuration list for PBXNativeTarget "DynamicTextSwift" */; + buildPhases = ( + 53855AB12655769D0033DD1E /* Sources */, + 53855AB22655769D0033DD1E /* Frameworks */, + 53855AB32655769D0033DD1E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DynamicTextSwift; + productName = DynamicTextSwift; + productReference = 53855AB52655769D0033DD1E /* DynamicTextSwift.app */; + productType = "com.apple.product-type.application"; + }; 5393B52917F83CB600AD2292 /* DynamicText */ = { isa = PBXNativeTarget; buildConfigurationList = 5393B55C17F83CB600AD2292 /* Build configuration list for PBXNativeTarget "DynamicText" */; @@ -145,8 +194,14 @@ isa = PBXProject; attributes = { CLASSPREFIX = UYL; - LastUpgradeCheck = 1120; + LastSwiftUpdateCheck = 1250; + LastUpgradeCheck = 1250; ORGANIZATIONNAME = "Keith Harrison"; + TargetAttributes = { + 53855AB42655769D0033DD1E = { + CreatedOnToolsVersion = 12.5; + }; + }; }; buildConfigurationList = 5393B52517F83CB600AD2292 /* Build configuration list for PBXProject "DynamicText" */; compatibilityVersion = "Xcode 11.0"; @@ -162,18 +217,28 @@ projectRoot = ""; targets = ( 5393B52917F83CB600AD2292 /* DynamicText */, + 53855AB42655769D0033DD1E /* DynamicTextSwift */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 53855AB32655769D0033DD1E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 53855AD8265583680033DD1E /* LaunchScreen.storyboard in Resources */, + 53855AD52655834B0033DD1E /* Assets.xcassets in Resources */, + 53855AD3265581DE0033DD1E /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 5393B52817F83CB600AD2292 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5393B54617F83CB600AD2292 /* Images.xcassets in Resources */, + 5393B54617F83CB600AD2292 /* Assets.xcassets in Resources */, 53615D2F1F41B67900C7D904 /* LaunchScreen.storyboard in Resources */, - 5393B53817F83CB600AD2292 /* InfoPlist.strings in Resources */, 5393B54117F83CB600AD2292 /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -181,11 +246,23 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 53855AB12655769D0033DD1E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 53855AD026557D590033DD1E /* UYLScaledTextStyleViewController.swift in Sources */, + 53855ABC2655769D0033DD1E /* UYLTextStyleViewController.swift in Sources */, + 53855AB82655769D0033DD1E /* AppDelegate.swift in Sources */, + 53855ADA2655AAA70033DD1E /* UIFont+Extension.swift in Sources */, + 53855ABA2655769D0033DD1E /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 5393B52617F83CB600AD2292 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5393B53A17F83CB600AD2292 /* main.m in Sources */, + 53855ACA265577880033DD1E /* main.m in Sources */, 5393B56417F83DB000AD2292 /* UYLTextStyleViewController.m in Sources */, 5393B53E17F83CB600AD2292 /* UYLAppDelegate.m in Sources */, 53FE524C1871CDB700DE5F24 /* UIFont+UYLScaledFont.m in Sources */, @@ -204,12 +281,20 @@ name = LaunchScreen.storyboard; sourceTree = ""; }; - 5393B53617F83CB600AD2292 /* InfoPlist.strings */ = { + 53855AD1265581DE0033DD1E /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 53855AD2265581DE0033DD1E /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 53855AD6265583680033DD1E /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( - 5393B53717F83CB600AD2292 /* en */, + 53855AD7265583680033DD1E /* Base */, ); - name = InfoPlist.strings; + name = LaunchScreen.storyboard; sourceTree = ""; }; 5393B53F17F83CB600AD2292 /* Main.storyboard */ = { @@ -223,6 +308,73 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 53855AC72655769E0033DD1E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = LCC2J94N44; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = DynamicTextSwift/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.5; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.useyourloaf.DynamicTextSwift; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 53855AC82655769E0033DD1E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = LCC2J94N44; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = DynamicTextSwift/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.5; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.useyourloaf.DynamicTextSwift; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; 5393B55A17F83CB600AD2292 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -246,6 +398,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -299,6 +452,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -326,12 +480,12 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = 1.3; + CURRENT_PROJECT_VERSION = 1.4; DEVELOPMENT_TEAM = LCC2J94N44; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "DynamicText/DynamicText-Prefix.pch"; - INFOPLIST_FILE = "DynamicText/DynamicText-Info.plist"; - MARKETING_VERSION = 1.3; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = DynamicText/Info.plist; + MARKETING_VERSION = 1.4; PRODUCT_BUNDLE_IDENTIFIER = "com.useyourloaf.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; @@ -343,12 +497,12 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = 1.3; + CURRENT_PROJECT_VERSION = 1.4; DEVELOPMENT_TEAM = LCC2J94N44; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "DynamicText/DynamicText-Prefix.pch"; - INFOPLIST_FILE = "DynamicText/DynamicText-Info.plist"; - MARKETING_VERSION = 1.3; + GCC_PREFIX_HEADER = ""; + INFOPLIST_FILE = DynamicText/Info.plist; + MARKETING_VERSION = 1.4; PRODUCT_BUNDLE_IDENTIFIER = "com.useyourloaf.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; @@ -359,6 +513,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 53855AC62655769E0033DD1E /* Build configuration list for PBXNativeTarget "DynamicTextSwift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 53855AC72655769E0033DD1E /* Debug */, + 53855AC82655769E0033DD1E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 5393B52517F83CB600AD2292 /* Build configuration list for PBXProject "DynamicText" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/DynamicText/DynamicText.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DynamicText/DynamicText.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..0f1a28d --- /dev/null +++ b/DynamicText/DynamicText.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/DynamicText/DynamicText.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/DynamicText/DynamicText.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/DynamicText/DynamicText.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/DynamicText/DynamicText/Assets.xcassets/AccentColor.colorset/Contents.json b/DynamicText/DynamicText/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..22c4bb0 --- /dev/null +++ b/DynamicText/DynamicText/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "1.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "1.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/Contents.json b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/Contents.json rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-1024.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-1024.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-1024.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-1024.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-120.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-120.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-120.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-120.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-167.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-167.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-167.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-167.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-180.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-180.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-180.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-180.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-20.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-20.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-20.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-20.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-29.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-29.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-29.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-29.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-29@2x-1.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-29@2x-1.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-29@2x-1.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-29@2x-1.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-29@2x.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-29@2x.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-29@3x.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-29@3x.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-40.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-40.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-40.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-40.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-40@2x-1.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-40@2x-1.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-40@2x-1.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-40@2x-1.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-40@2x.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-40@2x.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-41.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-41.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-41.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-41.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-42.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-42.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-42.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-42.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-60.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-60.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-60.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-60.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-60@2x.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-60@2x.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-76.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-76.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-76.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-76.png diff --git a/DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-76@2x.png b/DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/AppIcon.appiconset/icon-76@2x.png rename to DynamicText/DynamicText/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png diff --git a/DynamicText/DynamicText/Assets.xcassets/Contents.json b/DynamicText/DynamicText/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/DynamicText/DynamicText/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DynamicText/DynamicText/Images.xcassets/Tab Bar/First.imageset/Contents.json b/DynamicText/DynamicText/Assets.xcassets/Tab Bar/First.imageset/Contents.json similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/Tab Bar/First.imageset/Contents.json rename to DynamicText/DynamicText/Assets.xcassets/Tab Bar/First.imageset/Contents.json diff --git a/DynamicText/DynamicText/Images.xcassets/Tab Bar/First.imageset/first30.png b/DynamicText/DynamicText/Assets.xcassets/Tab Bar/First.imageset/first30.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/Tab Bar/First.imageset/first30.png rename to DynamicText/DynamicText/Assets.xcassets/Tab Bar/First.imageset/first30.png diff --git a/DynamicText/DynamicText/Images.xcassets/Tab Bar/First.imageset/first60.png b/DynamicText/DynamicText/Assets.xcassets/Tab Bar/First.imageset/first60.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/Tab Bar/First.imageset/first60.png rename to DynamicText/DynamicText/Assets.xcassets/Tab Bar/First.imageset/first60.png diff --git a/DynamicText/DynamicText/Images.xcassets/Tab Bar/First.imageset/first90.png b/DynamicText/DynamicText/Assets.xcassets/Tab Bar/First.imageset/first90.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/Tab Bar/First.imageset/first90.png rename to DynamicText/DynamicText/Assets.xcassets/Tab Bar/First.imageset/first90.png diff --git a/DynamicText/DynamicText/Images.xcassets/Tab Bar/Second.imageset/Contents.json b/DynamicText/DynamicText/Assets.xcassets/Tab Bar/Second.imageset/Contents.json similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/Tab Bar/Second.imageset/Contents.json rename to DynamicText/DynamicText/Assets.xcassets/Tab Bar/Second.imageset/Contents.json diff --git a/DynamicText/DynamicText/Images.xcassets/Tab Bar/Second.imageset/second30.png b/DynamicText/DynamicText/Assets.xcassets/Tab Bar/Second.imageset/second30.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/Tab Bar/Second.imageset/second30.png rename to DynamicText/DynamicText/Assets.xcassets/Tab Bar/Second.imageset/second30.png diff --git a/DynamicText/DynamicText/Images.xcassets/Tab Bar/Second.imageset/second60.png b/DynamicText/DynamicText/Assets.xcassets/Tab Bar/Second.imageset/second60.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/Tab Bar/Second.imageset/second60.png rename to DynamicText/DynamicText/Assets.xcassets/Tab Bar/Second.imageset/second60.png diff --git a/DynamicText/DynamicText/Images.xcassets/Tab Bar/Second.imageset/second90.png b/DynamicText/DynamicText/Assets.xcassets/Tab Bar/Second.imageset/second90.png similarity index 100% rename from DynamicText/DynamicText/Images.xcassets/Tab Bar/Second.imageset/second90.png rename to DynamicText/DynamicText/Assets.xcassets/Tab Bar/Second.imageset/second90.png diff --git a/DynamicText/DynamicText/Base.lproj/LaunchScreen.storyboard b/DynamicText/DynamicText/Base.lproj/LaunchScreen.storyboard index f746012..e16eba7 100644 --- a/DynamicText/DynamicText/Base.lproj/LaunchScreen.storyboard +++ b/DynamicText/DynamicText/Base.lproj/LaunchScreen.storyboard @@ -1,15 +1,14 @@ - - - - + + - + + - + @@ -18,18 +17,17 @@ - + - + - - + - + @@ -38,16 +36,15 @@ - + - + - - + @@ -61,17 +58,58 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DynamicText/DynamicText/Base.lproj/Main.storyboard b/DynamicText/DynamicText/Base.lproj/Main.storyboard index f069627..2606c66 100644 --- a/DynamicText/DynamicText/Base.lproj/Main.storyboard +++ b/DynamicText/DynamicText/Base.lproj/Main.storyboard @@ -1,200 +1,260 @@ - + - + + + + - + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - - - - - - - - - - - - - - - - - - - - + + + + - - + - - - - - - - + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - - - - - - - - - - - - - - - - - - - - + + + + - - + + - + + + + + + + + + + + + + - + @@ -208,17 +268,58 @@ - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DynamicText/DynamicText/DynamicText-Prefix.pch b/DynamicText/DynamicText/DynamicText-Prefix.pch deleted file mode 100644 index 82a2bb4..0000000 --- a/DynamicText/DynamicText/DynamicText-Prefix.pch +++ /dev/null @@ -1,16 +0,0 @@ -// -// Prefix header -// -// The contents of this file are implicitly included at the beginning of every source file. -// - -#import - -#ifndef __IPHONE_5_0 -#warning "This project uses features only available in iOS SDK 5.0 and later." -#endif - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/DynamicText/DynamicText/Images.xcassets/Contents.json b/DynamicText/DynamicText/Images.xcassets/Contents.json deleted file mode 100644 index da4a164..0000000 --- a/DynamicText/DynamicText/Images.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/DynamicText/DynamicText/DynamicText-Info.plist b/DynamicText/DynamicText/Info.plist similarity index 100% rename from DynamicText/DynamicText/DynamicText-Info.plist rename to DynamicText/DynamicText/Info.plist diff --git a/DynamicText/DynamicText/UIFont+UYLScaledFont.h b/DynamicText/DynamicText/UIFont+UYLScaledFont.h index 3dc52dd..3704d97 100644 --- a/DynamicText/DynamicText/UIFont+UYLScaledFont.h +++ b/DynamicText/DynamicText/UIFont+UYLScaledFont.h @@ -1,9 +1,4 @@ -// -// UIFont+UYLScaledFont.h -// DynamicText -// -// Created by Keith Harrison http://useyourloaf.com -// Copyright (c) 2013 Keith Harrison. All rights reserved. +// Copyright (c) 2013-2021 Keith Harrison. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: @@ -31,11 +26,11 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#import +@import UIKit; @interface UIFont (UYLScaledFont) -// +uylPreferredFontForTextStyle:scale: +// +preferredFontForTextStyle:scale: // // Return a UIFont object for the specified text style that is scaled by the // speficied scale factor. @@ -45,6 +40,6 @@ // The scaleFactor modifies the default point size of the text style. So for // a font that is twice the default size specify a scaleFactor of 2.0. -+ (UIFont *)uylPreferredFontForTextStyle:(NSString *)style scale:(CGFloat)scaleFactor; ++ (UIFont *)preferredFontForTextStyle:(NSString *)style scale:(CGFloat)scaleFactor; @end diff --git a/DynamicText/DynamicText/UIFont+UYLScaledFont.m b/DynamicText/DynamicText/UIFont+UYLScaledFont.m index 0efddd2..781264b 100644 --- a/DynamicText/DynamicText/UIFont+UYLScaledFont.m +++ b/DynamicText/DynamicText/UIFont+UYLScaledFont.m @@ -1,9 +1,4 @@ -// -// UIFont+UYLScaledFont.m -// DynamicText -// -// Created by Keith Harrison http://useyourloaf.com -// Copyright (c) 2013 Keith Harrison. All rights reserved. +// Copyright (c) 2013-2021 Keith Harrison. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: @@ -35,12 +30,10 @@ @implementation UIFont (UYLScaledFont) -+ (UIFont *)uylPreferredFontForTextStyle:(NSString *)style scale:(CGFloat)scaleFactor ++ (UIFont *)preferredFontForTextStyle:(NSString *)style scale:(CGFloat)scaleFactor { - UIFontDescriptor *descriptor = [UIFontDescriptor preferredFontDescriptorWithTextStyle:style]; - CGFloat pointSize = descriptor.pointSize * scaleFactor; - UIFont *font = [UIFont fontWithDescriptor:descriptor size:pointSize]; - return font; + UIFont *font = [UIFont preferredFontForTextStyle:style]; + return [font fontWithSize:font.pointSize * scaleFactor]; } @end diff --git a/DynamicText/DynamicText/UYLAppDelegate.h b/DynamicText/DynamicText/UYLAppDelegate.h index 5efc6de..920cfe0 100644 --- a/DynamicText/DynamicText/UYLAppDelegate.h +++ b/DynamicText/DynamicText/UYLAppDelegate.h @@ -1,9 +1,4 @@ -// -// UYLAppDelegate.h -// DynamicText -// -// Created by Keith Harrison http://useyourloaf.com -// Copyright (c) 2013 Keith Harrison. All rights reserved. +// Copyright (c) 2013-2021 Keith Harrison. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: @@ -31,10 +26,8 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#import +@import UIKit; @interface UYLAppDelegate : UIResponder - @property (strong, nonatomic) UIWindow *window; - @end diff --git a/DynamicText/DynamicText/UYLAppDelegate.m b/DynamicText/DynamicText/UYLAppDelegate.m index 59ba911..5a307a4 100644 --- a/DynamicText/DynamicText/UYLAppDelegate.m +++ b/DynamicText/DynamicText/UYLAppDelegate.m @@ -1,9 +1,4 @@ -// -// UYLAppDelegate.m -// DynamicText -// -// Created by Keith Harrison http://useyourloaf.com -// Copyright (c) 2013 Keith Harrison. All rights reserved. +// Copyright (c) 2013-2021 Keith Harrison. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: @@ -33,5 +28,4 @@ #import "UYLAppDelegate.h" @implementation UYLAppDelegate - -@end \ No newline at end of file +@end diff --git a/DynamicText/DynamicText/UYLScaledTextStyleViewController.h b/DynamicText/DynamicText/UYLScaledTextStyleViewController.h index 3c408b4..986a63c 100644 --- a/DynamicText/DynamicText/UYLScaledTextStyleViewController.h +++ b/DynamicText/DynamicText/UYLScaledTextStyleViewController.h @@ -1,13 +1,32 @@ +// Copyright © 2021 Keith Harrison. All rights reserved. // -// UYLScaledTextStyleViewController.h -// DynamicText +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: // -// Created by Keith Harrison on 18/12/2013. -// Copyright (c) 2013 Keith Harrison. All rights reserved. +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. // +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. -#import "UYLTextStyleViewController.h" - -@interface UYLScaledTextStyleViewController : UYLTextStyleViewController +@import UIKit; +@interface UYLScaledTextStyleViewController : UIViewController @end diff --git a/DynamicText/DynamicText/UYLScaledTextStyleViewController.m b/DynamicText/DynamicText/UYLScaledTextStyleViewController.m index 5214e5e..b706e52 100644 --- a/DynamicText/DynamicText/UYLScaledTextStyleViewController.m +++ b/DynamicText/DynamicText/UYLScaledTextStyleViewController.m @@ -9,22 +9,56 @@ #import "UYLScaledTextStyleViewController.h" #import "UIFont+UYLScaledFont.h" +@interface UYLScaledTextStyleViewController () +@property (strong, nonatomic) IBOutletCollection(UILabel) NSArray *allLabels; + +@property (weak, nonatomic) IBOutlet UILabel *title1Label; +@property (weak, nonatomic) IBOutlet UILabel *title2Label; +@property (weak, nonatomic) IBOutlet UILabel *title3Label; +@property (weak, nonatomic) IBOutlet UILabel *headlineLabel; +@property (weak, nonatomic) IBOutlet UILabel *subheadLabel; +@property (weak, nonatomic) IBOutlet UILabel *bodyLabel; +@property (weak, nonatomic) IBOutlet UILabel *calloutLabel; +@property (weak, nonatomic) IBOutlet UILabel *footnoteLabel; +@property (weak, nonatomic) IBOutlet UILabel *caption1Label; +@property (weak, nonatomic) IBOutlet UILabel *caption2Label; +@end + @implementation UYLScaledTextStyleViewController #pragma mark - #pragma mark === View Life Cycle === #pragma mark - -- (void)configureView -{ +- (void)viewDidLoad { + [super viewDidLoad]; + [self configureView]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateTextStyles:) + name:UIContentSizeCategoryDidChangeNotification + object:nil]; +} + +- (void)configureView { CGFloat scaleFactor = 2.0; - self.textSizeLabel.text = [[UIApplication sharedApplication] preferredContentSizeCategory]; - self.headlineLabel.font = [UIFont uylPreferredFontForTextStyle:UIFontTextStyleHeadline scale:scaleFactor]; - self.subheadLabel.font = [UIFont uylPreferredFontForTextStyle:UIFontTextStyleSubheadline scale:scaleFactor]; - self.bodyLabel.font = [UIFont uylPreferredFontForTextStyle:UIFontTextStyleBody scale:scaleFactor]; - self.caption1Label.font = [UIFont uylPreferredFontForTextStyle:UIFontTextStyleCaption1 scale:scaleFactor]; - self.caption2Label.font = [UIFont uylPreferredFontForTextStyle:UIFontTextStyleCaption2 scale:scaleFactor]; - self.footnoteLabel.font = [UIFont uylPreferredFontForTextStyle:UIFontTextStyleFootnote scale:scaleFactor]; + + self.title1Label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleTitle1 scale:scaleFactor]; + self.title2Label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleTitle2 scale:scaleFactor]; + self.title3Label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleTitle3 scale:scaleFactor]; + self.headlineLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline scale:scaleFactor]; + self.subheadLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline scale:scaleFactor]; + self.bodyLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody scale:scaleFactor]; + self.calloutLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleCallout scale:scaleFactor]; + self.footnoteLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleFootnote scale:scaleFactor]; + self.caption1Label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleCaption1 scale:scaleFactor]; + self.caption2Label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleCaption2 scale:scaleFactor]; } +#pragma mark - +#pragma mark === Notification Methods === +#pragma mark - + +- (void)updateTextStyles:(NSNotification *)notification { + [self configureView]; +} @end diff --git a/DynamicText/DynamicText/UYLTextStyleViewController.h b/DynamicText/DynamicText/UYLTextStyleViewController.h index 88bbcef..6c64a99 100644 --- a/DynamicText/DynamicText/UYLTextStyleViewController.h +++ b/DynamicText/DynamicText/UYLTextStyleViewController.h @@ -1,9 +1,4 @@ -// -// UYLTableViewController.h -// DynamicText -// -// Created by Keith Harrison http://useyourloaf.com -// Copyright (c) 2013 Keith Harrison. All rights reserved. +// Copyright (c) 2013-2021 Keith Harrison. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: @@ -30,17 +25,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import +@import UIKit; @interface UYLTextStyleViewController : UIViewController - -@property (weak, nonatomic) IBOutlet UILabel *textSizeLabel; -@property (weak, nonatomic) IBOutlet UILabel *headlineLabel; -@property (weak, nonatomic) IBOutlet UILabel *subheadLabel; -@property (weak, nonatomic) IBOutlet UILabel *bodyLabel; -@property (weak, nonatomic) IBOutlet UILabel *caption1Label; -@property (weak, nonatomic) IBOutlet UILabel *caption2Label; -@property (weak, nonatomic) IBOutlet UILabel *footnoteLabel; - @end diff --git a/DynamicText/DynamicText/UYLTextStyleViewController.m b/DynamicText/DynamicText/UYLTextStyleViewController.m index 6871248..98b752d 100644 --- a/DynamicText/DynamicText/UYLTextStyleViewController.m +++ b/DynamicText/DynamicText/UYLTextStyleViewController.m @@ -1,77 +1,83 @@ +// Copyright © 2013-2021 Keith Harrison. All rights reserved. // -// UYLTableViewController.m -// DynamicText +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: // -// Created by Keith Harrison http://useyourloaf.com -// Copyright (c) 2013 Keith Harrison. All rights reserved. +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. // -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. // -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. // -// Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// Neither the name of Keith Harrison nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ''AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. #import "UYLTextStyleViewController.h" +@interface UYLTextStyleViewController () +@property (strong, nonatomic) IBOutletCollection(UILabel) NSArray *allLabels; + +@property (weak, nonatomic) IBOutlet UILabel *title1Label; +@property (weak, nonatomic) IBOutlet UILabel *title2Label; +@property (weak, nonatomic) IBOutlet UILabel *title3Label; +@property (weak, nonatomic) IBOutlet UILabel *headlineLabel; +@property (weak, nonatomic) IBOutlet UILabel *subheadLabel; +@property (weak, nonatomic) IBOutlet UILabel *bodyLabel; +@property (weak, nonatomic) IBOutlet UILabel *calloutLabel; +@property (weak, nonatomic) IBOutlet UILabel *footnoteLabel; +@property (weak, nonatomic) IBOutlet UILabel *caption1Label; +@property (weak, nonatomic) IBOutlet UILabel *caption2Label; +@end + @implementation UYLTextStyleViewController #pragma mark - #pragma mark === View Life Cycle === #pragma mark - -- (void)viewDidLoad -{ - [super viewDidLoad]; - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(didChangePreferredContentSize:) - name:UIContentSizeCategoryDidChangeNotification - object:nil]; +- (void)viewDidLoad { + [super viewDidLoad]; + if (@available(iOS 10, *)) { + for (UILabel *label in self.allLabels) { + label.adjustsFontForContentSizeCategory = YES; + } + } else { + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(updateTextStyles:) + name:UIContentSizeCategoryDidChangeNotification + object:nil]; + } } -- (void)viewDidAppear:(BOOL)animated -{ - [super viewDidAppear:animated]; - [self configureView]; -} +#pragma mark - +#pragma mark === Notification Methods === +#pragma mark - -- (void)configureView -{ - self.textSizeLabel.text = [[UIApplication sharedApplication] preferredContentSizeCategory]; +- (void)updateTextStyles:(NSNotification *)notification { + self.title1Label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleTitle1]; + self.title2Label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleTitle2]; + self.title3Label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleTitle3]; self.headlineLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline]; self.subheadLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline]; self.bodyLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody]; + self.calloutLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleCallout]; + self.footnoteLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleFootnote]; self.caption1Label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleCaption1]; self.caption2Label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleCaption2]; - self.footnoteLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleFootnote]; -} - -#pragma mark - -#pragma mark === Notification Methods === -#pragma mark - - -- (void)didChangePreferredContentSize:(NSNotification *)notification -{ - [self configureView]; } @end diff --git a/DynamicText/DynamicText/en.lproj/InfoPlist.strings b/DynamicText/DynamicText/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28f..0000000 --- a/DynamicText/DynamicText/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/DynamicText/DynamicText/main.m b/DynamicText/DynamicText/main.m index 94553a1..0530728 100644 --- a/DynamicText/DynamicText/main.m +++ b/DynamicText/DynamicText/main.m @@ -1,9 +1,4 @@ -// -// main.m -// DynamicText -// -// Created by Keith Harrison http://useyourloaf.com -// Copyright (c) 2013 Keith Harrison. All rights reserved. +// Copyright (c) 2013-2021 Keith Harrison. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: diff --git a/ScaledFont/ScaledFont/AppDelegate.swift b/DynamicText/DynamicTextSwift/AppDelegate.swift similarity index 90% rename from ScaledFont/ScaledFont/AppDelegate.swift rename to DynamicText/DynamicTextSwift/AppDelegate.swift index 6420758..972061e 100644 --- a/ScaledFont/ScaledFont/AppDelegate.swift +++ b/DynamicText/DynamicTextSwift/AppDelegate.swift @@ -1,5 +1,4 @@ -// Created by Keith Harrison https://useyourloaf.com -// Copyright (c) 2017 Keith Harrison. All rights reserved. +// Copyright © 2021 Keith Harrison. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: @@ -29,7 +28,6 @@ import UIKit -@UIApplicationMain +@main class AppDelegate: UIResponder, UIApplicationDelegate { - var window: UIWindow? } diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AccentColor.colorset/Contents.json b/DynamicText/DynamicTextSwift/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..9b711cb --- /dev/null +++ b/DynamicText/DynamicTextSwift/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,15 @@ +{ + "colors" : [ + { + "color" : { + "platform" : "ios", + "reference" : "systemBlueColor" + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ScaledFont/ScaledFont/Assets.xcassets/AppIcon.appiconset/Contents.json b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 71% rename from ScaledFont/ScaledFont/Assets.xcassets/AppIcon.appiconset/Contents.json rename to DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/Contents.json index d8db8d6..1120389 100644 --- a/ScaledFont/ScaledFont/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,93 +1,111 @@ { "images" : [ { - "idiom" : "iphone", "size" : "20x20", + "idiom" : "iphone", + "filename" : "icon-40.png", "scale" : "2x" }, { - "idiom" : "iphone", "size" : "20x20", + "idiom" : "iphone", + "filename" : "icon-60.png", "scale" : "3x" }, { - "idiom" : "iphone", "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29@2x.png", "scale" : "2x" }, { - "idiom" : "iphone", "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29@3x.png", "scale" : "3x" }, { - "idiom" : "iphone", "size" : "40x40", + "idiom" : "iphone", + "filename" : "icon-40@2x.png", "scale" : "2x" }, { - "idiom" : "iphone", "size" : "40x40", + "idiom" : "iphone", + "filename" : "icon-120.png", "scale" : "3x" }, { - "idiom" : "iphone", "size" : "60x60", + "idiom" : "iphone", + "filename" : "icon-60@2x.png", "scale" : "2x" }, { - "idiom" : "iphone", "size" : "60x60", + "idiom" : "iphone", + "filename" : "icon-180.png", "scale" : "3x" }, { - "idiom" : "ipad", "size" : "20x20", + "idiom" : "ipad", + "filename" : "icon-20.png", "scale" : "1x" }, { - "idiom" : "ipad", "size" : "20x20", + "idiom" : "ipad", + "filename" : "icon-41.png", "scale" : "2x" }, { - "idiom" : "ipad", "size" : "29x29", + "idiom" : "ipad", + "filename" : "icon-29.png", "scale" : "1x" }, { - "idiom" : "ipad", "size" : "29x29", + "idiom" : "ipad", + "filename" : "icon-29@2x-1.png", "scale" : "2x" }, { - "idiom" : "ipad", "size" : "40x40", + "idiom" : "ipad", + "filename" : "icon-42.png", "scale" : "1x" }, { - "idiom" : "ipad", "size" : "40x40", + "idiom" : "ipad", + "filename" : "icon-40@2x-1.png", "scale" : "2x" }, { - "idiom" : "ipad", "size" : "76x76", + "idiom" : "ipad", + "filename" : "icon-76.png", "scale" : "1x" }, { - "idiom" : "ipad", "size" : "76x76", + "idiom" : "ipad", + "filename" : "icon-76@2x.png", "scale" : "2x" }, { - "idiom" : "ipad", "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "icon-167.png", "scale" : "2x" }, { - "idiom" : "ios-marketing", "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "icon-1024.png", "scale" : "1x" } ], diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-1024.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-1024.png new file mode 100644 index 0000000..4a1a9de Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-1024.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-120.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-120.png new file mode 100644 index 0000000..d4b42eb Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-120.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-167.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-167.png new file mode 100644 index 0000000..0a5ec66 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-167.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-180.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-180.png new file mode 100644 index 0000000..e943cc3 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-180.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-20.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-20.png new file mode 100644 index 0000000..3c16adf Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-20.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-29.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-29.png new file mode 100644 index 0000000..b918cea Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-29.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-29@2x-1.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-29@2x-1.png new file mode 100644 index 0000000..3c599a5 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-29@2x-1.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png new file mode 100644 index 0000000..7759c83 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png new file mode 100644 index 0000000..f32646a Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-40.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-40.png new file mode 100644 index 0000000..c663546 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-40.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-40@2x-1.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-40@2x-1.png new file mode 100644 index 0000000..afcf538 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-40@2x-1.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png new file mode 100644 index 0000000..611f339 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-41.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-41.png new file mode 100644 index 0000000..c663546 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-41.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-42.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-42.png new file mode 100644 index 0000000..c663546 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-42.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-60.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-60.png new file mode 100644 index 0000000..fd2eff6 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-60.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png new file mode 100644 index 0000000..515d2b6 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-76.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-76.png new file mode 100644 index 0000000..90d600a Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-76.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png new file mode 100644 index 0000000..6b529b8 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/Contents.json b/DynamicText/DynamicTextSwift/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/DynamicText/DynamicTextSwift/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/First.imageset/Contents.json b/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/First.imageset/Contents.json new file mode 100644 index 0000000..f7afaee --- /dev/null +++ b/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/First.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "first30.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "first60.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "first90.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/First.imageset/first30.png b/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/First.imageset/first30.png new file mode 100644 index 0000000..e7f0902 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/First.imageset/first30.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/First.imageset/first60.png b/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/First.imageset/first60.png new file mode 100644 index 0000000..975a75f Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/First.imageset/first60.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/First.imageset/first90.png b/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/First.imageset/first90.png new file mode 100644 index 0000000..92341c2 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/First.imageset/first90.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/Second.imageset/Contents.json b/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/Second.imageset/Contents.json new file mode 100644 index 0000000..fd58914 --- /dev/null +++ b/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/Second.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "second30.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "second60.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "second90.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/Second.imageset/second30.png b/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/Second.imageset/second30.png new file mode 100644 index 0000000..728d7f6 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/Second.imageset/second30.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/Second.imageset/second60.png b/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/Second.imageset/second60.png new file mode 100644 index 0000000..9cd7cb3 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/Second.imageset/second60.png differ diff --git a/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/Second.imageset/second90.png b/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/Second.imageset/second90.png new file mode 100644 index 0000000..6170461 Binary files /dev/null and b/DynamicText/DynamicTextSwift/Assets.xcassets/Tab Bar/Second.imageset/second90.png differ diff --git a/DynamicText/DynamicTextSwift/Base.lproj/LaunchScreen.storyboard b/DynamicText/DynamicTextSwift/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..e16eba7 --- /dev/null +++ b/DynamicText/DynamicTextSwift/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DynamicText/DynamicTextSwift/Base.lproj/Main.storyboard b/DynamicText/DynamicTextSwift/Base.lproj/Main.storyboard new file mode 100644 index 0000000..52c8196 --- /dev/null +++ b/DynamicText/DynamicTextSwift/Base.lproj/Main.storyboard @@ -0,0 +1,315 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DynamicText/DynamicTextSwift/Info.plist b/DynamicText/DynamicTextSwift/Info.plist new file mode 100644 index 0000000..5b531f7 --- /dev/null +++ b/DynamicText/DynamicTextSwift/Info.plist @@ -0,0 +1,66 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + UIApplicationSupportsIndirectInputEvents + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/DynamicText/DynamicTextSwift/SceneDelegate.swift b/DynamicText/DynamicTextSwift/SceneDelegate.swift new file mode 100644 index 0000000..8b6fc47 --- /dev/null +++ b/DynamicText/DynamicTextSwift/SceneDelegate.swift @@ -0,0 +1,33 @@ +// Copyright © 2021 Keith Harrison. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + var window: UIWindow? +} diff --git a/DynamicText/DynamicTextSwift/UIFont+Extension.swift b/DynamicText/DynamicTextSwift/UIFont+Extension.swift new file mode 100644 index 0000000..3174e89 --- /dev/null +++ b/DynamicText/DynamicTextSwift/UIFont+Extension.swift @@ -0,0 +1,36 @@ +// Copyright © 2021 Keith Harrison. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +import UIKit + +extension UIFont { + static func preferredFont(forTextStyle style: UIFont.TextStyle, scaleFactor: CGFloat) -> UIFont { + let font = UIFont.preferredFont(forTextStyle: style) + return font.withSize(font.pointSize * scaleFactor) + } +} diff --git a/DynamicText/DynamicTextSwift/UYLScaledTextStyleViewController.swift b/DynamicText/DynamicTextSwift/UYLScaledTextStyleViewController.swift new file mode 100644 index 0000000..9812038 --- /dev/null +++ b/DynamicText/DynamicTextSwift/UYLScaledTextStyleViewController.swift @@ -0,0 +1,68 @@ +// Copyright © 2021 Keith Harrison. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +import UIKit + +final class UYLScaledTextStyleViewController: UIViewController { + @IBOutlet private var allLabels: [UILabel]! + @IBOutlet private var title1Label: UILabel! + @IBOutlet private var title2Label: UILabel! + @IBOutlet private var title3Label: UILabel! + @IBOutlet private var headlineLabel: UILabel! + @IBOutlet private var subheadLabel: UILabel! + @IBOutlet private var bodyLabel: UILabel! + @IBOutlet private var calloutLabel: UILabel! + @IBOutlet private var footnoteLabel: UILabel! + @IBOutlet private var caption1Label: UILabel! + @IBOutlet private var caption2Label: UILabel! + + override func viewDidLoad() { + super.viewDidLoad() + configureView() + NotificationCenter.default.addObserver(self, selector: #selector(updateTextStyles(_:)), name: UIContentSizeCategory.didChangeNotification, object: nil) + } + + @objc private func updateTextStyles(_ notification: Notification) { + configureView() + } + + private func configureView() { + let scaleFactor: CGFloat = 2.0 + + title1Label.font = UIFont.preferredFont(forTextStyle: .title1, scaleFactor: scaleFactor) + title2Label.font = UIFont.preferredFont(forTextStyle: .title2, scaleFactor: scaleFactor) + title3Label.font = UIFont.preferredFont(forTextStyle: .title3, scaleFactor: scaleFactor) + headlineLabel.font = UIFont.preferredFont(forTextStyle: .headline, scaleFactor: scaleFactor) + subheadLabel.font = UIFont.preferredFont(forTextStyle: .subheadline, scaleFactor: scaleFactor) + bodyLabel.font = UIFont.preferredFont(forTextStyle: .body, scaleFactor: scaleFactor) + calloutLabel.font = UIFont.preferredFont(forTextStyle: .callout, scaleFactor: scaleFactor) + footnoteLabel.font = UIFont.preferredFont(forTextStyle: .footnote, scaleFactor: scaleFactor) + caption1Label.font = UIFont.preferredFont(forTextStyle: .caption1, scaleFactor: scaleFactor) + caption2Label.font = UIFont.preferredFont(forTextStyle: .caption2, scaleFactor: scaleFactor) + } +} diff --git a/DynamicText/DynamicTextSwift/UYLTextStyleViewController.swift b/DynamicText/DynamicTextSwift/UYLTextStyleViewController.swift new file mode 100644 index 0000000..ecff87a --- /dev/null +++ b/DynamicText/DynamicTextSwift/UYLTextStyleViewController.swift @@ -0,0 +1,68 @@ +// Copyright © 2021 Keith Harrison. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +import UIKit + +final class UYLTextStyleViewController: UIViewController { + @IBOutlet private var allLabels: [UILabel]! + @IBOutlet private weak var title1Label: UILabel! + @IBOutlet private weak var title2Label: UILabel! + @IBOutlet private weak var title3Label: UILabel! + @IBOutlet private weak var headlineLabel: UILabel! + @IBOutlet private weak var subheadLabel: UILabel! + @IBOutlet private weak var bodyLabel: UILabel! + @IBOutlet private weak var calloutLabel: UILabel! + @IBOutlet private weak var footnoteLabel: UILabel! + @IBOutlet private weak var caption1Label: UILabel! + @IBOutlet private weak var caption2Label: UILabel! + + override func viewDidLoad() { + super.viewDidLoad() + + if #available(iOS 10, *) { + allLabels.forEach { + $0.adjustsFontForContentSizeCategory = true + } + } else { + NotificationCenter.default.addObserver(self, selector: #selector(updateTextStyles(_:)), name: UIContentSizeCategory.didChangeNotification, object: nil) + } + } + + @objc private func updateTextStyles(_ notification: Notification) { + title1Label.font = UIFont.preferredFont(forTextStyle: .title1) + title2Label.font = UIFont.preferredFont(forTextStyle: .title2) + title3Label.font = UIFont.preferredFont(forTextStyle: .title3) + headlineLabel.font = UIFont.preferredFont(forTextStyle: .headline) + subheadLabel.font = UIFont.preferredFont(forTextStyle: .subheadline) + bodyLabel.font = UIFont.preferredFont(forTextStyle: .body) + calloutLabel.font = UIFont.preferredFont(forTextStyle: .callout) + footnoteLabel.font = UIFont.preferredFont(forTextStyle: .footnote) + caption1Label.font = UIFont.preferredFont(forTextStyle: .caption1) + caption2Label.font = UIFont.preferredFont(forTextStyle: .caption2) + } +} diff --git a/DynamicText/README.md b/DynamicText/README.md index 14c9d11..c1e8637 100644 --- a/DynamicText/README.md +++ b/DynamicText/README.md @@ -5,7 +5,7 @@ This is a example project showing how to respond to the user changing the preferred text size. -**Minimum deployment target is now iOS 9.0 using Xcode 11** +**Minimum deployment target is now iOS 9.0 using Xcode 12** The `UYLTextStyleViewController` shows the standard way to listen for and respond to changes to the users preferred text size using the @@ -22,11 +22,12 @@ category of `UIFont` for this purpose. For further details see the following blog post: -+ [Scaling Synamic Type With Font Descriptors](https://useyourloaf.com/blog/scaling-dynamic-type-with-font-descriptors/) ++ [Scaling Dynamic Type With Font Descriptors](https://useyourloaf.com/blog/scaling-dynamic-type-with-font-descriptors/) ## History -Version 1.3 11 January 2020 Updated for Xcode 11 +Version 1.4 19 May 2021 Updated for Xcode 12 and Swift +Version 1.3 11 January 2020 Updated for Xcode 11 Version 1.2 14 August 2017 Updated for Xcode 8 and iOS 10 Version 1.1 30 December 2013 Added UYLScaledTextViewController Version 1.0 06 October 2013 Initial version. diff --git a/DynamicWebKit/DynamicWebKit.xcodeproj/project.pbxproj b/DynamicWebKit/DynamicWebKit.xcodeproj/project.pbxproj index 995fc45..aa1b646 100644 --- a/DynamicWebKit/DynamicWebKit.xcodeproj/project.pbxproj +++ b/DynamicWebKit/DynamicWebKit.xcodeproj/project.pbxproj @@ -31,6 +31,7 @@ 53A2B54C1F94DC9700095FAD /* default.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = default.html; sourceTree = ""; }; 53A2B54E1F94DD8200095FAD /* stylesheet.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = stylesheet.css; sourceTree = ""; }; 53A2B5501F94F14800095FAD /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + 53C25DE92617A45300E8BC02 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; 53E34DFF2403D67600EE575E /* 001-dark@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "001-dark@2x.png"; sourceTree = ""; }; 53E34E002403D67600EE575E /* 001@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "001@2x.png"; sourceTree = ""; }; 53E34E012403D67600EE575E /* 001.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 001.png; sourceTree = ""; }; @@ -54,6 +55,7 @@ 53A2B5501F94F14800095FAD /* README.md */, 53A2B5391F94DBE500095FAD /* DynamicWebKit */, 53A2B5381F94DBE500095FAD /* Products */, + 53C25DE82617A45300E8BC02 /* Frameworks */, ); sourceTree = ""; }; @@ -79,6 +81,14 @@ path = DynamicWebKit; sourceTree = ""; }; + 53C25DE82617A45300E8BC02 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 53C25DE92617A45300E8BC02 /* WebKit.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 53E34DFE2403D58400EE575E /* HTML */ = { isa = PBXGroup; children = ( @@ -119,7 +129,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 1120; + LastUpgradeCheck = 1240; ORGANIZATIONNAME = "Keith Harrison"; TargetAttributes = { 53A2B5361F94DBE500095FAD = { @@ -223,6 +233,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -248,7 +259,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -282,6 +293,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -301,7 +313,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; diff --git a/DynamicWebKit/DynamicWebKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DynamicWebKit/DynamicWebKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..df636b7 --- /dev/null +++ b/DynamicWebKit/DynamicWebKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/DynamicWebKit/DynamicWebKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/DynamicWebKit/DynamicWebKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/DynamicWebKit/DynamicWebKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/DynamicWebKit/DynamicWebKit/Assets.xcassets/AppIcon.appiconset/Contents.json b/DynamicWebKit/DynamicWebKit/Assets.xcassets/AppIcon.appiconset/Contents.json index 1d060ed..9221b9b 100644 --- a/DynamicWebKit/DynamicWebKit/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/DynamicWebKit/DynamicWebKit/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -2,92 +2,97 @@ "images" : [ { "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" + "scale" : "2x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" + "scale" : "3x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" + "scale" : "3x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" + "scale" : "3x", + "size" : "40x40" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" + "scale" : "2x", + "size" : "60x60" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" + "scale" : "3x", + "size" : "60x60" }, { "idiom" : "ipad", - "size" : "20x20", - "scale" : "1x" + "scale" : "1x", + "size" : "20x20" }, { "idiom" : "ipad", - "size" : "20x20", - "scale" : "2x" + "scale" : "2x", + "size" : "20x20" }, { "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" + "scale" : "1x", + "size" : "29x29" }, { "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" + "scale" : "1x", + "size" : "40x40" }, { "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" + "scale" : "1x", + "size" : "76x76" }, { "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" + "scale" : "2x", + "size" : "76x76" }, { "idiom" : "ipad", - "size" : "83.5x83.5", - "scale" : "2x" + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/DynamicWebKit/DynamicWebKit/Assets.xcassets/Contents.json b/DynamicWebKit/DynamicWebKit/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/DynamicWebKit/DynamicWebKit/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/DynamicWebKit/DynamicWebKit/Assets.xcassets/chevron.backward.symbolset/Contents.json b/DynamicWebKit/DynamicWebKit/Assets.xcassets/chevron.backward.symbolset/Contents.json new file mode 100644 index 0000000..3aee322 --- /dev/null +++ b/DynamicWebKit/DynamicWebKit/Assets.xcassets/chevron.backward.symbolset/Contents.json @@ -0,0 +1,13 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "symbols" : [ + { + "filename" : "backward.svg", + "idiom" : "universal", + "language-direction" : "left-to-right" + } + ] +} diff --git a/DynamicWebKit/DynamicWebKit/Assets.xcassets/chevron.backward.symbolset/backward.svg b/DynamicWebKit/DynamicWebKit/Assets.xcassets/chevron.backward.symbolset/backward.svg new file mode 100644 index 0000000..f32a098 --- /dev/null +++ b/DynamicWebKit/DynamicWebKit/Assets.xcassets/chevron.backward.symbolset/backward.svg @@ -0,0 +1,161 @@ + + + + + + + + + Weight/Scale Variations + Ultralight + Thin + Light + Regular + Medium + Semibold + Bold + Heavy + Black + + + + + + + + + + + Design Variations + Symbols are supported in up to nine weights and three scales. + For optimal layout with text and other symbols, vertically align + symbols with the adjacent text. + + + + + + Margins + Leading and trailing margins on the left and right side of each symbol + can be adjusted by modifying the x-location of the margin guidelines. + Modifications are automatically applied proportionally to all + scales and weights. + + + + Exporting + Symbols should be outlined when exporting to ensure the + design is preserved when submitting to Xcode. + Template v.2.0 + Requires Xcode 12 or greater + Generated from chevron.backward + Typeset at 100 points + Small + Medium + Large + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DynamicWebKit/DynamicWebKit/Assets.xcassets/chevron.forward.symbolset/Contents.json b/DynamicWebKit/DynamicWebKit/Assets.xcassets/chevron.forward.symbolset/Contents.json new file mode 100644 index 0000000..b8b271f --- /dev/null +++ b/DynamicWebKit/DynamicWebKit/Assets.xcassets/chevron.forward.symbolset/Contents.json @@ -0,0 +1,13 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "symbols" : [ + { + "filename" : "forward.svg", + "idiom" : "universal", + "language-direction" : "left-to-right" + } + ] +} diff --git a/DynamicWebKit/DynamicWebKit/Assets.xcassets/chevron.forward.symbolset/forward.svg b/DynamicWebKit/DynamicWebKit/Assets.xcassets/chevron.forward.symbolset/forward.svg new file mode 100644 index 0000000..c387b82 --- /dev/null +++ b/DynamicWebKit/DynamicWebKit/Assets.xcassets/chevron.forward.symbolset/forward.svg @@ -0,0 +1,161 @@ + + + + + + + + + Weight/Scale Variations + Ultralight + Thin + Light + Regular + Medium + Semibold + Bold + Heavy + Black + + + + + + + + + + + Design Variations + Symbols are supported in up to nine weights and three scales. + For optimal layout with text and other symbols, vertically align + symbols with the adjacent text. + + + + + + Margins + Leading and trailing margins on the left and right side of each symbol + can be adjusted by modifying the x-location of the margin guidelines. + Modifications are automatically applied proportionally to all + scales and weights. + + + + Exporting + Symbols should be outlined when exporting to ensure the + design is preserved when submitting to Xcode. + Template v.2.0 + Requires Xcode 12 or greater + Generated from chevron.forward + Typeset at 100 points + Small + Medium + Large + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DynamicWebKit/DynamicWebKit/Base.lproj/Main.storyboard b/DynamicWebKit/DynamicWebKit/Base.lproj/Main.storyboard index c0a6762..97443bd 100644 --- a/DynamicWebKit/DynamicWebKit/Base.lproj/Main.storyboard +++ b/DynamicWebKit/DynamicWebKit/Base.lproj/Main.storyboard @@ -1,9 +1,9 @@ - + - + @@ -15,10 +15,27 @@ - + - + + + + + + + + + + + + + + + + + + @@ -43,4 +60,8 @@ + + + + diff --git a/DynamicWebKit/DynamicWebKit/Info.plist b/DynamicWebKit/DynamicWebKit/Info.plist index 16be3b6..cf8aa00 100644 --- a/DynamicWebKit/DynamicWebKit/Info.plist +++ b/DynamicWebKit/DynamicWebKit/Info.plist @@ -41,5 +41,11 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + WKAppBoundDomains + + useyourloaf.com + github.com + apple.com + diff --git a/DynamicWebKit/DynamicWebKit/WebViewController.swift b/DynamicWebKit/DynamicWebKit/WebViewController.swift index 90b5382..91632b7 100644 --- a/DynamicWebKit/DynamicWebKit/WebViewController.swift +++ b/DynamicWebKit/DynamicWebKit/WebViewController.swift @@ -31,6 +31,9 @@ import UIKit import WebKit final class WebViewController: UIViewController { + @IBOutlet private var backwardButton: UIBarButtonItem! + @IBOutlet private var forwardButton: UIBarButtonItem! + var html: String = "default" { didSet { loadHTML(html) @@ -38,11 +41,24 @@ final class WebViewController: UIViewController { } private lazy var webView: WKWebView = { - let preferences = WKPreferences() - preferences.javaScriptEnabled = false let configuration = WKWebViewConfiguration() - configuration.preferences = preferences - return WKWebView(frame: .zero, configuration: configuration) + + if #available(iOS 14.0, *) { + // Allow restricted API access on the + // app-bound domains (cookies, etc). + // Doesn't seem to be required + // configuration.limitsNavigationsToAppBoundDomains = true + } else { + // Fallback to WKPreferences for iOS 13 to + // disable javascript. + let preferences = WKPreferences() + // preferences.javaScriptEnabled = false + configuration.preferences = preferences + } + + let webView = WKWebView(frame: .zero, configuration: configuration) + webView.navigationDelegate = self + return webView }() override func loadView() { @@ -51,6 +67,14 @@ final class WebViewController: UIViewController { NotificationCenter.default.addObserver(self, selector: #selector(contentSizeDidChange(_:)), name: UIContentSizeCategory.didChangeNotification, object: nil) } + @IBAction func forwardAction(_ sender: UIBarButtonItem) { + webView.goForward() + } + + @IBAction func backwardAction(_ sender: UIBarButtonItem) { + webView.goBack() + } + @objc private func contentSizeDidChange(_ notification: Notification) { webView.reload() } @@ -61,3 +85,31 @@ final class WebViewController: UIViewController { } } } + +extension WebViewController: WKNavigationDelegate { + func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, preferences: WKWebpagePreferences, decisionHandler: @escaping (WKNavigationActionPolicy, WKWebpagePreferences) -> Void) { + if #available(iOS 14.0, *) { + // To disable all javascript content + // preferences.allowsContentJavaScript = true + } + decisionHandler(.allow, preferences) + } + + func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) { + print(error) + updateNavigationState(webView) + } + + func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) { + updateNavigationState(webView) + } + + func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { + updateNavigationState(webView) + } + + private func updateNavigationState(_ webView: WKWebView) { + backwardButton.isEnabled = webView.canGoBack + forwardButton.isEnabled = webView.canGoForward + } +} diff --git a/DynamicWebKit/README.md b/DynamicWebKit/README.md index 3f59978..40310c5 100644 --- a/DynamicWebKit/README.md +++ b/DynamicWebKit/README.md @@ -2,9 +2,9 @@ An example of how to use the Apple system fonts in a CSS stylesheet so static HTML content in a web view respects the user's choice of content size. -## Adding Support For Dark Mode +## Adding Support For Dark Mode And App Bound Domains -I've updated this project to support dark mode (requires iOS 13). +I've updated this project to support dark mode (requires iOS 13) and app bound domains (iOS 14). ## Further Details @@ -12,3 +12,4 @@ For further details see the following blog posts: + [Using Dynamic Type With Web Views](https://useyourloaf.com/blog/using-dynamic-type-with-web-views/) + [Supporting Dark Mode In WkWebView](https://useyourloaf.com/blog/supporting-dark-mode-in-wkwebview/) ++ [App Bound Domains](https://useyourloaf.com/blog/app-bound-domains/) diff --git a/Encode/encode.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Encode/encode.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..cb96726 --- /dev/null +++ b/Encode/encode.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Encode/encode.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Encode/encode.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Encode/encode.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/GridView/GridView.xcodeproj/project.pbxproj b/GridView/GridView.xcodeproj/project.pbxproj index 8324803..58f1176 100644 --- a/GridView/GridView.xcodeproj/project.pbxproj +++ b/GridView/GridView.xcodeproj/project.pbxproj @@ -143,7 +143,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 1120; + LastUpgradeCheck = 1240; ORGANIZATIONNAME = "Keith Harrison"; TargetAttributes = { 531CCB861EAA45D2008349F4 = { @@ -320,6 +320,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -344,7 +345,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -380,6 +381,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -398,7 +400,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; @@ -414,7 +416,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = LCC2J94N44; INFOPLIST_FILE = GridView/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -432,7 +434,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = LCC2J94N44; INFOPLIST_FILE = GridView/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/GridView/GridView.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/GridView/GridView.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..0540ebe --- /dev/null +++ b/GridView/GridView.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Huckleberry/Huckleberry.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Huckleberry/Huckleberry.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..774407d --- /dev/null +++ b/Huckleberry/Huckleberry.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Huckleberry/Huckleberry.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Huckleberry/Huckleberry.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Huckleberry/Huckleberry.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/KeyCommand/KeyCommand.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/KeyCommand/KeyCommand.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..911133b --- /dev/null +++ b/KeyCommand/KeyCommand.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/KeyCommand/KeyCommand.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/KeyCommand/KeyCommand.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/KeyCommand/KeyCommand.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ListCollection/List.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ListCollection/List.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ListCollection/List.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ListCollection/List.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ListCollection/List.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ListCollection/List.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ListCollection/List.xcodeproj/xcshareddata/xcschemes/List.xcscheme b/ListCollection/List.xcodeproj/xcshareddata/xcschemes/List.xcscheme new file mode 100644 index 0000000..370e826 --- /dev/null +++ b/ListCollection/List.xcodeproj/xcshareddata/xcschemes/List.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ListCollection/List/Assets.xcassets/BackgroundColor.colorset/Contents.json b/ListCollection/List/Assets.xcassets/BackgroundColor.colorset/Contents.json new file mode 100644 index 0000000..db2c315 --- /dev/null +++ b/ListCollection/List/Assets.xcassets/BackgroundColor.colorset/Contents.json @@ -0,0 +1,15 @@ +{ + "colors" : [ + { + "color" : { + "platform" : "ios", + "reference" : "systemPurpleColor" + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ListCollection/List/Assets.xcassets/EditBackgroundColor.colorset/Contents.json b/ListCollection/List/Assets.xcassets/EditBackgroundColor.colorset/Contents.json new file mode 100644 index 0000000..89b5d90 --- /dev/null +++ b/ListCollection/List/Assets.xcassets/EditBackgroundColor.colorset/Contents.json @@ -0,0 +1,15 @@ +{ + "colors" : [ + { + "color" : { + "platform" : "ios", + "reference" : "systemYellowColor" + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ListCollection/List/Base.lproj/LaunchScreen.storyboard b/ListCollection/List/Base.lproj/LaunchScreen.storyboard index 865e932..1efaf14 100644 --- a/ListCollection/List/Base.lproj/LaunchScreen.storyboard +++ b/ListCollection/List/Base.lproj/LaunchScreen.storyboard @@ -1,7 +1,9 @@ - - + + + - + + @@ -11,15 +13,39 @@ - + - + + - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ListCollection/List/Info.plist b/ListCollection/List/Info.plist index 5b531f7..dbc1db6 100644 --- a/ListCollection/List/Info.plist +++ b/ListCollection/List/Info.plist @@ -16,6 +16,19 @@ $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString 1.0 + CFBundleURLTypes + + + CFBundleTypeRole + Editor + CFBundleURLName + com.useyourloaf.list + CFBundleURLSchemes + + facts + + + CFBundleVersion 1 LSRequiresIPhoneOS @@ -41,8 +54,35 @@ UIApplicationSupportsIndirectInputEvents - UILaunchStoryboardName - LaunchScreen + UILaunchScreens + + UIDefaultLaunchScreen + HomeScreen + UILaunchScreenDefinitions + + + UIColorName + BackgroundColor + UILaunchScreenIdentifier + HomeScreen + UINavigationBar + + + + UIColorName + EditBackgroundColor + UILaunchScreenIdentifier + EditScreen + UINavigationBar + + + + UIURLToLaunchScreenAssociations + + facts://country + EditScreen + + UIMainStoryboardFile Main UIRequiredDeviceCapabilities diff --git a/ListCollection/List/ListController.swift b/ListCollection/List/ListController.swift index 5d2fd2b..af95527 100644 --- a/ListCollection/List/ListController.swift +++ b/ListCollection/List/ListController.swift @@ -83,7 +83,7 @@ final class ListController: UICollectionViewController { private func createLayout() { var config = UICollectionLayoutListConfiguration(appearance: .insetGrouped) - config.backgroundColor = .systemPurple + config.backgroundColor = UIColor(named: "BackgroundColor") collectionView.collectionViewLayout = UICollectionViewCompositionalLayout.list(using: config) } diff --git a/Margins/Margins.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Margins/Margins.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..82343ea --- /dev/null +++ b/Margins/Margins.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Motion/Motion.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Motion/Motion.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..8816e0d --- /dev/null +++ b/Motion/Motion.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Motion/Motion.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Motion/Motion.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Motion/Motion.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/QReader/QReader.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/QReader/QReader.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..2508c96 --- /dev/null +++ b/QReader/QReader.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/QReader/QReader.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/QReader/QReader.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/QReader/QReader.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Refresh/Refresh.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Refresh/Refresh.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1a89b2a --- /dev/null +++ b/Refresh/Refresh.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Refresh/Refresh.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Refresh/Refresh.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Refresh/Refresh.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/RefreshScroll/RefreshScroll.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/RefreshScroll/RefreshScroll.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..502ca7c --- /dev/null +++ b/RefreshScroll/RefreshScroll.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/RefreshScroll/RefreshScroll.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/RefreshScroll/RefreshScroll.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/RefreshScroll/RefreshScroll.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/RemindMe10/RemindMe.xcodeproj/project.pbxproj b/RemindMe10/RemindMe.xcodeproj/project.pbxproj index f91d866..1302899 100644 --- a/RemindMe10/RemindMe.xcodeproj/project.pbxproj +++ b/RemindMe10/RemindMe.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -175,8 +175,9 @@ 53BA9AED1DB283D7000BD07D /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 1120; + LastUpgradeCheck = 1620; ORGANIZATIONNAME = "Keith Harrison"; TargetAttributes = { 539D5EB81DC4DBF500130F2F = { @@ -302,7 +303,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = LCC2J94N44; INFOPLIST_FILE = RemindMeObjc/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.useyourloaf.RemindMeObjc; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -314,7 +318,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = LCC2J94N44; INFOPLIST_FILE = RemindMeObjc/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.useyourloaf.RemindMeObjc; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -345,6 +352,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -356,6 +364,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -370,13 +379,13 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -406,6 +415,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -417,6 +427,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -425,11 +436,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 5.0; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 6.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -441,10 +453,13 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = LCC2J94N44; INFOPLIST_FILE = RemindMe/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.useyourloaf.RemindMe; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; }; name = Debug; }; @@ -454,10 +469,13 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = LCC2J94N44; INFOPLIST_FILE = RemindMe/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.useyourloaf.RemindMe; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 6.0; }; name = Release; }; diff --git a/RemindMe10/RemindMe.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/RemindMe10/RemindMe.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..04b85c1 --- /dev/null +++ b/RemindMe10/RemindMe.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/RemindMe10/RemindMe.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/RemindMe10/RemindMe.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/RemindMe10/RemindMe.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/RemindMe10/RemindMe/AppDelegate.swift b/RemindMe10/RemindMe/AppDelegate.swift index 85e52f5..1de436b 100644 --- a/RemindMe10/RemindMe/AppDelegate.swift +++ b/RemindMe10/RemindMe/AppDelegate.swift @@ -34,14 +34,14 @@ import UIKit import UserNotifications -@UIApplicationMain +@main class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? let notificationDelegate = UYLNotificationDelegate() func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { - let options: UNAuthorizationOptions = [.alert, .sound]; + let options: UNAuthorizationOptions = [.alert, .sound] registerForLocalNotifications(options: options) let center = UNUserNotificationCenter.current() center.delegate = notificationDelegate diff --git a/Restorer/Restorer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Restorer/Restorer.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..939427d --- /dev/null +++ b/Restorer/Restorer.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Restorer/Restorer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Restorer/Restorer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Restorer/Restorer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/RevealStack/RevealStack.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/RevealStack/RevealStack.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..a861032 --- /dev/null +++ b/RevealStack/RevealStack.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/RevealStack/RevealStack.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/RevealStack/RevealStack.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/RevealStack/RevealStack.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ScaledFont/ScaledFont/Noteworthy.plist b/ScaledFont/Fonts/Noteworthy.plist similarity index 78% rename from ScaledFont/ScaledFont/Noteworthy.plist rename to ScaledFont/Fonts/Noteworthy.plist index 4395e75..9714135 100644 --- a/ScaledFont/ScaledFont/Noteworthy.plist +++ b/ScaledFont/Fonts/Noteworthy.plist @@ -2,77 +2,77 @@ - UICTFontTextStyleTitle0 + largeTitle fontName Noteworthy-Light fontSize 34 - UICTFontTextStyleTitle1 + title fontName Noteworthy-Light fontSize 28 - UICTFontTextStyleTitle2 + title2 fontName Noteworthy-Light fontSize 22 - UICTFontTextStyleTitle3 + title3 fontName Noteworthy-Light fontSize 20 - UICTFontTextStyleHeadline + headline fontName Noteworthy-Bold fontSize 17 - UICTFontTextStyleSubhead + subheadline fontName Noteworthy-Light fontSize 15 - UICTFontTextStyleBody + body fontName Noteworthy-Light fontSize 17 - UICTFontTextStyleCallout + callout fontName Noteworthy-Light fontSize 16 - UICTFontTextStyleFootnote + footnote fontName Noteworthy-Light fontSize 13 - UICTFontTextStyleCaption1 + caption fontName Noteworthy-Light fontSize 12 - UICTFontTextStyleCaption2 + caption2 fontName Noteworthy-Light diff --git a/ScaledFont/ScaledFont/NotoSerif.plist b/ScaledFont/Fonts/NotoSerif.plist similarity index 78% rename from ScaledFont/ScaledFont/NotoSerif.plist rename to ScaledFont/Fonts/NotoSerif.plist index 2d35c45..79f5db2 100644 --- a/ScaledFont/ScaledFont/NotoSerif.plist +++ b/ScaledFont/Fonts/NotoSerif.plist @@ -2,77 +2,77 @@ - UICTFontTextStyleTitle0 + largeTitle fontName NotoSerif fontSize 34 - UICTFontTextStyleTitle1 + title fontName NotoSerif fontSize 28 - UICTFontTextStyleTitle2 + title2 fontName NotoSerif fontSize 22 - UICTFontTextStyleTitle3 + title3 fontName NotoSerif fontSize 20 - UICTFontTextStyleHeadline + headline fontName NotoSerif-Bold fontSize 17 - UICTFontTextStyleSubhead + subheadline fontName NotoSerif-Italic fontSize 15 - UICTFontTextStyleBody + body fontName NotoSerif fontSize 17 - UICTFontTextStyleCallout + callout fontName NotoSerif fontSize 16 - UICTFontTextStyleFootnote + footnote fontName NotoSerif fontSize 13 - UICTFontTextStyleCaption1 + caption fontName NotoSerif-Italic fontSize 12 - UICTFontTextStyleCaption2 + caption2 fontName NotoSerif-Italic diff --git a/ScaledFont/ScaledFont/Noto_Serif/LICENSE.txt b/ScaledFont/Fonts/Noto_Serif/LICENSE.txt similarity index 100% rename from ScaledFont/ScaledFont/Noto_Serif/LICENSE.txt rename to ScaledFont/Fonts/Noto_Serif/LICENSE.txt diff --git a/ScaledFont/ScaledFont/Noto_Serif/NotoSerif-Bold.ttf b/ScaledFont/Fonts/Noto_Serif/NotoSerif-Bold.ttf similarity index 100% rename from ScaledFont/ScaledFont/Noto_Serif/NotoSerif-Bold.ttf rename to ScaledFont/Fonts/Noto_Serif/NotoSerif-Bold.ttf diff --git a/ScaledFont/ScaledFont/Noto_Serif/NotoSerif-BoldItalic.ttf b/ScaledFont/Fonts/Noto_Serif/NotoSerif-BoldItalic.ttf similarity index 100% rename from ScaledFont/ScaledFont/Noto_Serif/NotoSerif-BoldItalic.ttf rename to ScaledFont/Fonts/Noto_Serif/NotoSerif-BoldItalic.ttf diff --git a/ScaledFont/ScaledFont/Noto_Serif/NotoSerif-Italic.ttf b/ScaledFont/Fonts/Noto_Serif/NotoSerif-Italic.ttf similarity index 100% rename from ScaledFont/ScaledFont/Noto_Serif/NotoSerif-Italic.ttf rename to ScaledFont/Fonts/Noto_Serif/NotoSerif-Italic.ttf diff --git a/ScaledFont/ScaledFont/Noto_Serif/NotoSerif-Regular.ttf b/ScaledFont/Fonts/Noto_Serif/NotoSerif-Regular.ttf similarity index 100% rename from ScaledFont/ScaledFont/Noto_Serif/NotoSerif-Regular.ttf rename to ScaledFont/Fonts/Noto_Serif/NotoSerif-Regular.ttf diff --git a/ScaledFont/README.md b/ScaledFont/README.md index d54fccd..2e30463 100644 --- a/ScaledFont/README.md +++ b/ScaledFont/README.md @@ -2,43 +2,86 @@ ## Using Dynamic Type With Custom Fonts -An example of using custom fonts with dynamic type making use of the `UIFontMetrics` class introduced with iOS 11. It provides examples using the Noteworthy font which is built-in to iOS and the Noto Serif font which was downloaded from google fonts: +An example of using custom fonts with dynamic type making use of the `UIFontMetrics` class introduced with iOS 11. It provides examples using the Noteworthy font that Apple ships built-in to iOS and the Noto Serif font which you can download from google fonts: + [Noto Serif](https://fonts.google.com/specimen/Noto+Serif?selection.family=Noto+Serif) -*Refer to LICENSE.txt if you plan on using Noto Serif in a shipping application.* +*See the LICENSE.txt file if you plan on using Noto Serif in a shipping application.* -**This project requires iOS 11** +## Sample Targets -### ScaledFont +There are two targets in this project: -A utility class to help you use custom fonts with dynamic type. ++ Sampler - A UIKit example that requires a minimum of iOS 11 ++ SamplerUI - A SwiftUI example that requires a minimum of iOS 14 -To use this class you must supply the name of a style dictionary for the font when creating the class. The style dictionary should be stored as a property list file in the main bundle. +## Swift Package -The style dictionary contains an entry for each text style that uses the raw string value for each `UIFontTextStyle` as the key. +The ScaledFont implementation is now provided as a Swift Package Manager dependency. You can find the GitHub repository for the package here: + ++ [ScaledFont on GitHub](https://github.com/kharrison/ScaledFont) + +## ScaledFont Details + +The `ScaledFont` type is a utility type to help you use custom fonts with dynamic type. You must give the name of a style dictionary for the font when creating the `ScaledFont`. You include the style dictionary as a property list file in the main bundle of your app. + +The style dictionary contains an entry for each text style. The available text styles are: + ++ `largeTitle`, `title`, `title2`, `title3` ++ `headline`, `subheadline`, `body`, `callout` ++ `footnote`, `caption`, `caption2` The value of each entry is a dictionary with two keys: -+ fontName: A String which is the font name. -+ fontSize: A number which is the point size to use at the `.large` content size. ++ `fontName`: A `String` which is the font name. ++ `fontSize`: A number which is the point size to use at the `.large` (base) content size. For example to use a 17 pt Noteworthy-Bold font for the `.headline` style at the `.large` content size: - - UICTFontTextStyleHeadline - - fontName - Noteworthy-Bold - fontSize - 17 - - +``` + + headline + + fontName + Noteworthy-Bold + fontSize + 17 + + +``` You do not need to include an entry for every text style but if you try to use a text style that is not included in the dictionary it will fallback to the system preferred font. -### Further Details +## Using With UIKit + +For `UIKit`, apply the scaled font to text labels, text fields or text views: + + ```swift +let scaledFont = ScaledFont(fontName: "Noteworthy") +label.font = scaledFont.font(forTextStyle: .headline) +label.adjustsFontForContentSizeCategory = true +``` + +Remember to set the `adjustsFontFotContentSizeCategory` property to have the font size adjust automatically when the user changes their preferred content size. + +## Using With SwiftUI + +For `SwiftUI`, add the scaled font to the environment of a view: + + ```swift +ContentView() +.environment(\.scaledFont, scaledFont) +``` + +Then apply the scaled fint view modifier to any view containing text in the view hierarchy: + + ```swift +Text("Headline") +.scaledFont(.headline) +``` +## Further Details -See the following blog post for further details: +See these blog posts for further details: + [Using A Custom Font With Dynamic Type](https://useyourloaf.com/blog/using-a-custom-font-with-dynamic-type/) ++ [Scaling Custom SwiftUI Fonts With Dynamic Type](https://useyourloaf.com/blog/scaling-custom-swiftui-fonts-with-dynamic-type/) diff --git a/ScaledFont/Sampler/AppDelegate.swift b/ScaledFont/Sampler/AppDelegate.swift new file mode 100644 index 0000000..ed37160 --- /dev/null +++ b/ScaledFont/Sampler/AppDelegate.swift @@ -0,0 +1,33 @@ +// Copyright © 2021 Keith Harrison. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +import UIKit + +@main +final class AppDelegate: UIResponder, UIApplicationDelegate { +} diff --git a/ScaledFont/Sampler/Assets.xcassets/AccentColor.colorset/Contents.json b/ScaledFont/Sampler/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/ScaledFont/Sampler/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ScaledFont/Sampler/Assets.xcassets/AppIcon.appiconset/Contents.json b/ScaledFont/Sampler/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..9221b9b --- /dev/null +++ b/ScaledFont/Sampler/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ScaledFont/Sampler/Assets.xcassets/Contents.json b/ScaledFont/Sampler/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/ScaledFont/Sampler/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ScaledFont/Sampler/Base.lproj/Main.storyboard b/ScaledFont/Sampler/Base.lproj/Main.storyboard new file mode 100644 index 0000000..b831831 --- /dev/null +++ b/ScaledFont/Sampler/Base.lproj/Main.storyboard @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ScaledFont/Sampler/Info.plist b/ScaledFont/Sampler/Info.plist new file mode 100644 index 0000000..0622451 --- /dev/null +++ b/ScaledFont/Sampler/Info.plist @@ -0,0 +1,75 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + UIApplicationSupportsIndirectInputEvents + + UIMainStoryboardFile + Main + UILaunchScreen + + UINavigationBar + + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIAppFonts + + NotoSerif-Regular.ttf + NotoSerif-Bold.ttf + NotoSerif-Italic.ttf + + + diff --git a/ScaledFont/Sampler/SceneDelegate.swift b/ScaledFont/Sampler/SceneDelegate.swift new file mode 100644 index 0000000..80bb407 --- /dev/null +++ b/ScaledFont/Sampler/SceneDelegate.swift @@ -0,0 +1,33 @@ +// Copyright © 2021 Keith Harrison. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +import UIKit + +final class SceneDelegate: UIResponder, UIWindowSceneDelegate { + var window: UIWindow? +} diff --git a/ScaledFont/ScaledFont/ViewController.swift b/ScaledFont/Sampler/StyleViewController.swift similarity index 96% rename from ScaledFont/ScaledFont/ViewController.swift rename to ScaledFont/Sampler/StyleViewController.swift index 315a7fd..d11b721 100644 --- a/ScaledFont/ScaledFont/ViewController.swift +++ b/ScaledFont/Sampler/StyleViewController.swift @@ -1,5 +1,4 @@ -// Created by Keith Harrison https://useyourloaf.com -// Copyright (c) 2017 Keith Harrison. All rights reserved. +// Copyright © 2021 Keith Harrison. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: @@ -27,9 +26,10 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +import ScaledFont import UIKit -class ViewController: UIViewController { +final class StyleViewController: UIViewController { // private let fontName = "Default" // private let fontName = "Noteworthy" private let fontName = "NotoSerif" diff --git a/ScaledFont/SamplerUI/Assets.xcassets/AccentColor.colorset/Contents.json b/ScaledFont/SamplerUI/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/ScaledFont/SamplerUI/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ScaledFont/SamplerUI/Assets.xcassets/AppIcon.appiconset/Contents.json b/ScaledFont/SamplerUI/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..9221b9b --- /dev/null +++ b/ScaledFont/SamplerUI/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ScaledFont/SamplerUI/Assets.xcassets/Contents.json b/ScaledFont/SamplerUI/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/ScaledFont/SamplerUI/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ScaledFont/ScaledFont/Info.plist b/ScaledFont/SamplerUI/Info.plist similarity index 82% rename from ScaledFont/ScaledFont/Info.plist rename to ScaledFont/SamplerUI/Info.plist index 24cd042..d7f7654 100644 --- a/ScaledFont/ScaledFont/Info.plist +++ b/ScaledFont/SamplerUI/Info.plist @@ -13,23 +13,25 @@ CFBundleName $(PRODUCT_NAME) CFBundlePackageType - APPL + $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString 1.0 CFBundleVersion 1 LSRequiresIPhoneOS - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIAppFonts - - NotoSerif-Regular.ttf - NotoSerif-Bold.ttf - NotoSerif-Italic.ttf - + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + + UIApplicationSupportsIndirectInputEvents + + UILaunchScreen + + UINavigationBar + + UIRequiredDeviceCapabilities armv7 @@ -39,7 +41,6 @@ UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIInterfaceOrientationPortraitUpsideDown UISupportedInterfaceOrientations~ipad @@ -48,5 +49,11 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UIAppFonts + + NotoSerif-Regular.ttf + NotoSerif-Bold.ttf + NotoSerif-Italic.ttf + diff --git a/ScaledFont/SamplerUI/Preview Content/Preview Assets.xcassets/Contents.json b/ScaledFont/SamplerUI/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/ScaledFont/SamplerUI/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ScaledFont/SamplerUI/SamplerUIApp.swift b/ScaledFont/SamplerUI/SamplerUIApp.swift new file mode 100644 index 0000000..d85ee8e --- /dev/null +++ b/ScaledFont/SamplerUI/SamplerUIApp.swift @@ -0,0 +1,44 @@ +// Copyright © 2021 Keith Harrison. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +import ScaledFont +import SwiftUI + +@main +struct SamplerUIApp: App { +// let fontName = "Default" + let fontName = "Noteworthy" +// let fontName = "NotoSerif" + + var body: some Scene { + WindowGroup { + StyleView(fontName: fontName) + .environment(\.scaledFont, ScaledFont(fontName: fontName)) + } + } +} diff --git a/ScaledFont/SamplerUI/StyleView.swift b/ScaledFont/SamplerUI/StyleView.swift new file mode 100644 index 0000000..93f6160 --- /dev/null +++ b/ScaledFont/SamplerUI/StyleView.swift @@ -0,0 +1,100 @@ +// Copyright © 2021 Keith Harrison. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. + +import ScaledFont +import SwiftUI + +struct StyleView: View { + let fontName: String + + var body: some View { + NavigationView { + ScrollView { + TextStyles() + } + .navigationBarTitle(fontName, displayMode: .inline) + } + } +} + +private struct TextStyles: View { + var defaultSpacing: CGFloat = 8.0 + + var body: some View { + ScrollView { + VStack(alignment: .leading, spacing: defaultSpacing) { + Text("Title 1") + .scaledFont(.title) + + if #available(iOS 14.0, *) { + Text("Title 2") + .scaledFont(.title2) + } + + if #available(iOS 14.0, *) { + Text("Title 3") + .scaledFont(.title3) + } + + Text("Headline") + .scaledFont(.headline) + + Text("Subheadline") + .scaledFont(.subheadline) + + Text("Body") + .scaledFont(.body) + + Text("Callout") + .scaledFont(.callout) + + Text("Footnote") + .scaledFont(.footnote) + + Text("Caption 1") + .scaledFont(.caption) + + if #available(iOS 14.0, *) { + Text("Caption 2") + .scaledFont(.caption2) + } + } + .padding() + .frame(maxWidth: .infinity, alignment: .leading) + } + } +} + +struct ContentView_Previews: PreviewProvider { + static let fontName = "Noteworthy" + + static var previews: some View { + StyleView(fontName: fontName) + .environment(\.scaledFont, ScaledFont(fontName: fontName)) + } +} diff --git a/ScaledFont/ScaledFont.xcodeproj/project.pbxproj b/ScaledFont/ScaledFont.xcodeproj/project.pbxproj index 59a6cc6..c209d8b 100644 --- a/ScaledFont/ScaledFont.xcodeproj/project.pbxproj +++ b/ScaledFont/ScaledFont.xcodeproj/project.pbxproj @@ -3,24 +3,41 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ - 537709DB1F4061130041A64F /* Noteworthy.plist in Resources */ = {isa = PBXBuildFile; fileRef = 537919321F3FA0CF00FF9E25 /* Noteworthy.plist */; }; - 537709E21F40B0650041A64F /* NotoSerif-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 537709DE1F40AFD80041A64F /* NotoSerif-Bold.ttf */; }; - 537709E31F40B06B0041A64F /* NotoSerif-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 537709E11F40AFD80041A64F /* NotoSerif-Regular.ttf */; }; - 537709E41F40B06F0041A64F /* NotoSerif-Italic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 537709E01F40AFD80041A64F /* NotoSerif-Italic.ttf */; }; - 537709E61F40B18B0041A64F /* NotoSerif.plist in Resources */ = {isa = PBXBuildFile; fileRef = 537709E51F40B18B0041A64F /* NotoSerif.plist */; }; - 5379191F1F3FA05700FF9E25 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5379191E1F3FA05700FF9E25 /* AppDelegate.swift */; }; - 537919211F3FA05700FF9E25 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 537919201F3FA05700FF9E25 /* ViewController.swift */; }; - 537919241F3FA05700FF9E25 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 537919221F3FA05700FF9E25 /* Main.storyboard */; }; - 537919261F3FA05700FF9E25 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 537919251F3FA05700FF9E25 /* Assets.xcassets */; }; - 537919291F3FA05700FF9E25 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 537919271F3FA05700FF9E25 /* LaunchScreen.storyboard */; }; - 537919311F3FA0B500FF9E25 /* ScaledFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 537919301F3FA0B500FF9E25 /* ScaledFont.swift */; }; + 53581E7A25F7D6B6000DAD54 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53581E7925F7D6B6000DAD54 /* AppDelegate.swift */; }; + 53581E7C25F7D6B6000DAD54 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53581E7B25F7D6B6000DAD54 /* SceneDelegate.swift */; }; + 53581E7E25F7D6B6000DAD54 /* StyleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53581E7D25F7D6B6000DAD54 /* StyleViewController.swift */; }; + 53581E8125F7D6B6000DAD54 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 53581E7F25F7D6B6000DAD54 /* Main.storyboard */; }; + 53581E8325F7D6B6000DAD54 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 53581E8225F7D6B6000DAD54 /* Assets.xcassets */; }; + 53581E8E25F7D6C0000DAD54 /* ScaledFont in Frameworks */ = {isa = PBXBuildFile; productRef = 53581E8D25F7D6C0000DAD54 /* ScaledFont */; }; + 53581E9325F7DEFF000DAD54 /* NotoSerif-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 537709DE1F40AFD80041A64F /* NotoSerif-Bold.ttf */; }; + 53581E9725F7DF07000DAD54 /* NotoSerif-Italic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 537709E01F40AFD80041A64F /* NotoSerif-Italic.ttf */; }; + 53581E9925F7DF0A000DAD54 /* NotoSerif-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 537709E11F40AFD80041A64F /* NotoSerif-Regular.ttf */; }; + 53581E9C25F7DF19000DAD54 /* Noteworthy.plist in Resources */ = {isa = PBXBuildFile; fileRef = 537919321F3FA0CF00FF9E25 /* Noteworthy.plist */; }; + 53581E9E25F7DF1B000DAD54 /* NotoSerif.plist in Resources */ = {isa = PBXBuildFile; fileRef = 537709E51F40B18B0041A64F /* NotoSerif.plist */; }; + 53A0BBE925F912AF0061BB67 /* SamplerUIApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53A0BBE825F912AF0061BB67 /* SamplerUIApp.swift */; }; + 53A0BBEB25F912AF0061BB67 /* StyleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53A0BBEA25F912AF0061BB67 /* StyleView.swift */; }; + 53A0BBED25F912B00061BB67 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 53A0BBEC25F912B00061BB67 /* Assets.xcassets */; }; + 53A0BBF025F912B00061BB67 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 53A0BBEF25F912B00061BB67 /* Preview Assets.xcassets */; }; + 53A0BC0625F916180061BB67 /* ScaledFont in Frameworks */ = {isa = PBXBuildFile; productRef = 53A0BC0525F916180061BB67 /* ScaledFont */; }; + 53A0BC0925F9193F0061BB67 /* Noteworthy.plist in Resources */ = {isa = PBXBuildFile; fileRef = 537919321F3FA0CF00FF9E25 /* Noteworthy.plist */; }; + 53A0BC0C25F919420061BB67 /* NotoSerif.plist in Resources */ = {isa = PBXBuildFile; fileRef = 537709E51F40B18B0041A64F /* NotoSerif.plist */; }; + 53A0BC0F25F919480061BB67 /* NotoSerif-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 537709DE1F40AFD80041A64F /* NotoSerif-Bold.ttf */; }; + 53A0BC1225F9194B0061BB67 /* NotoSerif-Italic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 537709E01F40AFD80041A64F /* NotoSerif-Italic.ttf */; }; + 53A0BC1525F9194F0061BB67 /* NotoSerif-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 537709E11F40AFD80041A64F /* NotoSerif-Regular.ttf */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 53581E7725F7D6B6000DAD54 /* Sampler.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sampler.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 53581E7925F7D6B6000DAD54 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 53581E7B25F7D6B6000DAD54 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 53581E7D25F7D6B6000DAD54 /* StyleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StyleViewController.swift; sourceTree = ""; }; + 53581E8025F7D6B6000DAD54 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 53581E8225F7D6B6000DAD54 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 53581E8725F7D6B6000DAD54 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 537709DD1F40AFD80041A64F /* LICENSE.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE.txt; sourceTree = ""; }; 537709DE1F40AFD80041A64F /* NotoSerif-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSerif-Bold.ttf"; sourceTree = ""; }; 537709DF1F40AFD80041A64F /* NotoSerif-BoldItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSerif-BoldItalic.ttf"; sourceTree = ""; }; @@ -28,28 +45,55 @@ 537709E11F40AFD80041A64F /* NotoSerif-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSerif-Regular.ttf"; sourceTree = ""; }; 537709E51F40B18B0041A64F /* NotoSerif.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = NotoSerif.plist; sourceTree = ""; }; 537709E71F40F3B80041A64F /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; - 5379191B1F3FA05700FF9E25 /* ScaledFont.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScaledFont.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 5379191E1F3FA05700FF9E25 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 537919201F3FA05700FF9E25 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 537919231F3FA05700FF9E25 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 537919251F3FA05700FF9E25 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 537919281F3FA05700FF9E25 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 5379192A1F3FA05700FF9E25 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 537919301F3FA0B500FF9E25 /* ScaledFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScaledFont.swift; sourceTree = ""; }; 537919321F3FA0CF00FF9E25 /* Noteworthy.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Noteworthy.plist; sourceTree = ""; }; + 53A0BBE625F912AF0061BB67 /* SamplerUI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SamplerUI.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 53A0BBE825F912AF0061BB67 /* SamplerUIApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SamplerUIApp.swift; sourceTree = ""; }; + 53A0BBEA25F912AF0061BB67 /* StyleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StyleView.swift; sourceTree = ""; }; + 53A0BBEC25F912B00061BB67 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 53A0BBEF25F912B00061BB67 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 53A0BBF125F912B00061BB67 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 537919181F3FA05700FF9E25 /* Frameworks */ = { + 53581E7425F7D6B6000DAD54 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 53581E8E25F7D6C0000DAD54 /* ScaledFont in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 53A0BBE325F912AF0061BB67 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 53A0BC0625F916180061BB67 /* ScaledFont in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 53581E7825F7D6B6000DAD54 /* Sampler */ = { + isa = PBXGroup; + children = ( + 53581E7925F7D6B6000DAD54 /* AppDelegate.swift */, + 53581E7B25F7D6B6000DAD54 /* SceneDelegate.swift */, + 53581E7D25F7D6B6000DAD54 /* StyleViewController.swift */, + 53581E7F25F7D6B6000DAD54 /* Main.storyboard */, + 53581E8225F7D6B6000DAD54 /* Assets.xcassets */, + 53581E8725F7D6B6000DAD54 /* Info.plist */, + ); + path = Sampler; + sourceTree = ""; + }; + 53581E8C25F7D6C0000DAD54 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; 537709DC1F40AFD80041A64F /* Noto_Serif */ = { isa = PBXGroup; children = ( @@ -66,54 +110,94 @@ isa = PBXGroup; children = ( 537709E71F40F3B80041A64F /* README.md */, - 5379191D1F3FA05700FF9E25 /* ScaledFont */, + 5379191D1F3FA05700FF9E25 /* Fonts */, + 53581E7825F7D6B6000DAD54 /* Sampler */, + 53A0BBE725F912AF0061BB67 /* SamplerUI */, 5379191C1F3FA05700FF9E25 /* Products */, + 53581E8C25F7D6C0000DAD54 /* Frameworks */, ); sourceTree = ""; }; 5379191C1F3FA05700FF9E25 /* Products */ = { isa = PBXGroup; children = ( - 5379191B1F3FA05700FF9E25 /* ScaledFont.app */, + 53581E7725F7D6B6000DAD54 /* Sampler.app */, + 53A0BBE625F912AF0061BB67 /* SamplerUI.app */, ); name = Products; sourceTree = ""; }; - 5379191D1F3FA05700FF9E25 /* ScaledFont */ = { + 5379191D1F3FA05700FF9E25 /* Fonts */ = { isa = PBXGroup; children = ( 537709DC1F40AFD80041A64F /* Noto_Serif */, - 5379191E1F3FA05700FF9E25 /* AppDelegate.swift */, - 537919201F3FA05700FF9E25 /* ViewController.swift */, - 537919301F3FA0B500FF9E25 /* ScaledFont.swift */, 537919321F3FA0CF00FF9E25 /* Noteworthy.plist */, 537709E51F40B18B0041A64F /* NotoSerif.plist */, - 537919221F3FA05700FF9E25 /* Main.storyboard */, - 537919251F3FA05700FF9E25 /* Assets.xcassets */, - 537919271F3FA05700FF9E25 /* LaunchScreen.storyboard */, - 5379192A1F3FA05700FF9E25 /* Info.plist */, ); - path = ScaledFont; + path = Fonts; + sourceTree = ""; + }; + 53A0BBE725F912AF0061BB67 /* SamplerUI */ = { + isa = PBXGroup; + children = ( + 53A0BBE825F912AF0061BB67 /* SamplerUIApp.swift */, + 53A0BBEA25F912AF0061BB67 /* StyleView.swift */, + 53A0BBEC25F912B00061BB67 /* Assets.xcassets */, + 53A0BBF125F912B00061BB67 /* Info.plist */, + 53A0BBEE25F912B00061BB67 /* Preview Content */, + ); + path = SamplerUI; + sourceTree = ""; + }; + 53A0BBEE25F912B00061BB67 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 53A0BBEF25F912B00061BB67 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 5379191A1F3FA05700FF9E25 /* ScaledFont */ = { + 53581E7625F7D6B6000DAD54 /* Sampler */ = { isa = PBXNativeTarget; - buildConfigurationList = 5379192D1F3FA05700FF9E25 /* Build configuration list for PBXNativeTarget "ScaledFont" */; + buildConfigurationList = 53581E8825F7D6B6000DAD54 /* Build configuration list for PBXNativeTarget "Sampler" */; buildPhases = ( - 537919171F3FA05700FF9E25 /* Sources */, - 537919181F3FA05700FF9E25 /* Frameworks */, - 537919191F3FA05700FF9E25 /* Resources */, + 53581E7325F7D6B6000DAD54 /* Sources */, + 53581E7425F7D6B6000DAD54 /* Frameworks */, + 53581E7525F7D6B6000DAD54 /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = ScaledFont; - productName = ScaledFont; - productReference = 5379191B1F3FA05700FF9E25 /* ScaledFont.app */; + name = Sampler; + packageProductDependencies = ( + 53581E8D25F7D6C0000DAD54 /* ScaledFont */, + ); + productName = Sampler; + productReference = 53581E7725F7D6B6000DAD54 /* Sampler.app */; + productType = "com.apple.product-type.application"; + }; + 53A0BBE525F912AF0061BB67 /* SamplerUI */ = { + isa = PBXNativeTarget; + buildConfigurationList = 53A0BBF225F912B00061BB67 /* Build configuration list for PBXNativeTarget "SamplerUI" */; + buildPhases = ( + 53A0BBE225F912AF0061BB67 /* Sources */, + 53A0BBE325F912AF0061BB67 /* Frameworks */, + 53A0BBE425F912AF0061BB67 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SamplerUI; + packageProductDependencies = ( + 53A0BC0525F916180061BB67 /* ScaledFont */, + ); + productName = SamplerUI; + productReference = 53A0BBE625F912AF0061BB67 /* SamplerUI.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -122,13 +206,15 @@ 537919131F3FA05700FF9E25 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0900; - LastUpgradeCheck = 0940; + LastSwiftUpdateCheck = 1240; + LastUpgradeCheck = 1310; ORGANIZATIONNAME = "Keith Harrison"; TargetAttributes = { - 5379191A1F3FA05700FF9E25 = { - CreatedOnToolsVersion = 9.0; - LastSwiftMigration = 1020; + 53581E7625F7D6B6000DAD54 = { + CreatedOnToolsVersion = 12.4; + }; + 53A0BBE525F912AF0061BB67 = { + CreatedOnToolsVersion = 12.4; }; }; }; @@ -141,66 +227,129 @@ Base, ); mainGroup = 537919121F3FA05700FF9E25; + packageReferences = ( + 53581E6D25F7D4C1000DAD54 /* XCRemoteSwiftPackageReference "ScaledFont" */, + ); productRefGroup = 5379191C1F3FA05700FF9E25 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 5379191A1F3FA05700FF9E25 /* ScaledFont */, + 53581E7625F7D6B6000DAD54 /* Sampler */, + 53A0BBE525F912AF0061BB67 /* SamplerUI */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 537919191F3FA05700FF9E25 /* Resources */ = { + 53581E7525F7D6B6000DAD54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 53581E8325F7D6B6000DAD54 /* Assets.xcassets in Resources */, + 53581E9925F7DF0A000DAD54 /* NotoSerif-Regular.ttf in Resources */, + 53581E9725F7DF07000DAD54 /* NotoSerif-Italic.ttf in Resources */, + 53581E9C25F7DF19000DAD54 /* Noteworthy.plist in Resources */, + 53581E9325F7DEFF000DAD54 /* NotoSerif-Bold.ttf in Resources */, + 53581E9E25F7DF1B000DAD54 /* NotoSerif.plist in Resources */, + 53581E8125F7D6B6000DAD54 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 53A0BBE425F912AF0061BB67 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 537919291F3FA05700FF9E25 /* LaunchScreen.storyboard in Resources */, - 537709E31F40B06B0041A64F /* NotoSerif-Regular.ttf in Resources */, - 537709E61F40B18B0041A64F /* NotoSerif.plist in Resources */, - 537709E41F40B06F0041A64F /* NotoSerif-Italic.ttf in Resources */, - 537709DB1F4061130041A64F /* Noteworthy.plist in Resources */, - 537709E21F40B0650041A64F /* NotoSerif-Bold.ttf in Resources */, - 537919261F3FA05700FF9E25 /* Assets.xcassets in Resources */, - 537919241F3FA05700FF9E25 /* Main.storyboard in Resources */, + 53A0BC0925F9193F0061BB67 /* Noteworthy.plist in Resources */, + 53A0BBF025F912B00061BB67 /* Preview Assets.xcassets in Resources */, + 53A0BC1225F9194B0061BB67 /* NotoSerif-Italic.ttf in Resources */, + 53A0BC1525F9194F0061BB67 /* NotoSerif-Regular.ttf in Resources */, + 53A0BC0F25F919480061BB67 /* NotoSerif-Bold.ttf in Resources */, + 53A0BC0C25F919420061BB67 /* NotoSerif.plist in Resources */, + 53A0BBED25F912B00061BB67 /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 537919171F3FA05700FF9E25 /* Sources */ = { + 53581E7325F7D6B6000DAD54 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 537919311F3FA0B500FF9E25 /* ScaledFont.swift in Sources */, - 537919211F3FA05700FF9E25 /* ViewController.swift in Sources */, - 5379191F1F3FA05700FF9E25 /* AppDelegate.swift in Sources */, + 53581E7E25F7D6B6000DAD54 /* StyleViewController.swift in Sources */, + 53581E7A25F7D6B6000DAD54 /* AppDelegate.swift in Sources */, + 53581E7C25F7D6B6000DAD54 /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 53A0BBE225F912AF0061BB67 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 53A0BBEB25F912AF0061BB67 /* StyleView.swift in Sources */, + 53A0BBE925F912AF0061BB67 /* SamplerUIApp.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ - 537919221F3FA05700FF9E25 /* Main.storyboard */ = { + 53581E7F25F7D6B6000DAD54 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( - 537919231F3FA05700FF9E25 /* Base */, + 53581E8025F7D6B6000DAD54 /* Base */, ); name = Main.storyboard; sourceTree = ""; }; - 537919271F3FA05700FF9E25 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 537919281F3FA05700FF9E25 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 53581E8925F7D6B6000DAD54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = LCC2J94N44; + INFOPLIST_FILE = Sampler/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.useyourloaf.Sampler; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 53581E8A25F7D6B6000DAD54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = LCC2J94N44; + INFOPLIST_FILE = Sampler/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.useyourloaf.Sampler; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; 5379192B1F3FA05700FF9E25 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -226,6 +375,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -251,7 +401,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -285,6 +435,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -304,7 +455,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; @@ -313,34 +464,49 @@ }; name = Release; }; - 5379192E1F3FA05700FF9E25 /* Debug */ = { + 53A0BBF325F912B00061BB67 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"SamplerUI/Preview Content\""; DEVELOPMENT_TEAM = LCC2J94N44; - INFOPLIST_FILE = ScaledFont/Info.plist; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = SamplerUI/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.useyourloaf.ScaledFont; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.useyourloaf.SamplerUI; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 5379192F1F3FA05700FF9E25 /* Release */ = { + 53A0BBF425F912B00061BB67 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_ASSET_PATHS = "\"SamplerUI/Preview Content\""; DEVELOPMENT_TEAM = LCC2J94N44; - INFOPLIST_FILE = ScaledFont/Info.plist; + ENABLE_PREVIEWS = YES; + INFOPLIST_FILE = SamplerUI/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = com.useyourloaf.ScaledFont; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.useyourloaf.SamplerUI; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -350,6 +516,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 53581E8825F7D6B6000DAD54 /* Build configuration list for PBXNativeTarget "Sampler" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 53581E8925F7D6B6000DAD54 /* Debug */, + 53581E8A25F7D6B6000DAD54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 537919161F3FA05700FF9E25 /* Build configuration list for PBXProject "ScaledFont" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -359,16 +534,40 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 5379192D1F3FA05700FF9E25 /* Build configuration list for PBXNativeTarget "ScaledFont" */ = { + 53A0BBF225F912B00061BB67 /* Build configuration list for PBXNativeTarget "SamplerUI" */ = { isa = XCConfigurationList; buildConfigurations = ( - 5379192E1F3FA05700FF9E25 /* Debug */, - 5379192F1F3FA05700FF9E25 /* Release */, + 53A0BBF325F912B00061BB67 /* Debug */, + 53A0BBF425F912B00061BB67 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 53581E6D25F7D4C1000DAD54 /* XCRemoteSwiftPackageReference "ScaledFont" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "git@github.com:kharrison/ScaledFont.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 1.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 53581E8D25F7D6C0000DAD54 /* ScaledFont */ = { + isa = XCSwiftPackageProductDependency; + package = 53581E6D25F7D4C1000DAD54 /* XCRemoteSwiftPackageReference "ScaledFont" */; + productName = ScaledFont; + }; + 53A0BC0525F916180061BB67 /* ScaledFont */ = { + isa = XCSwiftPackageProductDependency; + package = 53581E6D25F7D4C1000DAD54 /* XCRemoteSwiftPackageReference "ScaledFont" */; + productName = ScaledFont; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 537919131F3FA05700FF9E25 /* Project object */; } diff --git a/ScaledFont/ScaledFont.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ScaledFont/ScaledFont.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ScaledFont/ScaledFont.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ScaledFont/ScaledFont.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ScaledFont/ScaledFont.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ScaledFont/ScaledFont.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ScaledFont/ScaledFont.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ScaledFont/ScaledFont.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..7c6899c --- /dev/null +++ b/ScaledFont/ScaledFont.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,16 @@ +{ + "object": { + "pins": [ + { + "package": "ScaledFont", + "repositoryURL": "git@github.com:kharrison/ScaledFont.git", + "state": { + "branch": null, + "revision": "1dd4fad0ef73a62141231b604a4b1f2e50f71152", + "version": "1.0.4" + } + } + ] + }, + "version": 1 +} diff --git a/ScaledFont/ScaledFont/Base.lproj/LaunchScreen.storyboard b/ScaledFont/ScaledFont/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f83f6fd..0000000 --- a/ScaledFont/ScaledFont/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ScaledFont/ScaledFont/Base.lproj/Main.storyboard b/ScaledFont/ScaledFont/Base.lproj/Main.storyboard deleted file mode 100644 index f995ddd..0000000 --- a/ScaledFont/ScaledFont/Base.lproj/Main.storyboard +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ScaledFont/ScaledFont/ScaledFont.swift b/ScaledFont/ScaledFont/ScaledFont.swift deleted file mode 100644 index 09b8b81..0000000 --- a/ScaledFont/ScaledFont/ScaledFont.swift +++ /dev/null @@ -1,113 +0,0 @@ -// Created by Keith Harrison https://useyourloaf.com -// Copyright (c) 2017 Keith Harrison. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -import UIKit - -/// A utility class to help you use custom fonts with -/// dynamic type. -/// -/// To use this class you must supply the name of a style -/// dictionary for the font when creating the class. The -/// style dictionary should be stored as a property list -/// file in the main bundle. -/// -/// The style dictionary contains an entry for each text -/// style that uses the raw string value for each -/// `UIFontTextStyle` as the key. -/// -/// The value of each entry is a dictionary with two keys: -/// -/// + fontName: A String which is the font name. -/// + fontSize: A number which is the point size to use -/// at the `.large` content size. -/// -/// For example to use a 17 pt Noteworthy-Bold font -/// for the `.headline` style at the `.large` content size: -/// -/// -/// UICTFontTextStyleHeadline -/// -/// fontName -/// Noteworthy-Bold -/// fontSize -/// 17 -/// -/// -/// -/// You do not need to include an entry for every text style -/// but if you try to use a text style that is not included -/// in the dictionary it will fallback to the system preferred -/// font. - -public final class ScaledFont { - private struct FontDescription: Decodable { - let fontSize: CGFloat - let fontName: String - } - - private typealias StyleDictionary = [UIFont.TextStyle.RawValue: FontDescription] - private var styleDictionary: StyleDictionary? - - /// Create a `ScaledFont` - /// - /// - Parameter fontName: Name of a plist file (without the extension) - /// in the main bundle that contains the style dictionary used to - /// scale fonts for each text style. - - public init(fontName: String) { - if let url = Bundle.main.url(forResource: fontName, withExtension: "plist"), - let data = try? Data(contentsOf: url) { - let decoder = PropertyListDecoder() - styleDictionary = try? decoder.decode(StyleDictionary.self, from: data) - } - } - - /// Get the scaled font for the given text style using the - /// style dictionary supplied at initialization. - /// - /// - Parameter textStyle: The `UIFontTextStyle` for the - /// font. - /// - Returns: A `UIFont` of the custom font that has been - /// scaled for the users currently selected preferred - /// text size. - /// - /// - Note: If the style dictionary does not have - /// a font for this text style the default preferred - /// font is returned. - - public func font(forTextStyle textStyle: UIFont.TextStyle) -> UIFont { - guard let fontDescription = styleDictionary?[textStyle.rawValue], - let font = UIFont(name: fontDescription.fontName, size: fontDescription.fontSize) else { - return UIFont.preferredFont(forTextStyle: textStyle) - } - - let fontMetrics = UIFontMetrics(forTextStyle: textStyle) - return fontMetrics.scaledFont(for: font) - } -} diff --git a/ScrollGuide-IB/ScrollGuide-IB.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ScrollGuide-IB/ScrollGuide-IB.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..c1131c3 --- /dev/null +++ b/ScrollGuide-IB/ScrollGuide-IB.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ScrollGuide-IB/ScrollGuide-IB.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ScrollGuide-IB/ScrollGuide-IB.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ScrollGuide-IB/ScrollGuide-IB.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ScrollGuide/ScrollGuide.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ScrollGuide/ScrollGuide.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..fe07a26 --- /dev/null +++ b/ScrollGuide/ScrollGuide.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ScrollGuide/ScrollGuide.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ScrollGuide/ScrollGuide.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ScrollGuide/ScrollGuide.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/SelfSize/SelfSize.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SelfSize/SelfSize.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..347c940 --- /dev/null +++ b/SelfSize/SelfSize.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/SelfSize/SelfSize.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/SelfSize/SelfSize.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/SelfSize/SelfSize.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/SpeakEasy/SpeakEasy.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SpeakEasy/SpeakEasy.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..6e6878a --- /dev/null +++ b/SpeakEasy/SpeakEasy.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/SpeakEasy/SpeakEasy.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/SpeakEasy/SpeakEasy.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/SpeakEasy/SpeakEasy.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/StackMargin/StackMargin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/StackMargin/StackMargin.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..6bfc5e4 --- /dev/null +++ b/StackMargin/StackMargin.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/StackMargin/StackMargin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/StackMargin/StackMargin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/StackMargin/StackMargin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Stacks/Stacks.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Stacks/Stacks.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..8da2040 --- /dev/null +++ b/Stacks/Stacks.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Stacks/Stacks.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Stacks/Stacks.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Stacks/Stacks.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/StaticTableDynamicType/StaticTable.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/StaticTableDynamicType/StaticTable.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..0502574 --- /dev/null +++ b/StaticTableDynamicType/StaticTable.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/StaticTableDynamicType/StaticTable.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/StaticTableDynamicType/StaticTable.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/StaticTableDynamicType/StaticTable.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Swiper/Swiper.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Swiper/Swiper.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..683cb83 --- /dev/null +++ b/Swiper/Swiper.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Swiper/Swiper.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Swiper/Swiper.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Swiper/Swiper.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/TableHeader/TableHeaderObjC/TableHeaderObjC.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TableHeader/TableHeaderObjC/TableHeaderObjC.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..29776e6 --- /dev/null +++ b/TableHeader/TableHeaderObjC/TableHeaderObjC.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TableHeader/TableHeaderObjC/TableHeaderObjC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/TableHeader/TableHeaderObjC/TableHeaderObjC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/TableHeader/TableHeaderObjC/TableHeaderObjC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/TableHeader/TableHeaderSwift/TableHeader.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TableHeader/TableHeaderSwift/TableHeader.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..b52f47c --- /dev/null +++ b/TableHeader/TableHeaderSwift/TableHeader.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TableHeader/TableHeaderSwift/TableHeader.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/TableHeader/TableHeaderSwift/TableHeader.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/TableHeader/TableHeaderSwift/TableHeader.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ToDoSync/ToDoSync.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ToDoSync/ToDoSync.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ToDoSync/ToDoSync.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Validate/Validate.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Validate/Validate.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..5d56381 --- /dev/null +++ b/Validate/Validate.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Validate/Validate.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Validate/Validate.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Validate/Validate.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Vector/Vector.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Vector/Vector.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..43c56f3 --- /dev/null +++ b/Vector/Vector.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Vector/Vector.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Vector/Vector.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Vector/Vector.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/WorldFacts/WorldFacts.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/WorldFacts/WorldFacts.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..c3a4c72 --- /dev/null +++ b/WorldFacts/WorldFacts.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/WorldFacts/WorldFacts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/WorldFacts/WorldFacts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/WorldFacts/WorldFacts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + +