Commit c375e223 authored by zhangzhe's avatar zhangzhe

输入页面

parent 970a015a
......@@ -1787,6 +1787,71 @@
};
name = Release;
};
4EBC741460BC710C963D24CAAB3BC925 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"POD_CONFIGURATION_DEBUG=1",
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SYMROOT = "${SRCROOT}/../build";
};
name = Debug;
};
6840A9ACD2F8C2721DE26BB23C8ADB95 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 065ED27E5D57D645E59B64BCB1F36C60 /* SwiftyStoreKit.release.xcconfig */;
......@@ -1859,10 +1924,27 @@
};
name = Release;
};
8F17DC3A99F99FBAD606CE6963886315 /* Release */ = {
9FD31209C4ACBFD411501DF073A684CF /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 3D0AB3F0BDF20A809D40186C195B6CC5 /* UMCCommon.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
A40FB7C4B9460AE765A736AB575EEB32 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
......@@ -1919,86 +2001,6 @@
};
name = Release;
};
916E0404255105F480DC4950B7625F7A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"POD_CONFIGURATION_DEBUG=1",
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SYMROOT = "${SRCROOT}/../build";
};
name = Debug;
};
9FD31209C4ACBFD411501DF073A684CF /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 3D0AB3F0BDF20A809D40186C195B6CC5 /* UMCCommon.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
A89CCE97470F3A0B25E68312A6ABE339 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = A59C945437ACB94722E119956E805AEC /* IQKeyboardManagerSwift.release.xcconfig */;
......@@ -2382,8 +2384,8 @@
4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = {
isa = XCConfigurationList;
buildConfigurations = (
916E0404255105F480DC4950B7625F7A /* Debug */,
8F17DC3A99F99FBAD606CE6963886315 /* Release */,
4EBC741460BC710C963D24CAAB3BC925 /* Debug */,
A40FB7C4B9460AE765A736AB575EEB32 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
......
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForAnalyzing = "YES"
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EAAA1AD3A8A1B59AB91319EE40752C6D"
BuildableName = "Alamofire.framework"
BlueprintName = "Alamofire"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
buildConfiguration = "Debug"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForAnalyzing = "YES"
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B490E7485944099E16C9CBD79119D1D4"
BuildableName = "IQKeyboardManagerSwift.framework"
BlueprintName = "IQKeyboardManagerSwift"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
buildConfiguration = "Debug"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForAnalyzing = "YES"
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "82B0A41D3031FF27D78E17B0A9A46FB0"
BuildableName = "MBProgressHUD.framework"
BlueprintName = "MBProgressHUD"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
buildConfiguration = "Debug"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForAnalyzing = "YES"
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "55AF53E6C77A10ED4985E04D74A8878E"
BuildableName = "Masonry.framework"
BlueprintName = "Masonry"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
buildConfiguration = "Debug"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForAnalyzing = "YES"
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FF6E62D8BE0F25781A37BB7EC37F6318"
BuildableName = "PDFGenerator.framework"
BlueprintName = "PDFGenerator"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
buildConfiguration = "Debug"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "980EE0951935E95C87E56A4F18BF6BF5"
BuildableName = "Pods_ShorthandMaster.framework"
BlueprintName = "Pods-ShorthandMaster"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForAnalyzing = "YES"
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "19622742EBA51E823D6DAE3F8CDBFAD4"
BuildableName = "SnapKit.framework"
BlueprintName = "SnapKit"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
buildConfiguration = "Debug"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForAnalyzing = "YES"
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D118A6A04828FD3CDA8640CD2B6796D2"
BuildableName = "SwiftyJSON.framework"
BlueprintName = "SwiftyJSON"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
buildConfiguration = "Debug"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForAnalyzing = "YES"
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FCD4F1901DD86FEB184BFDD6673F4A7B"
BuildableName = "SwiftyStoreKit.framework"
BlueprintName = "SwiftyStoreKit"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
buildConfiguration = "Debug"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForAnalyzing = "YES"
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6F6B630FA5213AB083E7CEF1F986FE44"
BuildableName = "UMCCommon"
BlueprintName = "UMCCommon"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
buildConfiguration = "Debug"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Alamofire.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>IQKeyboardManagerSwift.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>MBProgressHUD.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>Masonry.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>PDFGenerator.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>Pods-ShorthandMaster.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>SnapKit.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>SwiftyJSON.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>SwiftyStoreKit.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>UMCCommon.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict/>
</dict>
</plist>
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Alamofire
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
......@@ -5,6 +6,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Alamofire
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Alamofire
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
......@@ -5,6 +6,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Alamofire
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "Foundation" -framework "QuartzCore" -framework "UIKit"
......@@ -6,6 +7,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/IQKeyboardManagerSwift
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "Foundation" -framework "QuartzCore" -framework "UIKit"
......@@ -6,6 +7,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/IQKeyboardManagerSwift
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "QuartzCore"
......@@ -5,6 +6,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/MBProgressHUD
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "QuartzCore"
......@@ -5,6 +6,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/MBProgressHUD
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "UIKit"
......@@ -5,6 +6,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Masonry
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "UIKit"
......@@ -5,6 +6,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Masonry
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PDFGenerator
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_LDFLAGS = $(inherited) -framework "WebKit"
......@@ -6,6 +7,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/PDFGenerator
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PDFGenerator
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_LDFLAGS = $(inherited) -framework "WebKit"
......@@ -6,6 +7,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/PDFGenerator
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
......@@ -19,9 +19,8 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
BCSYMBOLMAP_DIR="BCSymbolMaps"
# Used as a return value for each invocation of `strip_invalid_archs` function.
STRIP_BINARY_RETVAL=0
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
......@@ -45,6 +44,16 @@ install_framework()
source="$(readlink "${source}")"
fi
if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then
# Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied
find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do
echo "Installing $f"
install_bcsymbolmap "$f" "$destination"
rm "$f"
done
rmdir "${source}/${BCSYMBOLMAP_DIR}"
fi
# Use filter instead of exclude so missing patterns don't throw errors.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
......@@ -80,7 +89,6 @@ install_framework()
done
fi
}
# Copies and strips a vendored dSYM
install_dsym() {
local source="$1"
......@@ -95,12 +103,11 @@ install_dsym() {
binary_name="$(ls "$source/Contents/Resources/DWARF")"
binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}"
# Strip invalid architectures so "fat" simulator / device frameworks work on device
# Strip invalid architectures from the dSYM.
if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then
strip_invalid_archs "$binary" "$warn_missing_arch"
fi
if [[ $STRIP_BINARY_RETVAL == 1 ]]; then
if [[ $STRIP_BINARY_RETVAL == 0 ]]; then
# Move the stripped file into its final destination.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
......@@ -111,28 +118,8 @@ install_dsym() {
fi
}
# Copies the bcsymbolmap files of a vendored framework
install_bcsymbolmap() {
local bcsymbolmap_path="$1"
local destination="${BUILT_PRODUCTS_DIR}"
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"
}
# Signs a framework with the provided identity
code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
# Use the current code_sign_identity
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'"
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
code_sign_cmd="$code_sign_cmd &"
fi
echo "$code_sign_cmd"
eval "$code_sign_cmd"
fi
}
# Used as a return value for each invocation of `strip_invalid_archs` function.
STRIP_BINARY_RETVAL=0
# Strip invalid architectures
strip_invalid_archs() {
......@@ -147,7 +134,7 @@ strip_invalid_archs() {
if [[ "$warn_missing_arch" == "true" ]]; then
echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
fi
STRIP_BINARY_RETVAL=0
STRIP_BINARY_RETVAL=1
return
fi
stripped=""
......@@ -161,40 +148,31 @@ strip_invalid_archs() {
if [[ "$stripped" ]]; then
echo "Stripped $binary of architectures:$stripped"
fi
STRIP_BINARY_RETVAL=1
STRIP_BINARY_RETVAL=0
}
install_artifact() {
artifact="$1"
base="$(basename "$artifact")"
case $base in
*.framework)
install_framework "$artifact"
;;
*.dSYM)
# Suppress arch warnings since XCFrameworks will include many dSYM files
install_dsym "$artifact" "false"
;;
*.bcsymbolmap)
install_bcsymbolmap "$artifact"
;;
*)
echo "error: Unrecognized artifact "$artifact""
;;
esac
# Copies the bcsymbolmap files of a vendored framework
install_bcsymbolmap() {
local bcsymbolmap_path="$1"
local destination="${BUILT_PRODUCTS_DIR}"
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"
}
copy_artifacts() {
file_list="$1"
while read artifact; do
install_artifact "$artifact"
done <$file_list
}
# Signs a framework with the provided identity
code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
# Use the current code_sign_identity
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'"
ARTIFACT_LIST_FILE="${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt"
if [ -r "${ARTIFACT_LIST_FILE}" ]; then
copy_artifacts "${ARTIFACT_LIST_FILE}"
fi
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
code_sign_cmd="$code_sign_cmd &"
fi
echo "$code_sign_cmd"
eval "$code_sign_cmd"
fi
}
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework"
......
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/PDFGenerator" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStoreKit" "${PODS_ROOT}/UMCCommon"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PDFGenerator/PDFGenerator.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON/SwiftyJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStoreKit/SwiftyStoreKit.framework/Headers"
......@@ -9,4 +10,5 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry" "${PODS_CONFIGURATION_BUILD_DIR}/PDFGenerator" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStoreKit" "${PODS_ROOT}/UMCCommon"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Masonry/Masonry.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/PDFGenerator/PDFGenerator.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON/SwiftyJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStoreKit/SwiftyStoreKit.framework/Headers"
......@@ -9,4 +10,5 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapKit
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
......@@ -5,6 +6,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/SnapKit
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapKit
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
......@@ -5,6 +6,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/SnapKit
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
......@@ -5,6 +6,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftyJSON
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
......@@ -5,6 +6,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftyJSON
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStoreKit
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
......@@ -5,6 +6,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftyStoreKit
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftyStoreKit
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
......@@ -5,6 +6,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftyStoreKit
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/UMCCommon
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/UMCCommon"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
......@@ -6,6 +7,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/UMCCommon
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/UMCCommon
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/UMCCommon"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
......@@ -6,6 +7,7 @@ PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/UMCCommon
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
......@@ -128,6 +128,14 @@
A9A16C822519DDC400DE0FEE /* ActivityTestView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9A16C7D2519DDC400DE0FEE /* ActivityTestView.swift */; };
A9A16C962519FB1700DE0FEE /* SHRecordRenameAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9A16C952519FB1700DE0FEE /* SHRecordRenameAlertView.swift */; };
A9A16C9E2519FD0E00DE0FEE /* SHRecordRenameAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9A16C9D2519FD0E00DE0FEE /* SHRecordRenameAlertView.xib */; };
CC13DB6A251C83E600835654 /* SHInputViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC13DB69251C83E600835654 /* SHInputViewModel.swift */; };
CC13DB6F251C972600835654 /* SHInputModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC13DB6E251C972600835654 /* SHInputModel.swift */; };
CC13DB74251C9A2F00835654 /* SHInputTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC13DB73251C9A2F00835654 /* SHInputTextView.swift */; };
CC13DB79251CA62800835654 /* SHImputAudioButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC13DB78251CA62800835654 /* SHImputAudioButton.swift */; };
CC29A704251C50520059BD5C /* SHInputController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC29A703251C50520059BD5C /* SHInputController.swift */; };
CC29A709251C71AC0059BD5C /* SHSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC29A708251C71AC0059BD5C /* SHSwift.swift */; };
CC29A716251C75210059BD5C /* SHInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC29A715251C75210059BD5C /* SHInputView.swift */; };
CC29A71B251C790D0059BD5C /* SHInputBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC29A71A251C790D0059BD5C /* SHInputBottomView.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
......@@ -318,6 +326,14 @@
A9A16C952519FB1700DE0FEE /* SHRecordRenameAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHRecordRenameAlertView.swift; sourceTree = "<group>"; };
A9A16C9D2519FD0E00DE0FEE /* SHRecordRenameAlertView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SHRecordRenameAlertView.xib; sourceTree = "<group>"; };
C47F440803385C784B8FFF5E /* Pods-ShorthandMaster.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ShorthandMaster.release.xcconfig"; path = "Target Support Files/Pods-ShorthandMaster/Pods-ShorthandMaster.release.xcconfig"; sourceTree = "<group>"; };
CC13DB69251C83E600835654 /* SHInputViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputViewModel.swift; sourceTree = "<group>"; };
CC13DB6E251C972600835654 /* SHInputModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputModel.swift; sourceTree = "<group>"; };
CC13DB73251C9A2F00835654 /* SHInputTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputTextView.swift; sourceTree = "<group>"; };
CC13DB78251CA62800835654 /* SHImputAudioButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHImputAudioButton.swift; sourceTree = "<group>"; };
CC29A703251C50520059BD5C /* SHInputController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputController.swift; sourceTree = "<group>"; };
CC29A708251C71AC0059BD5C /* SHSwift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHSwift.swift; sourceTree = "<group>"; };
CC29A715251C75210059BD5C /* SHInputView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputView.swift; sourceTree = "<group>"; };
CC29A71A251C790D0059BD5C /* SHInputBottomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SHInputBottomView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -540,12 +556,14 @@
A950F5B224F4E5A4007AB63E /* Other */,
A950F5AD24F4E003007AB63E /* Mine */,
A95CE03024E151730066DAE6 /* Record */,
CC29A70D251C74A00059BD5C /* Input */,
A95CDFAB24E0EBF10066DAE6 /* Base */,
A95CDFB724E0EBF10066DAE6 /* Contstants */,
A95CDF9824E0EBF10066DAE6 /* Extensions */,
A95CDFEC24E0F42E0066DAE6 /* Share */,
A95CDF6724E0E8B50066DAE6 /* AppDelegate.swift */,
A95CE02B24E140420066DAE6 /* PrefixHeader.pch */,
CC29A708251C71AC0059BD5C /* SHSwift.swift */,
A95CE01A24E0FA460066DAE6 /* ShorthandMaster-Bridging-Header.h */,
A95CDF6D24E0E8B50066DAE6 /* Main.storyboard */,
A95CDF7024E0E8B80066DAE6 /* Assets.xcassets */,
......@@ -789,6 +807,52 @@
path = PopView;
sourceTree = "<group>";
};
CC29A70D251C74A00059BD5C /* Input */ = {
isa = PBXGroup;
children = (
CC29A711251C74BD0059BD5C /* Controller */,
CC29A710251C74B90059BD5C /* ViewModel */,
CC29A70F251C74B40059BD5C /* Model */,
CC29A70E251C74AA0059BD5C /* View */,
);
path = Input;
sourceTree = "<group>";
};
CC29A70E251C74AA0059BD5C /* View */ = {
isa = PBXGroup;
children = (
CC29A715251C75210059BD5C /* SHInputView.swift */,
CC13DB73251C9A2F00835654 /* SHInputTextView.swift */,
CC29A71A251C790D0059BD5C /* SHInputBottomView.swift */,
CC13DB78251CA62800835654 /* SHImputAudioButton.swift */,
);
path = View;
sourceTree = "<group>";
};
CC29A70F251C74B40059BD5C /* Model */ = {
isa = PBXGroup;
children = (
CC13DB6E251C972600835654 /* SHInputModel.swift */,
);
path = Model;
sourceTree = "<group>";
};
CC29A710251C74B90059BD5C /* ViewModel */ = {
isa = PBXGroup;
children = (
CC13DB69251C83E600835654 /* SHInputViewModel.swift */,
);
path = ViewModel;
sourceTree = "<group>";
};
CC29A711251C74BD0059BD5C /* Controller */ = {
isa = PBXGroup;
children = (
CC29A703251C50520059BD5C /* SHInputController.swift */,
);
path = Controller;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
......@@ -977,6 +1041,7 @@
A9A16C692519DD6900DE0FEE /* PinyinHelper.m in Sources */,
A950F5A824F36F55007AB63E /* SHRecordListViewController.swift in Sources */,
A94D935E24F7AF2300A886C0 /* SHLocationManager.swift in Sources */,
CC29A71B251C790D0059BD5C /* SHInputBottomView.swift in Sources */,
A94DD56524FDF29700B1B5A2 /* XBDataWriter.m in Sources */,
A924A858251B89D000CB2947 /* SHRecordDetailsCell.swift in Sources */,
A95CDFDA24E0EBF10066DAE6 /* CRSnippetCode.swift in Sources */,
......@@ -986,6 +1051,7 @@
A9A16C702519DD6900DE0FEE /* HCSortString.m in Sources */,
A94DD58124FE37DF00B1B5A2 /* UILabel+FontAppearance.m in Sources */,
A94D935224F7502700A886C0 /* SHRecordExportAlertView.swift in Sources */,
CC29A704251C50520059BD5C /* SHInputController.swift in Sources */,
A95CE03824E17BAF0066DAE6 /* SHTimer.swift in Sources */,
A95CDFBF24E0EBF10066DAE6 /* UIWindow+Extension.swift in Sources */,
A95CDFE524E0EE4B0066DAE6 /* SHBaseNavigationController.swift in Sources */,
......@@ -999,6 +1065,7 @@
A94DD57C24FE377100B1B5A2 /* AlertControllerTool.m in Sources */,
A94D935724F7958500A886C0 /* SHStoreManager.swift in Sources */,
A95CE00E24E0F42F0066DAE6 /* CRUserInfoModel.swift in Sources */,
CC13DB74251C9A2F00835654 /* SHInputTextView.swift in Sources */,
A9A16C6D2519DD6900DE0FEE /* ChineseToPinyinResource.m in Sources */,
A9690667251AE84000E5F604 /* SHRecordFolderModel.swift in Sources */,
A95CDFD824E0EBF10066DAE6 /* CRLaunchGuideCell_1.swift in Sources */,
......@@ -1025,6 +1092,7 @@
A95CDFD924E0EBF10066DAE6 /* iPhoneSystemKit.swift in Sources */,
A94DD56824FDF29700B1B5A2 /* MP3Encoder.m in Sources */,
A94DD56924FDF29700B1B5A2 /* XBAudioUnitMixer.m in Sources */,
CC13DB6F251C972600835654 /* SHInputModel.swift in Sources */,
A95CDF6824E0E8B50066DAE6 /* AppDelegate.swift in Sources */,
A94DD56124FDF29700B1B5A2 /* XBAudioPlayer.m in Sources */,
A95CDFC924E0EBF10066DAE6 /* UINavigationBar+Extension.swift in Sources */,
......@@ -1037,14 +1105,17 @@
A924A84B251B842C00CB2947 /* SHRecordDetailsBottomView.swift in Sources */,
A94EE118251B682C0066B490 /* SHSettingViewController.swift in Sources */,
A95CDFC424E0EBF10066DAE6 /* Double+Extension.swift in Sources */,
CC13DB6A251C83E600835654 /* SHInputViewModel.swift in Sources */,
A95B3FCD24F50B2F00FABDD1 /* SHRecentDeleteCell.swift in Sources */,
A9A16C802519DDC400DE0FEE /* PopBaseView.swift in Sources */,
A94DD57324FDF9D200B1B5A2 /* SHMp3RecordManager.m in Sources */,
A94DD56D24FDF29700B1B5A2 /* XBAudioUnitMixerTest.m in Sources */,
A94DD56C24FDF29700B1B5A2 /* XBAudioFormatConversion.m in Sources */,
CC29A716251C75210059BD5C /* SHInputView.swift in Sources */,
A95CDFE724E0EE7A0066DAE6 /* SHGuideViewController.swift in Sources */,
A950F5AC24F39EC1007AB63E /* SHRecordShowViewController.swift in Sources */,
A9A16C6A2519DD6900DE0FEE /* ChineseInclude.m in Sources */,
CC29A709251C71AC0059BD5C /* SHSwift.swift in Sources */,
A94DD57024FDF29700B1B5A2 /* XBAudioDataBuffer.m in Sources */,
A95CDFC824E0EBF10066DAE6 /* UITabBar+Extension.swift in Sources */,
A9A16C6B2519DD6900DE0FEE /* HanyuPinyinOutputFormat.m in Sources */,
......@@ -1062,6 +1133,7 @@
A95CE03624E1729B0066DAE6 /* SHRecordWaveView.swift in Sources */,
A950F5AA24F3727A007AB63E /* SHRecordListCell.swift in Sources */,
A9A16C812519DDC400DE0FEE /* PopContainerView.swift in Sources */,
CC13DB79251CA62800835654 /* SHImputAudioButton.swift in Sources */,
A94DD56B24FDF29700B1B5A2 /* XBAudioConverterPlayer.m in Sources */,
A94EE11D251B7E510066B490 /* SHRecordDetailsVC.swift in Sources */,
A9A16C6E2519DD6900DE0FEE /* PinyinFormatter.m in Sources */,
......@@ -1250,7 +1322,8 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = "ShorthandMaster/速记大师.entitlements";
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 8F4PP38DC3;
......@@ -1269,6 +1342,7 @@
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.ShorthandMaster.www;
PRODUCT_NAME = "速记大师";
PROVISIONING_PROFILE_SPECIFIER = ShorthandMasterDevProfile;
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/ShorthandMaster/ShorthandMaster-Bridging-Header.h";
SWIFT_OBJC_INTERFACE_HEADER_NAME = "ShorthandMaster-Swift.h";
SWIFT_VERSION = 5.0;
......@@ -1282,7 +1356,8 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = "ShorthandMaster/速记大师.entitlements";
CODE_SIGN_STYLE = Automatic;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 8F4PP38DC3;
......@@ -1301,6 +1376,7 @@
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.ShorthandMaster.www;
PRODUCT_NAME = "速记大师";
PROVISIONING_PROFILE_SPECIFIER = ShorthandMasterDevProfile;
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/ShorthandMaster/ShorthandMaster-Bridging-Header.h";
SWIFT_OBJC_INTERFACE_HEADER_NAME = "ShorthandMaster-Swift.h";
SWIFT_VERSION = 5.0;
......
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "input_addAudio@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "input_addAudio@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "input_down@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "input_down@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "input_goOn@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "input_goOn@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "input_image@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "input_image@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "input_keyboard@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "input_keyboard@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "input_pause@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "input_pause@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "input_stop@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "input_stop@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "input_up@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "input_up@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPhotoLibraryUsageDescription</key>
<string></string>
<key>NSCameraUsageDescription</key>
<string></string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
......
//
// SHInputController.swift
// ShorthandMaster
//
// Created by 张哲 on 2020/9/24.
// Copyright © 2020 明津李. All rights reserved.
//
import UIKit
import Photos
class SHInputController: SHBaseViewController
{
// MARK: - property
private var viewModel : SHInputViewModel = SHInputViewModel()
private var shInputView : SHInputView!
private let recorder_mp3: SHMp3RecordManager = SHMp3RecordManager.shared()
// MARK: -
override func viewDidLoad()
{
super.viewDidLoad()
self.view.backgroundColor = UIColor.white
let date = Date()
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy年MM月dd日"
self.title = dateFormatter.string(from: date)
self.navigationItem.rightBarButtonItem = UIBarButtonItem.init(image: UIImage(named: "record_nav_confirm")?.withRenderingMode(.alwaysOriginal), style: .plain, target: self, action: #selector(didSelectedNavRightButton))
self.addSubviews()
self.setUpSubviewsLocation()
}
// MARK: - UI
func addSubviews()
{
self.shInputView = SHInputView.init()
self.shInputView.textView.delegate = self;
self.shInputView.textView.shDelegate = self;
self.view.addSubview(self.shInputView!)
// 添加点击事件
self.shInputView.bottomView.imageButton.addTarget(self, action: #selector(didSelectedImageButton(sender:)), for: UIControl.Event.touchUpInside)
self.shInputView.bottomView.addAudioButton.addTarget(self, action: #selector(didSelectedAddAudioButton(sender:)), for: UIControl.Event.touchUpInside)
self.shInputView.bottomView.pauseAudioButton.addTarget(self, action: #selector(didSelectedPauseAudioButton(sender:)), for: UIControl.Event.touchUpInside)
self.shInputView.bottomView.goOnAudioButton.addTarget(self, action: #selector(didSelectedGoOnAudioButton(sender:)), for: UIControl.Event.touchUpInside)
self.shInputView.bottomView.stopAudioButton.addTarget(self, action: #selector(didSelectedStopAudioButton(sender:)), for: UIControl.Event.touchUpInside)
self.shInputView.bottomView.keyboardButton.addTarget(self, action: #selector(didSelectedKeyboardButton(sender:)), for: UIControl.Event.touchUpInside)
// 有记录显示记录
if UserDefaults.standard.value(forKey: "InputRecord") != nil
{
self.shInputView.placeholder.isHidden = true
let historyDic : [String : Any] = UserDefaults.standard.value(forKey: "InputRecord") as! [String : Any]
let attributeString : NSMutableAttributedString = NSMutableAttributedString()
let titleString = NSAttributedString(string: historyDic["title"] as! String, attributes: (SHInputViewModel.titleAttributes() as! [NSAttributedString.Key : Any]))
attributeString.append(titleString)
self.viewModel.title = titleString.string
let contentString = NSAttributedString(string: historyDic["content"] as! String, attributes: SHInputViewModel.contentAttributes() as? [NSAttributedString.Key : Any])
attributeString.append(contentString)
let imageArray : Array = historyDic["imageArray"] as! Array<[String : Any]>
for imageDictionary : [String : Any] in imageArray
{
let imageDataString : String = imageDictionary["imageData"] as! String
let imageData : Data = NSData(base64Encoded: imageDataString, options: NSData.Base64DecodingOptions.ignoreUnknownCharacters)! as Data
let image : UIImage = UIImage(data: imageData)!
// 调整图片大小, 宽相同, 高随比例变化
let newWidth = kScreenWidth - 20 * 2
let newHeight = newWidth * image.size.height / image.size.width
let newSize = CGSize(width: newWidth, height: newHeight)
let imageLocation : Int = imageDictionary["imageLocation"] as! Int
let attachment = NSTextAttachment.init()
attachment.image = image
attachment.bounds = CGRect(origin: CGPoint.zero, size: newSize)
let imageString = NSMutableAttributedString(attachment: attachment)
// 设置图片文字属性
imageString.addAttributes((SHInputViewModel.contentAttributes() as? [NSAttributedString.Key : Any])!, range: NSRange(location: 0, length: imageString.length))
// 设置图片间距
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.lineSpacing = 18
imageString.addAttribute(NSAttributedString.Key.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: imageString.length))
attributeString.insert(imageString, at: imageLocation)
}
self.shInputView.textView.attributedText = attributeString
}
else
{
// 默认文字样式
self.shInputView.textView.typingAttributes = SHInputViewModel.titleAttributes() as! [NSAttributedString.Key : Any]
}
}
// MARK: 设置控件位置
func setUpSubviewsLocation()
{
self.shInputView?.mas_makeConstraints({ (make) in
make?.top.left()?.right()?.bottom()?.mas_equalTo()(0);
})
}
// MARK: - Events
// MARK: 点击navigationBar左侧按钮
override func goback()
{
self.navigationController?.popViewController(animated: true)
UserDefaults.standard.removeObject(forKey: "InputRecord")
}
// MARK: 点击navigationBar右侧按钮
@objc func didSelectedNavRightButton()
{
self.viewModel.imageArray = SHInputViewModel.getImageArrayWithTextView(textView: self.shInputView.textView)
self.viewModel.content = self.shInputView.textView.text.substring(self.viewModel.title.length, length: self.shInputView.textView.text.length - self.viewModel.title.length)!
var dic : [String : Any] = Dictionary()
dic.updateValue(self.viewModel.title, forKey: "title")
dic.updateValue(self.viewModel.content, forKey: "content")
dic.updateValue(self.viewModel.imageArray, forKey: "imageArray")
UserDefaults.standard.setValue(dic, forKey: "InputRecord")
UserDefaults.standard.synchronize()
self.navigationController?.popViewController(animated: true)
}
// MARK: 获取textView中的图片数据, 保存成一个数组
// func getImageArrayWithTextView(textView : UITextView) -> Array<Any>
// {
// var imageArray = Array<Any>()
//
// let attributedString = textView.attributedText
//
// attributedString?.enumerateAttribute(NSAttributedString.Key.attachment, in: NSRange(location: 0, length: attributedString!.length), options: NSAttributedString.EnumerationOptions.longestEffectiveRangeNotRequired, using: { (attributes, range, stop) in
//
// var imageDictionary : Dictionary<String, Any> = Dictionary()
//
// if attributes != nil
// {
// let imageAttachment = attributes as! NSTextAttachment
//
// if imageAttachment.image != nil
// {
// imageDictionary.updateValue(UIImage.jpegData(imageAttachment.image!), forKey: "imageData")
// imageDictionary.updateValue(range.location, forKey: "imageLocation")
//
// imageArray.append(imageDictionary)
// }
// }
//
// })
//
// return imageArray
// }
// MARK: 点击键盘按钮
@objc func didSelectedKeyboardButton(sender : UIButton)
{
if self.shInputView.textView.isFirstResponder
{
self.shInputView.textView.resignFirstResponder()
}
else
{
self.shInputView.textView.becomeFirstResponder()
}
}
}
// MARK: - 输入框
extension SHInputController: UITextViewDelegate, SHInputTextViewDelegate
{
// MARK: - UITextView代理
// MARK: 文字发生了变化
func textViewDidChange(_ textView: UITextView)
{
self.shInputView.placeholder.isHidden = textView.text.length > 0
}
// MARK: 文字将要变化
func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool
{
// 获取标题文字位置
let titleRange = NSRange(location: 0, length: self.viewModel.title.length)
// 在标题位置输入的内容为标题
if range.location <= titleRange.location + titleRange.length
{
// 使用标题字体
textView.typingAttributes = SHInputViewModel.titleAttributes() as! [NSAttributedString.Key : Any]
// 输入换行符即表示标题输入完成
if (text.isEqualTo("\n"))
{
// 开始输入内容字体
textView.typingAttributes = SHInputViewModel.contentAttributes() as! [NSAttributedString.Key : Any]
}
else
{
// 把将要添加的文字加到输入框文字中
let textViewString : NSMutableString = NSMutableString(string: textView.text)
textViewString.insert(text, at: range.location)
// 保存标题文字
self.viewModel.title = textViewString.substring(with: NSRange(location: 0, length: range.location + text.length))
}
}
else
{
// 使用内容字体
textView.typingAttributes = SHInputViewModel.contentAttributes() as! [NSAttributedString.Key : Any]
}
return true
}
// MARK: 光标位置发生变化
func textViewDidChangeSelection(_ textView: UITextView) {
print(textView.selectedRange)
}
// MARK: - SHInputTextView代理
// MARK: 点击删除按钮
func textViewDidDelete(textView: SHInputTextView)
{
}
func testIFCANFIND()
{
}
}
// MARK: - 图片选择器
extension SHInputController: UIImagePickerControllerDelegate, UINavigationControllerDelegate
{
// MARK: - 代理方法
// MARK: 选中了一张照片/拍了一张照片
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
if (info[UIImagePickerController.InfoKey.originalImage] != nil)
{
let image : UIImage = (info[UIImagePickerController.InfoKey.originalImage] as? UIImage)!
self.insertImageInTextView(image: image)
picker.dismiss(animated: true, completion: nil)
}
else
{
let imageAssetUrl : URL = info[UIImagePickerController.InfoKey.referenceURL] as! URL
let result : PHFetchResult = PHAsset.fetchAssets(withALAssetURLs: [imageAssetUrl], options: nil)
let asset : PHAsset = result.firstObject!
let options = PHImageRequestOptions()
options.isNetworkAccessAllowed = true
weak var weakSelf = self
PHImageManager.default().requestImageData(for: asset, options: options) { (imageData, dataUTI, orientation, info) in
if imageData != nil
{
let image : UIImage = UIImage(data: imageData!)!
weakSelf?.insertImageInTextView(image: image)
picker.dismiss(animated: true, completion: nil)
}
}
}
}
// MARK: 取消选择照片/取消拍照
func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
picker.dismiss(animated: true, completion: nil)
}
// MARK: - 输入框中插入图片方法
func insertImageInTextView(image : UIImage)
{
// 调整图片大小, 宽相同, 高随比例变化
let newWidth = kScreenWidth - 20 * 2
let newHeight = newWidth * image.size.height / image.size.width
let newSize = CGSize(width: newWidth, height: newHeight)
// 如果没有标题添加"未命名"作为标题
if self.viewModel.title.length == 0
{
// 标题
let titleString = NSMutableAttributedString(string: "未命名", attributes: (SHInputViewModel.titleAttributes() as! [NSAttributedString.Key : Any]))
self.shInputView.textView.attributedText = titleString
self.shInputView.placeholder.isHidden = true
self.viewModel.title = titleString.string
}
// 前文
let textString = NSMutableAttributedString(attributedString: self.shInputView.textView.attributedText)
// 图片
let attachment = NSTextAttachment.init()
attachment.image = image
attachment.bounds = CGRect(origin: CGPoint.zero, size: newSize)
let imageString = NSMutableAttributedString(attachment: attachment)
// 设置图片文字属性
imageString.addAttributes((SHInputViewModel.contentAttributes() as? [NSAttributedString.Key : Any])!, range: NSRange(location: 0, length: imageString.length))
// 设置图片间距
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.lineSpacing = 18
imageString.addAttribute(NSAttributedString.Key.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: imageString.length))
// 图片前后增加换行符
// 如果前文以换行符结尾, 图片前面不再加换行符
if !textString.string.hasSuffix("\n")
{
imageString.insert(NSAttributedString(string: "\n", attributes: (SHInputViewModel.contentAttributes() as! [NSAttributedString.Key : Any])), at: 0)
}
imageString.insert(NSAttributedString(string: "\n", attributes: (SHInputViewModel.contentAttributes() as! [NSAttributedString.Key : Any])), at: imageString.length)
// 合并内容
textString.insert(imageString, at: self.shInputView.textView.selectedRange.location)
self.shInputView.textView.attributedText = textString
// 使用内容字体
self.shInputView.textView.typingAttributes = SHInputViewModel.contentAttributes() as! [NSAttributedString.Key : Any]
}
// MARK: - Events
// MARK: 点击选择图片按钮
@objc func didSelectedImageButton(sender : UIButton)
{
if self.shInputView.textView.canResignFirstResponder
{
self.shInputView.textView.resignFirstResponder()
}
let alert = UIAlertController(title: nil, message: nil, preferredStyle: UIAlertController.Style.actionSheet)
weak var weakSelf = self
let albumAction = UIAlertAction(title: "相册", style: UIAlertAction.Style.default) { (action) in
weakSelf?.openAlbum()
}
alert.addAction(albumAction)
let cameraAction = UIAlertAction(title: "相机", style: UIAlertAction.Style.default) { (action) in
weakSelf?.openCamera()
}
alert.addAction(cameraAction)
let cancelAction = UIAlertAction(title: "取消", style: UIAlertAction.Style.cancel , handler: nil)
alert.addAction(cancelAction)
self.present(alert, animated: true, completion: nil)
}
// MARK: 打开相册, 判断相册权限
func openAlbum()
{
let status : PHAuthorizationStatus = PHPhotoLibrary.authorizationStatus()
switch status
{
// MARK: 此应用程序没有被授权访问的照片数据。可能是家长控制权限
case PHAuthorizationStatus.restricted:
let alert = UIAlertController(title: nil, message: "此应用程序没有被授权访问的照片数据。可能是家长控制权限", preferredStyle: UIAlertController.Style.alert)
let sureAction = UIAlertAction(title: "确定", style: UIAlertAction.Style.default, handler: nil)
alert.addAction(sureAction)
self.present(alert, animated: true, completion: nil)
break
// MARK: 用户拒绝访问相册
case PHAuthorizationStatus.denied:
let alert = UIAlertController(title: "此功能需要相册授权", message: "请您在设置系统中打开授权开关", preferredStyle: UIAlertController.Style.alert)
let cancelAction = UIAlertAction(title: "取消", style: UIAlertAction.Style.cancel, handler: nil)
alert.addAction(cancelAction)
let settingAction = UIAlertAction(title: "前往设置", style: UIAlertAction.Style.default) { (action) in
UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!, options: [:], completionHandler: nil)
}
alert.addAction(settingAction)
self.present(alert, animated: true, completion: nil)
break
// MARK: 用户允许访问相册
case PHAuthorizationStatus.authorized:
if UIImagePickerController.isSourceTypeAvailable(UIImagePickerController.SourceType.photoLibrary)
{
self.showAlbum()
}
break
// MARK: 用户还没有做出选择
case PHAuthorizationStatus.notDetermined:
weak var weakSelf = self
PHPhotoLibrary.requestAuthorization { (status) in
if status == PHAuthorizationStatus.authorized
{
if UIImagePickerController.isSourceTypeAvailable(UIImagePickerController.SourceType.photoLibrary)
{
weakSelf?.showAlbum()
}
}
}
break
default:
break
}
}
// MARK: 显示相册
func showAlbum()
{
DispatchQueue.main.async
{
let imagePickerController = UIImagePickerController()
imagePickerController.sourceType = UIImagePickerController.SourceType.photoLibrary
imagePickerController.delegate = self
imagePickerController.modalPresentationStyle = UIModalPresentationStyle.fullScreen
self.present(imagePickerController, animated: true, completion: nil)
}
}
// MARK: 打开相机, 判断相机权限
func openCamera()
{
let device : AVCaptureDevice? = AVCaptureDevice.default(for: AVMediaType.video)
if device != nil
{
let status : AVAuthorizationStatus = AVCaptureDevice.authorizationStatus(for: AVMediaType.video)
switch status
{
// MARK: 此应用程序没有被授权访问的照片数据。可能是家长控制权限。
case AVAuthorizationStatus.restricted:
let alert = UIAlertController(title: nil, message: "此应用程序没有被授权访问的相机数据。可能是家长控制权限。", preferredStyle: UIAlertController.Style.alert)
let sureAction = UIAlertAction(title: "确定", style: UIAlertAction.Style.default, handler: nil)
alert.addAction(sureAction)
self.present(alert, animated: true, completion: nil)
break
// MARK: 用户拒绝当前应用访问相机
case AVAuthorizationStatus.denied:
let alert = UIAlertController(title: "此功能需要相机授权", message: "请您在设置系统中打开授权开关", preferredStyle: UIAlertController.Style.alert)
let cancelAction = UIAlertAction(title: "取消", style: UIAlertAction.Style.cancel, handler: nil)
alert.addAction(cancelAction)
let settingAction = UIAlertAction(title: "前往设置", style: UIAlertAction.Style.default) { (action) in
UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!, options: [:], completionHandler: nil)
}
alert.addAction(settingAction)
self.present(alert, animated: true, completion: nil)
break
// MARK: 用户允许当前应用访问相机
case AVAuthorizationStatus.authorized:
if UIImagePickerController.isSourceTypeAvailable(UIImagePickerController.SourceType.camera)
{
self.showCamera()
}
break
// MARK: 用户还没有做出选择
case AVAuthorizationStatus.notDetermined:
weak var weakSelf = self
PHPhotoLibrary.requestAuthorization { (status) in
if status == PHAuthorizationStatus.authorized
{
if UIImagePickerController.isSourceTypeAvailable(UIImagePickerController.SourceType.camera)
{
weakSelf?.showCamera()
}
}
}
break
default:
break
}
}
else
{
self.openAlbum()
}
}
// MARK: 显示相机
func showCamera()
{
DispatchQueue.main.async {
let imagePickerController = UIImagePickerController()
imagePickerController.sourceType = UIImagePickerController.SourceType.camera
imagePickerController.delegate = self
imagePickerController.modalPresentationStyle = UIModalPresentationStyle.fullScreen
self.present(imagePickerController, animated: true, completion: nil)
}
}
}
// MARK: - 录音
extension SHInputController
{
// MARK: 点击添加录音按钮
@objc func didSelectedAddAudioButton(sender : SHImputAudioButton)
{
self.shInputView.bottomView.addAudioButton.isHidden = true
self.shInputView.bottomView.pauseAudioButton.isHidden = false
self.shInputView.bottomView.goOnAudioButton.isHidden = true
self.shInputView.bottomView.stopAudioButton.isHidden = false
let mp3Path : String = (NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first)! + "/recorder.mp3"
let pcmPath : String = (NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first)! + "/xbMixData.caf"
recorder_mp3.configMp3Path(mp3Path, pcmPath: pcmPath)
recorder_mp3.start()
print("mp3Path" + mp3Path)
print("pcmPath" + pcmPath)
}
// MARK: 点击暂停录音按钮
@objc func didSelectedPauseAudioButton(sender : SHImputAudioButton)
{
self.shInputView.bottomView.addAudioButton.isHidden = true
self.shInputView.bottomView.pauseAudioButton.isHidden = true
self.shInputView.bottomView.goOnAudioButton.isHidden = false
self.shInputView.bottomView.stopAudioButton.isHidden = false
recorder_mp3.pause()
let mp3Path : String = (NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first)! + "/recorder.mp3"
let pcmPath : String = (NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first)! + "/xbMixData.caf"
print("mp3Path" + mp3Path)
print("pcmPath" + pcmPath)
}
// MARK: 点击继续录音按钮
@objc func didSelectedGoOnAudioButton(sender : SHImputAudioButton)
{
self.shInputView.bottomView.addAudioButton.isHidden = true
self.shInputView.bottomView.pauseAudioButton.isHidden = false
self.shInputView.bottomView.goOnAudioButton.isHidden = true
self.shInputView.bottomView.stopAudioButton.isHidden = false
recorder_mp3.start()
let mp3Path : String = (NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first)! + "/recorder.mp3"
let pcmPath : String = (NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first)! + "/xbMixData.caf"
print("mp3Path" + mp3Path)
print("pcmPath" + pcmPath)
}
// MARK: 点击结束录制按钮
@objc func didSelectedStopAudioButton(sender : SHImputAudioButton)
{
self.shInputView.bottomView.addAudioButton.isHidden = false
self.shInputView.bottomView.pauseAudioButton.isHidden = true
self.shInputView.bottomView.goOnAudioButton.isHidden = true
self.shInputView.bottomView.stopAudioButton.isHidden = true
recorder_mp3.stop()
let mp3Path : String = (NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first)! + "/recorder.mp3"
let pcmPath : String = (NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first)! + "/xbMixData.caf"
print("mp3Path" + mp3Path)
print("pcmPath" + pcmPath)
}
}
//
// SHInputModel.swift
// ShorthandMaster
//
// Created by 张哲 on 2020/9/24.
// Copyright © 2020 明津李. All rights reserved.
//
import UIKit
class SHInputModel: NSObject {
enum SHInputType
{
case SHInputType_text
case SHInputType_image
case SHInputType_audio
}
// MARK: - property
/// 类别
var type : SHInputType!
/// 文字
var text : String!
/// 颜色
var color : UIColor!
/// 字号
var font : UIFont!
/// 图片data
var imageData : Data!
/// 录音data
var audioData : Data!
// MARK: - func
override func setValue(_ value: Any?, forUndefinedKey key: String)
{
}
}
//
// SHImputAudioButton.swift
// ShorthandMaster
//
// Created by 张哲 on 2020/9/24.
// Copyright © 2020 明津李. All rights reserved.
//
import UIKit
class SHImputAudioButton: UIButton {
// MARK: - property
/// 背景
var bgView : UIView!
/// 左侧图片
var leftImageView : UIImageView!
/// 右侧文字
var rightLabel : UILabel!
// MARK: - func
override init(frame: CGRect)
{
super.init(frame: frame)
self.layer.masksToBounds = true
self.addSubviews()
self.setUpSubviewsLocation()
}
required init?(coder: NSCoder)
{
fatalError("init(coder:) has not been implemented")
}
// MARK: - UI
func addSubviews()
{
self.bgView = UIView()
self.addSubview(self.bgView)
self.leftImageView = UIImageView()
self.bgView.addSubview(self.leftImageView)
self.rightLabel = UILabel()
self.rightLabel.font = UIFont(name: SHPingFangMedium, size: 14)
self.bgView.addSubview(self.rightLabel)
}
// MARK: 控件位置
func setUpSubviewsLocation()
{
self.bgView.mas_makeConstraints { (make) in
make?.center.equalTo()(self)
}
self.leftImageView.mas_makeConstraints { (make) in
make?.left.equalTo()(self.bgView)
make?.centerY.equalTo()(self.bgView)
}
self.rightLabel.mas_makeConstraints { (make) in
make?.left.equalTo()(self.leftImageView.mas_right)?.offset()(6)
make?.centerY.equalTo()(self.bgView)
make?.right.equalTo()(self.bgView)
}
}
}
//
// SHInputBottomView.swift
// ShorthandMaster
//
// Created by 张哲 on 2020/9/24.
// Copyright © 2020 明津李. All rights reserved.
//
import UIKit
class SHInputBottomView: UIView {
// MARK: - property
/// 背景
var bgView : UIView!
/// 选择图片按钮
var imageButton : UIButton!
/// 录音按钮背景
var audioBgView : UIView!
/// 添加录音按钮
var addAudioButton : SHImputAudioButton!
/// 暂停录音按钮
var pauseAudioButton : SHImputAudioButton!
/// 继续录音按钮
var goOnAudioButton : SHImputAudioButton!
/// 结束录音按钮
var stopAudioButton : SHImputAudioButton!
/// 键盘按钮
var keyboardButton : UIButton!
/// 箭头图片
var directionImageView : UIImageView!
// MARK: - func
override init(frame: CGRect)
{
super.init(frame: frame)
self.backgroundColor = UIColor.white
self.addSubviews()
self.setUpSubviewsLocation()
}
required init?(coder: NSCoder)
{
fatalError("init(coder:) has not been implemented")
}
// MAKR: - UI
func addSubviews()
{
// 背景
self.bgView = UIView()
self.bgView.backgroundColor = UIColor(r: 249, g: 249, b: 249)
self.addSubview(self.bgView)
// 选择图片按钮
self.imageButton = UIButton(type: UIButton.ButtonType.custom)
self.imageButton.setImage(UIImage(named: "input_image"), for: UIControl.State.normal)
self.bgView.addSubview(self.imageButton)
// 录音按钮背景
self.audioBgView = UIView()
self.bgView.addSubview(self.audioBgView)
// 添加录音按钮
self.addAudioButton = SHImputAudioButton(type: UIButton.ButtonType.custom)
self.addAudioButton.layer.cornerRadius = 15
self.addAudioButton.backgroundColor = UIColor(r: 250, g: 219, b: 219)
self.addAudioButton.leftImageView.image = UIImage(named: "input_addAudio")
self.addAudioButton.rightLabel.text = "添加录音"
self.addAudioButton.rightLabel.textColor = UIColor(r: 244, g: 65, b: 65)
self.audioBgView.addSubview(self.addAudioButton)
// 暂停录音按钮
self.pauseAudioButton = SHImputAudioButton(type: UIButton.ButtonType.custom)
self.pauseAudioButton.layer.cornerRadius = 15
self.pauseAudioButton.backgroundColor = UIColor(r: 219, g: 231, b: 250)
self.pauseAudioButton.leftImageView.image = UIImage(named: "input_pause")
self.pauseAudioButton.rightLabel.text = "暂停"
self.pauseAudioButton.rightLabel.textColor = UIColor(r: 65, g: 131, b: 244)
self.audioBgView.addSubview(self.pauseAudioButton)
self.pauseAudioButton.isHidden = true
// 继续录音按钮
self.goOnAudioButton = SHImputAudioButton(type: UIButton.ButtonType.custom)
self.goOnAudioButton.layer.cornerRadius = 15
self.goOnAudioButton.backgroundColor = UIColor(r: 250, g: 234, b: 219)
self.goOnAudioButton.leftImageView.image = UIImage(named: "input_goOn")
self.goOnAudioButton.rightLabel.text = "继续"
self.goOnAudioButton.rightLabel.textColor = UIColor(r: 244, g: 119, b: 65)
self.audioBgView.addSubview(self.goOnAudioButton)
self.goOnAudioButton.isHidden = true
// 结束录音按钮
self.stopAudioButton = SHImputAudioButton(type: UIButton.ButtonType.custom)
self.stopAudioButton.layer.cornerRadius = 15
self.stopAudioButton.backgroundColor = UIColor(r: 250, g: 219, b: 219)
self.stopAudioButton.leftImageView.image = UIImage(named: "input_stop")
self.stopAudioButton.rightLabel.text = "结束录制"
self.stopAudioButton.rightLabel.textColor = UIColor(r: 244, g: 65, b: 65)
self.audioBgView.addSubview(self.stopAudioButton)
self.stopAudioButton.isHidden = true
// 键盘按钮
self.keyboardButton = UIButton(type: UIButton.ButtonType.custom)
self.keyboardButton.setImage(UIImage(named: "input_keyboard"), for: UIControl.State.normal)
self.bgView.addSubview(self.keyboardButton)
// 箭头图片
self.directionImageView = UIImageView()
self.directionImageView.image = UIImage(named: "input_down")
self.bgView.addSubview(self.directionImageView)
}
// MARK: 控件位置
func setUpSubviewsLocation()
{
self.bgView.mas_makeConstraints { (make) in
make?.top.left()?.right()?.mas_equalTo()(0)
make?.bottom.mas_equalTo()(-SafeAreaBottomHeight())
}
self.imageButton.mas_makeConstraints { (make) in
make?.top.bottom()?.mas_equalTo()(0)
make?.left.mas_equalTo()(39 - 11)
make?.width.height()?.mas_equalTo()(self.bgView.mas_height)
}
self.audioBgView.mas_makeConstraints { (make) in
make?.center.equalTo()(self.bgView)
make?.size.mas_equalTo()(CGSize(width: 72 + 18 + 100, height: 50))
}
self.addAudioButton.mas_makeConstraints { (make) in
make?.center.equalTo()(self.audioBgView)
make?.size.mas_equalTo()(CGSize(width: 100, height: 30))
}
self.pauseAudioButton.mas_makeConstraints { (make) in
make?.left.mas_equalTo()(0)
make?.centerY.equalTo()(self.audioBgView)
make?.size.mas_equalTo()(CGSize(width: 72, height: 30))
}
self.goOnAudioButton.mas_makeConstraints { (make) in
make?.top.left()?.bottom()?.right()?.equalTo()(self.pauseAudioButton)
}
self.stopAudioButton.mas_makeConstraints { (make) in
make?.left.equalTo()(self.pauseAudioButton.mas_right)?.offset()(18)
make?.right.mas_equalTo()(0)
make?.centerY.equalTo()(self.audioBgView)
make?.size.mas_equalTo()(CGSize(width: 100, height: 30))
}
self.keyboardButton.mas_makeConstraints { (make) in
make?.top.bottom()?.mas_equalTo()(0)
make?.right.mas_equalTo()(11 - 40)
make?.size.equalTo()(self.imageButton)
}
self.directionImageView.mas_makeConstraints { (make) in
make?.centerY.equalTo()(self.bgView)
make?.width.height()?.mas_equalTo()(16)
make?.right.mas_equalTo()(-20)
}
}
}
//
// SHInputTextView.swift
// ShorthandMaster
//
// Created by 张哲 on 2020/9/24.
// Copyright © 2020 明津李. All rights reserved.
//
import UIKit
@objc protocol SHInputTextViewDelegate: NSObjectProtocol
{
@objc optional func textViewDidDelete(textView : SHInputTextView)
}
class SHInputTextView: UITextView {
// MARK: - property
weak var shDelegate : SHInputTextViewDelegate?
// MARK: - func
// MARK: 点击删除按钮事件
override func deleteBackward() {
super.deleteBackward()
if let delegateOK = self.shDelegate
{
delegateOK.textViewDidDelete?(textView: self)
}
}
}
//
// SHInputView.swift
// ShorthandMaster
//
// Created by 张哲 on 2020/9/24.
// Copyright © 2020 明津李. All rights reserved.
//
import UIKit
class SHInputView: UIView {
// MARK: - property
var textView : SHInputTextView!
var placeholder : UILabel!
var bottomView : SHInputBottomView!
// MARK: - func
override init(frame: CGRect)
{
super.init(frame: frame)
self.addSubviews()
self.setUpSubviewsLocation()
// 监听键盘出现
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow(note:)), name: UIResponder.keyboardWillShowNotification, object: nil)
// 监听键盘消失
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide(note:)), name: UIResponder.keyboardWillHideNotification, object: nil)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
// MARK: - UI
func addSubviews()
{
// 输入框
self.textView = SHInputTextView.init()
self.textView.backgroundColor = UIColor.clear
self.textView.textColor = UIColor.init(r: 34, g: 34, b: 34, a: 1)
self.textView.font = UIFont.init(name: SHPingFangMedium, size: 18)
self.textView.contentInset = UIEdgeInsets.init(top: 24, left: 0, bottom: 0, right: 0);
self.addSubview(self.textView)
// 占位文字
self.placeholder = UILabel.init()
self.placeholder.text = "笔记标题"
self.placeholder.textColor = UIColor.init(r: 153, g: 153, b: 153)
self.placeholder.font = UIFont.init(name: SHPingFangMedium, size: 18)
self.textView.addSubview(self.placeholder)
// 底部栏
self.bottomView = SHInputBottomView.init()
self.addSubview(self.bottomView)
}
// MARK: 控件位置
func setUpSubviewsLocation()
{
self.textView.mas_makeConstraints { (make) in
make?.left.mas_equalTo()(20 - 5)
make?.right.mas_equalTo()(0)
make?.top.mas_equalTo()(0)
make?.bottom.equalTo()(self.bottomView.mas_top)
}
self.placeholder.mas_makeConstraints { (make) in
make?.left.mas_equalTo()(5)
make?.top.mas_equalTo()(8)
}
self.bottomView.mas_makeConstraints { (make) in
make?.left.right()?.bottom().mas_equalTo()(0)
make?.height.mas_equalTo()(50 + SafeAreaBottomHeight());
}
}
// MARK: - Events
// MARK: 监听键盘出现
@objc func keyboardWillShow(note : Notification)
{
self.bottomView.directionImageView.image = UIImage(named: "input_up")
let info : Dictionary = note.userInfo! as Dictionary
let value = info[UIResponder.keyboardFrameEndUserInfoKey]
// info.object(forKey: UIResponder.keyboardFrameEndUserInfoKey)
let keyboardRect = (value as AnyObject).cgRectValue
let height : Float = Float((keyboardRect?.size.height)!)
weak var weakSelf = self
self.setNeedsUpdateConstraints()
UIView.animate(withDuration: 0.3) {
weakSelf?.bottomView.mas_updateConstraints { (make) in
make?.left.right()?.mas_equalTo()(0)
make?.bottom.mas_equalTo()(-height + SafeAreaBottomHeight())
make?.height.mas_equalTo()(50 + SafeAreaBottomHeight());
}
weakSelf?.bottomView.superview!.layoutIfNeeded()
}
}
// MARK: 监听键盘消失
@objc func keyboardWillHide(note : Notification)
{
self.bottomView.directionImageView.image = UIImage(named: "input_down")
weak var weakSelf = self
self.setNeedsUpdateConstraints()
UIView.animate(withDuration: 0.3) {
weakSelf?.bottomView.mas_updateConstraints { (make) in
make?.left.right().bottom()?.mas_equalTo()(0)
make?.height.mas_equalTo()(50 + SafeAreaBottomHeight());
}
weakSelf?.bottomView.superview!.layoutIfNeeded()
}
}
}
//
// SHInputViewModel.swift
// ShorthandMaster
//
// Created by 张哲 on 2020/9/24.
// Copyright © 2020 明津李. All rights reserved.
//
import UIKit
class SHInputViewModel: NSObject {
// MARK: - property
/// 标题文字
var title : String = ""
/// 内容文字
var content : String = ""
/// 图片数组
var imageArray : Array = Array<Any>()
// MARK: - func
// MARK: 标题文字样式
class func titleAttributes() -> NSDictionary
{
let paragraphStyle : NSMutableParagraphStyle = NSMutableParagraphStyle.init()
paragraphStyle.lineSpacing = 5;
let titleAttributes = NSMutableDictionary.init()
titleAttributes.setValue(UIFont.init(name: SHPingFangMedium, size: 18), forKey: NSAttributedString.Key.font.rawValue)
titleAttributes.setValue(paragraphStyle, forKey: NSAttributedString.Key.paragraphStyle.rawValue)
titleAttributes.setValue(UIColor.init(r: 34, g: 34, b: 34), forKey: NSAttributedString.Key.foregroundColor.rawValue)
return titleAttributes
}
// MARK: 内容文字样式
class func contentAttributes() -> NSDictionary
{
let paragraphStyle : NSMutableParagraphStyle = NSMutableParagraphStyle.init()
paragraphStyle.lineSpacing = 5;
let titleAttributes = NSMutableDictionary.init()
titleAttributes.setValue(UIFont.init(name: SHPingFangRegular, size: 18), forKey: NSAttributedString.Key.font.rawValue)
titleAttributes.setValue(paragraphStyle, forKey: NSAttributedString.Key.paragraphStyle.rawValue)
titleAttributes.setValue(UIColor.init(r: 34, g: 34, b: 34), forKey: NSAttributedString.Key.foregroundColor.rawValue)
return titleAttributes
}
// MARK: 获取图片数组
class func getImageArrayWithTextView(textView : UITextView) -> Array<Any>
{
var imageArray = Array<Any>()
let attributedString = textView.attributedText
attributedString?.enumerateAttribute(NSAttributedString.Key.attachment, in: NSRange(location: 0, length: attributedString!.length), options: NSAttributedString.EnumerationOptions.longestEffectiveRangeNotRequired, using: { (attributes, range, stop) in
var imageDictionary : Dictionary<String, Any> = Dictionary()
if attributes != nil
{
let imageAttachment = attributes as! NSTextAttachment
if imageAttachment.image != nil
{
let imageData : Data = (imageAttachment.image?.jpegData(compressionQuality: 1.0))!
imageDictionary.updateValue(imageData.base64EncodedString(options: Data.Base64EncodingOptions.lineLength64Characters), forKey: "imageData")
imageDictionary.updateValue(range.location, forKey: "imageLocation")
imageArray.append(imageDictionary)
}
}
})
return imageArray
}
}
......@@ -77,6 +77,7 @@ isPhoneX = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bo
//色值
#define kColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
#define kColorWithRGB(r, g, b) [UIColor colorWithRed:(r) / 255.f green:(g) / 255.f blue:(b) / 255.f alpha:1.f]
#define rgba(r,g,b,a) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a]
#import "ShorthandMaster-Swift.h"
// 第三方头文件
......
//
// SHSwift.swift
// ShorthandMaster
//
// Created by 张哲 on 2020/9/24.
// Copyright © 2020 明津李. All rights reserved.
//
import Foundation
import Masonry
// MARK: - 适配
// MARK: 屏幕宽度
let kScreenWidth = UIScreen.main.bounds.width
// MARK: 屏幕高度
let kScreenHeight = UIScreen.main.bounds.height
// MARK: 顶部安全距离
func SafeAreaTopHeight() -> Float
{
if IPHONE_X()
{
return 88.0
}
else
{
return 64.0
}
}
// MARK: 底部安全距离
func SafeAreaBottomHeight() -> Float
{
if IPHONE_X()
{
return 34;
}
else
{
return 0;
}
}
// MARK: 是否是iPhoneX
func IPHONE_X() -> Bool
{
var isBisBangsScreen = Bool.init(false)
if #available(iOS 11.0, *)
{
isBisBangsScreen = (UIApplication.shared.windows.first?.safeAreaInsets.bottom)! > 0
}
return isBisBangsScreen
}
// MARK: - 字体
// MARK: 常用字体
let SHPingFangSemibold = "PingFangSC-Semibold"
let SHPingFangMedium = "PingFangSC-Medium"
let SHPingFangRegular = "PingFangSC-Regular"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment