diff --git a/.gitignore b/.gitignore index 312d1f6..42b4389 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,4 @@ fastlane/report.xml fastlane/Preview.html fastlane/screenshots/**/*.png fastlane/test_output +.DS_Store diff --git a/Design/demo.gif b/Design/demo.gif new file mode 100644 index 0000000..925de7b Binary files /dev/null and b/Design/demo.gif differ diff --git a/Design/logo.png b/Design/logo.png new file mode 100644 index 0000000..5384591 Binary files /dev/null and b/Design/logo.png differ diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj new file mode 100644 index 0000000..9f8bcac --- /dev/null +++ b/Example/Example.xcodeproj/project.pbxproj @@ -0,0 +1,396 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 203559FA20B371B900A82EB8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 203559F920B371B900A82EB8 /* AppDelegate.swift */; }; + 203559FC20B371B900A82EB8 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 203559FB20B371B900A82EB8 /* ViewController.swift */; }; + 203559FF20B371B900A82EB8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 203559FD20B371B900A82EB8 /* Main.storyboard */; }; + 20355A0120B371BB00A82EB8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 20355A0020B371BB00A82EB8 /* Assets.xcassets */; }; + 20355A0420B371BB00A82EB8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 20355A0220B371BB00A82EB8 /* LaunchScreen.storyboard */; }; + 20FBDB1322DFAA7D000D94CB /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20FBDB1222DFAA7D000D94CB /* WebKit.framework */; }; + 8ECA734855E07CD56060EDE9 /* libPods-Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F9164658DAF9914261ECF13F /* libPods-Example.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 203559F620B371B900A82EB8 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 203559F920B371B900A82EB8 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 203559FB20B371B900A82EB8 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 203559FE20B371B900A82EB8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 20355A0020B371BB00A82EB8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 20355A0320B371BB00A82EB8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 20355A0520B371BB00A82EB8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 20FBDB1222DFAA7D000D94CB /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; + 68C87651C3AC19C7DB6EDE86 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; }; + 810D2625B22C3D585D7157A4 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; }; + F9164658DAF9914261ECF13F /* libPods-Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 203559F320B371B900A82EB8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 20FBDB1322DFAA7D000D94CB /* WebKit.framework in Frameworks */, + 8ECA734855E07CD56060EDE9 /* libPods-Example.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1971680AD76A225740D46043 /* Pods */ = { + isa = PBXGroup; + children = ( + 68C87651C3AC19C7DB6EDE86 /* Pods-Example.debug.xcconfig */, + 810D2625B22C3D585D7157A4 /* Pods-Example.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + 203559ED20B371B900A82EB8 = { + isa = PBXGroup; + children = ( + 203559F820B371B900A82EB8 /* Example */, + 203559F720B371B900A82EB8 /* Products */, + 1971680AD76A225740D46043 /* Pods */, + 46412AEAB7B7DE7CAF1E120E /* Frameworks */, + ); + sourceTree = ""; + }; + 203559F720B371B900A82EB8 /* Products */ = { + isa = PBXGroup; + children = ( + 203559F620B371B900A82EB8 /* Example.app */, + ); + name = Products; + sourceTree = ""; + }; + 203559F820B371B900A82EB8 /* Example */ = { + isa = PBXGroup; + children = ( + 203559F920B371B900A82EB8 /* AppDelegate.swift */, + 203559FB20B371B900A82EB8 /* ViewController.swift */, + 203559FD20B371B900A82EB8 /* Main.storyboard */, + 20355A0020B371BB00A82EB8 /* Assets.xcassets */, + 20355A0220B371BB00A82EB8 /* LaunchScreen.storyboard */, + 20355A0520B371BB00A82EB8 /* Info.plist */, + ); + path = Example; + sourceTree = ""; + }; + 46412AEAB7B7DE7CAF1E120E /* Frameworks */ = { + isa = PBXGroup; + children = ( + 20FBDB1222DFAA7D000D94CB /* WebKit.framework */, + F9164658DAF9914261ECF13F /* libPods-Example.a */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 203559F520B371B900A82EB8 /* Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 20355A0820B371BB00A82EB8 /* Build configuration list for PBXNativeTarget "Example" */; + buildPhases = ( + E3BE9F3FF71AE0B9786F4AD0 /* [CP] Check Pods Manifest.lock */, + 203559F220B371B900A82EB8 /* Sources */, + 203559F320B371B900A82EB8 /* Frameworks */, + 203559F420B371B900A82EB8 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Example; + productName = Example; + productReference = 203559F620B371B900A82EB8 /* Example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 203559EE20B371B900A82EB8 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0930; + LastUpgradeCheck = 0930; + ORGANIZATIONNAME = "Pedro Carrasco"; + TargetAttributes = { + 203559F520B371B900A82EB8 = { + CreatedOnToolsVersion = 9.3; + LastSwiftMigration = 1000; + }; + }; + }; + buildConfigurationList = 203559F120B371B900A82EB8 /* Build configuration list for PBXProject "Example" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 203559ED20B371B900A82EB8; + productRefGroup = 203559F720B371B900A82EB8 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 203559F520B371B900A82EB8 /* Example */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 203559F420B371B900A82EB8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 20355A0420B371BB00A82EB8 /* LaunchScreen.storyboard in Resources */, + 20355A0120B371BB00A82EB8 /* Assets.xcassets in Resources */, + 203559FF20B371B900A82EB8 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + E3BE9F3FF71AE0B9786F4AD0 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 203559F220B371B900A82EB8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 203559FC20B371B900A82EB8 /* ViewController.swift in Sources */, + 203559FA20B371B900A82EB8 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 203559FD20B371B900A82EB8 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 203559FE20B371B900A82EB8 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 20355A0220B371BB00A82EB8 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 20355A0320B371BB00A82EB8 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 20355A0620B371BB00A82EB8 /* 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; + CODE_SIGN_IDENTITY = "iPhone Developer"; + 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 = ( + "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 = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + }; + name = Debug; + }; + 20355A0720B371BB00A82EB8 /* Release */ = { + 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; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + 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 = NO; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.2; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 20355A0920B371BB00A82EB8 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 68C87651C3AC19C7DB6EDE86 /* Pods-Example.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 7GE4Q65N57; + INFOPLIST_FILE = Example/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = pedrommcarrasco.Example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 20355A0A20B371BB00A82EB8 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 810D2625B22C3D585D7157A4 /* Pods-Example.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 7GE4Q65N57; + INFOPLIST_FILE = Example/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = pedrommcarrasco.Example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 203559F120B371B900A82EB8 /* Build configuration list for PBXProject "Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 20355A0620B371BB00A82EB8 /* Debug */, + 20355A0720B371BB00A82EB8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 20355A0820B371BB00A82EB8 /* Build configuration list for PBXNativeTarget "Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 20355A0920B371BB00A82EB8 /* Debug */, + 20355A0A20B371BB00A82EB8 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 203559EE20B371B900A82EB8 /* Project object */; +} diff --git a/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..6d2a51b --- /dev/null +++ b/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/Example.xcworkspace/contents.xcworkspacedata b/Example/Example.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..a37cf19 --- /dev/null +++ b/Example/Example.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Example/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/Example/AppDelegate.swift b/Example/Example/AppDelegate.swift new file mode 100644 index 0000000..b996742 --- /dev/null +++ b/Example/Example/AppDelegate.swift @@ -0,0 +1,11 @@ +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + return true + } +} diff --git a/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Example/Example/Assets.xcassets/Contents.json b/Example/Example/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Example/Example/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Example/Example/Assets.xcassets/add.imageset/Contents.json b/Example/Example/Assets.xcassets/add.imageset/Contents.json new file mode 100644 index 0000000..eff345e --- /dev/null +++ b/Example/Example/Assets.xcassets/add.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "H.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "H@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "H@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Example/Example/Assets.xcassets/add.imageset/H.png b/Example/Example/Assets.xcassets/add.imageset/H.png new file mode 100644 index 0000000..8c7939a Binary files /dev/null and b/Example/Example/Assets.xcassets/add.imageset/H.png differ diff --git a/Example/Example/Assets.xcassets/add.imageset/H@2x.png b/Example/Example/Assets.xcassets/add.imageset/H@2x.png new file mode 100644 index 0000000..15f4c70 Binary files /dev/null and b/Example/Example/Assets.xcassets/add.imageset/H@2x.png differ diff --git a/Example/Example/Assets.xcassets/add.imageset/H@3x.png b/Example/Example/Assets.xcassets/add.imageset/H@3x.png new file mode 100644 index 0000000..b069a5d Binary files /dev/null and b/Example/Example/Assets.xcassets/add.imageset/H@3x.png differ diff --git a/Example/Example/Assets.xcassets/anywhere.imageset/Contents.json b/Example/Example/Assets.xcassets/anywhere.imageset/Contents.json new file mode 100644 index 0000000..002c48c --- /dev/null +++ b/Example/Example/Assets.xcassets/anywhere.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "anywhere.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "anywhere@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "anywhere@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Example/Example/Assets.xcassets/anywhere.imageset/anywhere.png b/Example/Example/Assets.xcassets/anywhere.imageset/anywhere.png new file mode 100644 index 0000000..40f27b4 Binary files /dev/null and b/Example/Example/Assets.xcassets/anywhere.imageset/anywhere.png differ diff --git a/Example/Example/Assets.xcassets/anywhere.imageset/anywhere@2x.png b/Example/Example/Assets.xcassets/anywhere.imageset/anywhere@2x.png new file mode 100644 index 0000000..18660a2 Binary files /dev/null and b/Example/Example/Assets.xcassets/anywhere.imageset/anywhere@2x.png differ diff --git a/Example/Example/Assets.xcassets/anywhere.imageset/anywhere@3x.png b/Example/Example/Assets.xcassets/anywhere.imageset/anywhere@3x.png new file mode 100644 index 0000000..f6f08c5 Binary files /dev/null and b/Example/Example/Assets.xcassets/anywhere.imageset/anywhere@3x.png differ diff --git a/Example/Example/Assets.xcassets/gesture.imageset/Contents.json b/Example/Example/Assets.xcassets/gesture.imageset/Contents.json new file mode 100644 index 0000000..b658d02 --- /dev/null +++ b/Example/Example/Assets.xcassets/gesture.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "gesture.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "gesture@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "gesture@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Example/Example/Assets.xcassets/gesture.imageset/gesture.png b/Example/Example/Assets.xcassets/gesture.imageset/gesture.png new file mode 100644 index 0000000..95556fe Binary files /dev/null and b/Example/Example/Assets.xcassets/gesture.imageset/gesture.png differ diff --git a/Example/Example/Assets.xcassets/gesture.imageset/gesture@2x.png b/Example/Example/Assets.xcassets/gesture.imageset/gesture@2x.png new file mode 100644 index 0000000..5a7fd03 Binary files /dev/null and b/Example/Example/Assets.xcassets/gesture.imageset/gesture@2x.png differ diff --git a/Example/Example/Assets.xcassets/gesture.imageset/gesture@3x.png b/Example/Example/Assets.xcassets/gesture.imageset/gesture@3x.png new file mode 100644 index 0000000..97e57ba Binary files /dev/null and b/Example/Example/Assets.xcassets/gesture.imageset/gesture@3x.png differ diff --git a/Example/Example/Assets.xcassets/star.imageset/Contents.json b/Example/Example/Assets.xcassets/star.imageset/Contents.json new file mode 100644 index 0000000..54761a7 --- /dev/null +++ b/Example/Example/Assets.xcassets/star.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "drop.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "drop@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "drop@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Example/Example/Assets.xcassets/star.imageset/drop.png b/Example/Example/Assets.xcassets/star.imageset/drop.png new file mode 100644 index 0000000..cee60b3 Binary files /dev/null and b/Example/Example/Assets.xcassets/star.imageset/drop.png differ diff --git a/Example/Example/Assets.xcassets/star.imageset/drop@2x.png b/Example/Example/Assets.xcassets/star.imageset/drop@2x.png new file mode 100644 index 0000000..3be6ca9 Binary files /dev/null and b/Example/Example/Assets.xcassets/star.imageset/drop@2x.png differ diff --git a/Example/Example/Assets.xcassets/star.imageset/drop@3x.png b/Example/Example/Assets.xcassets/star.imageset/drop@3x.png new file mode 100644 index 0000000..16065cf Binary files /dev/null and b/Example/Example/Assets.xcassets/star.imageset/drop@3x.png differ diff --git a/Example/Example/Base.lproj/LaunchScreen.storyboard b/Example/Example/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f83f6fd --- /dev/null +++ b/Example/Example/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/Example/Base.lproj/Main.storyboard b/Example/Example/Base.lproj/Main.storyboard new file mode 100644 index 0000000..644d28b --- /dev/null +++ b/Example/Example/Base.lproj/Main.storyboard @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/Example/Info.plist b/Example/Example/Info.plist new file mode 100644 index 0000000..16be3b6 --- /dev/null +++ b/Example/Example/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Example/Example/ViewController.swift b/Example/Example/ViewController.swift new file mode 100644 index 0000000..6f7cd83 --- /dev/null +++ b/Example/Example/ViewController.swift @@ -0,0 +1,65 @@ +import UIKit +import WebKit +import Hover +import os + +extension UIImage { + + static var add: UIImage { + return UIImage(named: "add")! + } + + static var anywhere: UIImage { + return UIImage(named: "anywhere")! + } + + static var star: UIImage { + return UIImage(named: "star")! + } + + static var gesture: UIImage { + return UIImage(named: "gesture")! + } + + +} + +extension UIColor { + + static var pink: UIColor { + return UIColor(red: 1.00, green: 0.18, blue: 0.33, alpha: 1.0) + } + + static var darkPink: UIColor { + return UIColor(red: 0.32, green: 0.03, blue: 0.08, alpha: 1.0) + } +} + + + +class ViewController: UIViewController { + + @IBOutlet weak var webview: WKWebView! + private let hoverView = HoverView(with: HoverConfiguration(icon: .add, color: .gradient(top: .pink, bottom: .darkPink)), + items: [HoverItem(title: "Drop it Anywhere", image: .anywhere) { os_log("Tapped 'Drop it anywhere'") }, + HoverItem(title: "Gesture Driven", image: .gesture) { os_log("Tapped 'Gesture driven'") }, + HoverItem(title: "Give it a Star", image: .star) { os_log("Tapped 'Give it a star'") }]) + + override func viewDidLoad() { + super.viewDidLoad() + guard let url = URL(string: "https://github.com/pedrommcarrasco") else { return } + + webview.load(URLRequest(url: url)) + + view.addSubview(hoverView) + hoverView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate( + [ + hoverView.topAnchor.constraint(equalTo: view.topAnchor), + hoverView.bottomAnchor.constraint(equalTo: view.bottomAnchor), + hoverView.leadingAnchor.constraint(equalTo: view.leadingAnchor), + hoverView.trailingAnchor.constraint(equalTo: view.trailingAnchor) + ] + ) + } +} diff --git a/Example/Podfile b/Example/Podfile new file mode 100644 index 0000000..6dbe085 --- /dev/null +++ b/Example/Podfile @@ -0,0 +1,10 @@ +# Uncomment the next line to define a global platform for your project +# platform :ios, 12.0' + +target 'Example' do + # Comment the next line if you're not using Swift and don't want to use dynamic frameworks + + # Pods for Example + pod 'Hover', :path => ".." + +end diff --git a/Example/Podfile.lock b/Example/Podfile.lock new file mode 100644 index 0000000..f1e2cce --- /dev/null +++ b/Example/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - Hover (1.0.0) + +DEPENDENCIES: + - Hover (from `..`) + +EXTERNAL SOURCES: + Hover: + :path: ".." + +SPEC CHECKSUMS: + Hover: 2daa5a328ce02230fdf620fe9e2cc62954a4e068 + +PODFILE CHECKSUM: 4464a752690793fe72e3febd146ffc7ffb897004 + +COCOAPODS: 1.7.3 diff --git a/Example/Pods/Headers/Public/Hover/Hover-umbrella.h b/Example/Pods/Headers/Public/Hover/Hover-umbrella.h new file mode 120000 index 0000000..510d0de --- /dev/null +++ b/Example/Pods/Headers/Public/Hover/Hover-umbrella.h @@ -0,0 +1 @@ +../../../Target Support Files/Hover/Hover-umbrella.h \ No newline at end of file diff --git a/Example/Pods/Headers/Public/Hover/Hover.modulemap b/Example/Pods/Headers/Public/Hover/Hover.modulemap new file mode 120000 index 0000000..366501e --- /dev/null +++ b/Example/Pods/Headers/Public/Hover/Hover.modulemap @@ -0,0 +1 @@ +../../../Target Support Files/Hover/Hover.modulemap \ No newline at end of file diff --git a/Example/Pods/Local Podspecs/Constrictor.podspec.json b/Example/Pods/Local Podspecs/Constrictor.podspec.json new file mode 100644 index 0000000..5f64a82 --- /dev/null +++ b/Example/Pods/Local Podspecs/Constrictor.podspec.json @@ -0,0 +1,23 @@ +{ + "name": "Constrictor", + "swift_version": "4.2", + "version": "3.0.1", + "summary": "🐍 AutoLayout's µFramework", + "description": "(Boe) Constrictor's AutoLayout µFramework with the goal of simplying your constraints by reducing the amount of code you have to write.", + "homepage": "https://github.com/pedrommcarrasco/Constrictor", + "license": { + "type": "MIT", + "file": "LICENSE" + }, + "authors": "Pedro Carrasco", + "social_media_url": "http://twitter.com/pedrommcarrasco", + "platforms": { + "ios": "9.0" + }, + "source": { + "git": "https://github.com/pedrommcarrasco/Constrictor.git", + "tag": "3.0.1" + }, + "source_files": "Constrictor/Constrictor/**/*", + "exclude_files": "Constrictor/Constrictor/*.plist" +} diff --git a/Example/Pods/Local Podspecs/Fluky.podspec.json b/Example/Pods/Local Podspecs/Fluky.podspec.json new file mode 100644 index 0000000..e901360 --- /dev/null +++ b/Example/Pods/Local Podspecs/Fluky.podspec.json @@ -0,0 +1,23 @@ +{ + "name": "Fluky", + "swift_version": "4.2", + "version": "1.0.0", + "summary": "🎲 Loading based on random icons", + "description": "Make every loading screen different with Fluky, your random loading screen inspired by PlayStation.", + "homepage": "https://github.com/pedrommcarrasco/Fluky", + "license": { + "type": "MIT", + "file": "LICENSE" + }, + "authors": "Pedro Carrasco", + "social_media_url": "http://twitter.com/pedrommcarrasco", + "platforms": { + "ios": "9.0" + }, + "source": { + "git": "https://github.com/pedrommcarrasco/Fluky.git", + "tag": "1.0.0" + }, + "source_files": "Fluky/Fluky/**/*", + "exclude_files": "Fluky/Fluky/*.plist" +} diff --git a/Example/Pods/Local Podspecs/Hover.podspec.json b/Example/Pods/Local Podspecs/Hover.podspec.json new file mode 100644 index 0000000..aaa1776 --- /dev/null +++ b/Example/Pods/Local Podspecs/Hover.podspec.json @@ -0,0 +1,24 @@ +{ + "name": "Hover", + "version": "1.0.0", + "license": { + "type": "MIT", + "file": "LICENSE" + }, + "homepage": "https://github.com/pedrommcarrasco/Hover", + "authors": { + "Pedro Carrasco": "https://twitter.com/pedrommcarrasco" + }, + "summary": "🎈 Summary", + "source": { + "git": "https://github.com/tonymillion/Hover.git", + "tag": "1.0.0" + }, + "swift_versions": "5.0", + "platforms": { + "ios": "11.0" + }, + "source_files": "Hover/**/*", + "exclude_files": "Hover/*.plist", + "swift_version": "5.0" +} diff --git a/Example/Pods/Local Podspecs/SliceControl.podspec.json b/Example/Pods/Local Podspecs/SliceControl.podspec.json new file mode 100644 index 0000000..6be5b69 --- /dev/null +++ b/Example/Pods/Local Podspecs/SliceControl.podspec.json @@ -0,0 +1,23 @@ +{ + "name": "SliceControl", + "swift_version": "4.2", + "version": "1.3.0", + "summary": "🍰 Simply a better & animated UISegmentedControl", + "description": "🍰 Simply a better & animated UISegmentedControl", + "homepage": "https://github.com/pedrommcarrasco/SliceControl", + "license": { + "type": "MIT", + "file": "LICENSE" + }, + "authors": "Pedro Carrasco", + "social_media_url": "http://twitter.com/pedrommcarrasco", + "platforms": { + "ios": "9.0" + }, + "source": { + "git": "https://github.com/pedrommcarrasco/SliceControl.git", + "tag": "1.3.0" + }, + "source_files": "SliceControl/**/*", + "exclude_files": "SliceControl/*.plist" +} diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock new file mode 100644 index 0000000..f1e2cce --- /dev/null +++ b/Example/Pods/Manifest.lock @@ -0,0 +1,16 @@ +PODS: + - Hover (1.0.0) + +DEPENDENCIES: + - Hover (from `..`) + +EXTERNAL SOURCES: + Hover: + :path: ".." + +SPEC CHECKSUMS: + Hover: 2daa5a328ce02230fdf620fe9e2cc62954a4e068 + +PODFILE CHECKSUM: 4464a752690793fe72e3febd146ffc7ffb897004 + +COCOAPODS: 1.7.3 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..7d14695 --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,670 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 0E2DC0BCEFB6129B3C8B9E6ADDC02AB1 /* CGPoint+Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B35E5990466EF43AF18769BF368B6BE /* CGPoint+Operators.swift */; }; + 212104786D124ADE78417234712B40CE /* HoverButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA9983369CA5BF721FB4B0DD7960B8E6 /* HoverButton.swift */; }; + 3109FBC17B216A2608B98A79FF30E7E7 /* Pods-Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 156BF54520F2121642B61B54902E7808 /* Pods-Example-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 46A71D317C2C9C7D1B7506AE8BAEAF7B /* Orientation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B772F33279B6BA44B3F1EA09792D3AB /* Orientation.swift */; }; + 52B788B4C7F533CB89BFB743B0024B90 /* Pods-Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A10118860486B1C21B46B8EC8C08425 /* Pods-Example-dummy.m */; }; + 68B02716D69E094C6873CA315CB66324 /* Anchor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A818DA832B38C28BE1E8C3E96E077EC /* Anchor.swift */; }; + 76B26B8F648C1DD30E21698954DA07DE /* HoverConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B87B17B79FAF4483EF815D4CDFAF85B /* HoverConfiguration.swift */; }; + 7D063A542FC5C0D1518175F8B8CAB6FB /* Hover-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F7E7788FD04F162D35C67F94D0AF193 /* Hover-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 882348AEE501CD52DD2651259A45578C /* HoverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 171A829A80FB50CC81D798CE4FBFCDB7 /* HoverView.swift */; }; + 8E19FE8FEBAB88DBFB28D102EBB6CA18 /* HoverItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5673257584C2B744DD58E20C76529C5 /* HoverItem.swift */; }; + 9150320427733CD3D4A523E07FBD29D0 /* DimView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABF79BF61C9FA52D348885557E7DF628 /* DimView.swift */; }; + 98811863C4F4BF3206DB57FA7DBBDBB0 /* Hover-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 848BE10D1FBA8340E2477F9A64688992 /* Hover-dummy.m */; }; + AEA9F8E8E18913F8F0D4CEEAA44F25BC /* HoverColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41CDD5FB710EEB67F09983EFE45ECEEC /* HoverColor.swift */; }; + BB7B46030C0A6A569ED0BE86071CA438 /* HoverItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31042812DF9592F5B1C97A61DE727270 /* HoverItemView.swift */; }; + C46AA71A091C3FCDD7AC3A860CD760D4 /* NSObject+Create.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03C557B59AE7710FE23363EAABA8A7CC /* NSObject+Create.swift */; }; + C7F6322C0127A5E4759A2068C5098DA6 /* UIStackView+Add.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46F46417BD362809D5EA2BA93AE23403 /* UIStackView+Add.swift */; }; + CB0F12D3CE4ADBB70843FA3DD4C3546C /* UISpringTimingParameters+Init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5022FAC85616337D4163367733A27644 /* UISpringTimingParameters+Init.swift */; }; + D43ECCFCF9E53CFE1F800AB699569740 /* CGRect+Center.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA9A4A425FCC093A829869D5684AA413 /* CGRect+Center.swift */; }; + E9184D6C51D0F5A00B597C852CC23182 /* UIView+Decorators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23F0683CF412E74DD02DEF439F8E8A70 /* UIView+Decorators.swift */; }; + ED2F9FA8B67B5390D663ACEBE78A2D2D /* CALayer+Decorators.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2088447B9F059D296B03F6E63B900BD /* CALayer+Decorators.swift */; }; + EF4FFCE6B747F1D90389D18BD3D32E3E /* UIView+Add.swift in Sources */ = {isa = PBXBuildFile; fileRef = 277702533A34979D0AB0F77C660C9684 /* UIView+Add.swift */; }; + F12743CEFE540D717BA713C7AEEE49D1 /* HoverPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62937AF8AC1DB7DA3FE4B60CB69E21B3 /* HoverPosition.swift */; }; + FCC8A7B5724090AE6A97F09D74B667F6 /* Calculator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 767BFE2EBE19D1FD24ADF094508A15B1 /* Calculator.swift */; }; + FED1F3CDCF747C52F49B4AEBF7BB6851 /* CGPoint+Distance.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF9C6A0E9B8C982C3A81737E55D6542C /* CGPoint+Distance.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 38988C848787F71919E7EB2CD9FDF443 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 5DC8654BEC6CF98599D3E999827B1258; + remoteInfo = Hover; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 03C557B59AE7710FE23363EAABA8A7CC /* NSObject+Create.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSObject+Create.swift"; sourceTree = ""; }; + 156BF54520F2121642B61B54902E7808 /* Pods-Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Example-umbrella.h"; sourceTree = ""; }; + 171A829A80FB50CC81D798CE4FBFCDB7 /* HoverView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HoverView.swift; sourceTree = ""; }; + 1F667CC0E19EAF34E5A4119E2121F585 /* libPods-Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-Example.a"; path = "libPods-Example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 23F0683CF412E74DD02DEF439F8E8A70 /* UIView+Decorators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+Decorators.swift"; sourceTree = ""; }; + 277702533A34979D0AB0F77C660C9684 /* UIView+Add.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+Add.swift"; sourceTree = ""; }; + 31042812DF9592F5B1C97A61DE727270 /* HoverItemView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HoverItemView.swift; sourceTree = ""; }; + 3D6746E07DAA8BF046F4230C613B314E /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Example.debug.xcconfig"; sourceTree = ""; }; + 3F7E7788FD04F162D35C67F94D0AF193 /* Hover-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Hover-umbrella.h"; sourceTree = ""; }; + 41CDD5FB710EEB67F09983EFE45ECEEC /* HoverColor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HoverColor.swift; sourceTree = ""; }; + 46F46417BD362809D5EA2BA93AE23403 /* UIStackView+Add.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIStackView+Add.swift"; sourceTree = ""; }; + 4B772F33279B6BA44B3F1EA09792D3AB /* Orientation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Orientation.swift; sourceTree = ""; }; + 4B87B17B79FAF4483EF815D4CDFAF85B /* HoverConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HoverConfiguration.swift; sourceTree = ""; }; + 5022FAC85616337D4163367733A27644 /* UISpringTimingParameters+Init.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UISpringTimingParameters+Init.swift"; sourceTree = ""; }; + 53A341026EB50DB44BD6D7600982D503 /* Pods-Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-Example.modulemap"; sourceTree = ""; }; + 5A10118860486B1C21B46B8EC8C08425 /* Pods-Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Example-dummy.m"; sourceTree = ""; }; + 62937AF8AC1DB7DA3FE4B60CB69E21B3 /* HoverPosition.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HoverPosition.swift; sourceTree = ""; }; + 763B5F5D6D7214D56B655DE87625A480 /* Pods-Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Example-acknowledgements.markdown"; sourceTree = ""; }; + 767BFE2EBE19D1FD24ADF094508A15B1 /* Calculator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Calculator.swift; sourceTree = ""; }; + 7791A4DFACAFB26E01A27D63A691A472 /* Hover.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Hover.xcconfig; sourceTree = ""; }; + 847ACD3DD9DA5D9505383E21769469CE /* libHover.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libHover.a; path = libHover.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 848BE10D1FBA8340E2477F9A64688992 /* Hover-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Hover-dummy.m"; sourceTree = ""; }; + 8A818DA832B38C28BE1E8C3E96E077EC /* Anchor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Anchor.swift; sourceTree = ""; }; + 9A3D778F0C0BA5A11B556A6026C20B46 /* Pods-Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Example-acknowledgements.plist"; sourceTree = ""; }; + 9A8BC4CE72A41A90356C6098C5A88AF7 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Example.release.xcconfig"; sourceTree = ""; }; + 9B35E5990466EF43AF18769BF368B6BE /* CGPoint+Operators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CGPoint+Operators.swift"; sourceTree = ""; }; + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + A5673257584C2B744DD58E20C76529C5 /* HoverItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HoverItem.swift; sourceTree = ""; }; + A7798E705CA3C1B0F0B9ECA937B7BB96 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; + ABF79BF61C9FA52D348885557E7DF628 /* DimView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DimView.swift; sourceTree = ""; }; + B40622911DFD4A72389368409695ACFF /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; + C2088447B9F059D296B03F6E63B900BD /* CALayer+Decorators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CALayer+Decorators.swift"; sourceTree = ""; }; + CF9C6A0E9B8C982C3A81737E55D6542C /* CGPoint+Distance.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CGPoint+Distance.swift"; sourceTree = ""; }; + D0DA85012034537DA8C471DBCAC11D00 /* Hover.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Hover.modulemap; sourceTree = ""; }; + F5448407C9B1CDE3418708C1A91027E4 /* Hover.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = Hover.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + FA9983369CA5BF721FB4B0DD7960B8E6 /* HoverButton.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HoverButton.swift; sourceTree = ""; }; + FA9A4A425FCC093A829869D5684AA413 /* CGRect+Center.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CGRect+Center.swift"; sourceTree = ""; }; + FBAB2AF3530FE368B5494C5B71DBA12B /* Hover-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Hover-prefix.pch"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 41727C3318962E814AD1CCD52DDD0642 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 59408D25EFFE8CD29EB48268446B0C47 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 2AC2744CD970E3DEB379053FFA25ADE2 /* Pod */ = { + isa = PBXGroup; + children = ( + F5448407C9B1CDE3418708C1A91027E4 /* Hover.podspec */, + A7798E705CA3C1B0F0B9ECA937B7BB96 /* LICENSE */, + B40622911DFD4A72389368409695ACFF /* README.md */, + ); + name = Pod; + sourceTree = ""; + }; + 45BF6390E4DB7E143C827E9EE4118525 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + E58C35B79B0E723B7230CF24882E6121 /* Pods-Example */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + 47A9D8EC727A7FED478C9218BB31D41F /* Hover */ = { + isa = PBXGroup; + children = ( + 7D2C5B5FCCC4FE57AE6BECB546D53572 /* Extensions */, + 965AFD13BF632EA29C01CE905CCE79A6 /* Helpers */, + 938167B9652BB09DE3C285CE180458B2 /* Model */, + 2AC2744CD970E3DEB379053FFA25ADE2 /* Pod */, + CA24658519A1A0B753745709A6E6184C /* Support Files */, + 9D8910830719F23ACA3B0715100A25FA /* UI */, + ); + name = Hover; + path = ../..; + sourceTree = ""; + }; + 72DA05EBE74C62294F426320339AC3D4 /* Products */ = { + isa = PBXGroup; + children = ( + 847ACD3DD9DA5D9505383E21769469CE /* libHover.a */, + 1F667CC0E19EAF34E5A4119E2121F585 /* libPods-Example.a */, + ); + name = Products; + sourceTree = ""; + }; + 7D2C5B5FCCC4FE57AE6BECB546D53572 /* Extensions */ = { + isa = PBXGroup; + children = ( + C2088447B9F059D296B03F6E63B900BD /* CALayer+Decorators.swift */, + CF9C6A0E9B8C982C3A81737E55D6542C /* CGPoint+Distance.swift */, + 9B35E5990466EF43AF18769BF368B6BE /* CGPoint+Operators.swift */, + FA9A4A425FCC093A829869D5684AA413 /* CGRect+Center.swift */, + 03C557B59AE7710FE23363EAABA8A7CC /* NSObject+Create.swift */, + 5022FAC85616337D4163367733A27644 /* UISpringTimingParameters+Init.swift */, + 46F46417BD362809D5EA2BA93AE23403 /* UIStackView+Add.swift */, + 277702533A34979D0AB0F77C660C9684 /* UIView+Add.swift */, + 23F0683CF412E74DD02DEF439F8E8A70 /* UIView+Decorators.swift */, + ); + name = Extensions; + path = Hover/Extensions; + sourceTree = ""; + }; + 938167B9652BB09DE3C285CE180458B2 /* Model */ = { + isa = PBXGroup; + children = ( + 8A818DA832B38C28BE1E8C3E96E077EC /* Anchor.swift */, + 41CDD5FB710EEB67F09983EFE45ECEEC /* HoverColor.swift */, + 4B87B17B79FAF4483EF815D4CDFAF85B /* HoverConfiguration.swift */, + A5673257584C2B744DD58E20C76529C5 /* HoverItem.swift */, + 62937AF8AC1DB7DA3FE4B60CB69E21B3 /* HoverPosition.swift */, + 4B772F33279B6BA44B3F1EA09792D3AB /* Orientation.swift */, + ); + name = Model; + path = Hover/Model; + sourceTree = ""; + }; + 965AFD13BF632EA29C01CE905CCE79A6 /* Helpers */ = { + isa = PBXGroup; + children = ( + 767BFE2EBE19D1FD24ADF094508A15B1 /* Calculator.swift */, + ); + name = Helpers; + path = Hover/Helpers; + sourceTree = ""; + }; + 9D8910830719F23ACA3B0715100A25FA /* UI */ = { + isa = PBXGroup; + children = ( + ABF79BF61C9FA52D348885557E7DF628 /* DimView.swift */, + FA9983369CA5BF721FB4B0DD7960B8E6 /* HoverButton.swift */, + 31042812DF9592F5B1C97A61DE727270 /* HoverItemView.swift */, + 171A829A80FB50CC81D798CE4FBFCDB7 /* HoverView.swift */, + ); + name = UI; + path = Hover/UI; + sourceTree = ""; + }; + BEA3A86F8704E1818CB2A6D7F4AB5BDF /* Development Pods */ = { + isa = PBXGroup; + children = ( + 47A9D8EC727A7FED478C9218BB31D41F /* Hover */, + ); + name = "Development Pods"; + sourceTree = ""; + }; + CA24658519A1A0B753745709A6E6184C /* Support Files */ = { + isa = PBXGroup; + children = ( + D0DA85012034537DA8C471DBCAC11D00 /* Hover.modulemap */, + 7791A4DFACAFB26E01A27D63A691A472 /* Hover.xcconfig */, + 848BE10D1FBA8340E2477F9A64688992 /* Hover-dummy.m */, + FBAB2AF3530FE368B5494C5B71DBA12B /* Hover-prefix.pch */, + 3F7E7788FD04F162D35C67F94D0AF193 /* Hover-umbrella.h */, + ); + name = "Support Files"; + path = "Example/Pods/Target Support Files/Hover"; + sourceTree = ""; + }; + CF1408CF629C7361332E53B88F7BD30C = { + isa = PBXGroup; + children = ( + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, + BEA3A86F8704E1818CB2A6D7F4AB5BDF /* Development Pods */, + D89477F20FB1DE18A04690586D7808C4 /* Frameworks */, + 72DA05EBE74C62294F426320339AC3D4 /* Products */, + 45BF6390E4DB7E143C827E9EE4118525 /* Targets Support Files */, + ); + sourceTree = ""; + }; + D89477F20FB1DE18A04690586D7808C4 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; + E58C35B79B0E723B7230CF24882E6121 /* Pods-Example */ = { + isa = PBXGroup; + children = ( + 53A341026EB50DB44BD6D7600982D503 /* Pods-Example.modulemap */, + 763B5F5D6D7214D56B655DE87625A480 /* Pods-Example-acknowledgements.markdown */, + 9A3D778F0C0BA5A11B556A6026C20B46 /* Pods-Example-acknowledgements.plist */, + 5A10118860486B1C21B46B8EC8C08425 /* Pods-Example-dummy.m */, + 156BF54520F2121642B61B54902E7808 /* Pods-Example-umbrella.h */, + 3D6746E07DAA8BF046F4230C613B314E /* Pods-Example.debug.xcconfig */, + 9A8BC4CE72A41A90356C6098C5A88AF7 /* Pods-Example.release.xcconfig */, + ); + name = "Pods-Example"; + path = "Target Support Files/Pods-Example"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + A6397AF3F40489E7A53B220B82D7BCDF /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 3109FBC17B216A2608B98A79FF30E7E7 /* Pods-Example-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D5A8FF89472F4F333AAA8BB1782E0348 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 7D063A542FC5C0D1518175F8B8CAB6FB /* Hover-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 0AEE99A309977BD12A049FF48AF9BA4B /* Pods-Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = F0993D17C227941D5A965101A2816CED /* Build configuration list for PBXNativeTarget "Pods-Example" */; + buildPhases = ( + A6397AF3F40489E7A53B220B82D7BCDF /* Headers */, + 28F4B075A93708761CA0F37595469A75 /* Sources */, + 59408D25EFFE8CD29EB48268446B0C47 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 0429F3969B33D3692AF9FD41A7FD1C8D /* PBXTargetDependency */, + ); + name = "Pods-Example"; + productName = "Pods-Example"; + productReference = 1F667CC0E19EAF34E5A4119E2121F585 /* libPods-Example.a */; + productType = "com.apple.product-type.library.static"; + }; + 5DC8654BEC6CF98599D3E999827B1258 /* Hover */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7737279FB4A345630621970E18F0D23C /* Build configuration list for PBXNativeTarget "Hover" */; + buildPhases = ( + D5A8FF89472F4F333AAA8BB1782E0348 /* Headers */, + F5635BE990164B18E008BAC60EEB937B /* Sources */, + 41727C3318962E814AD1CCD52DDD0642 /* Frameworks */, + 3575DB0C7BBB4AC8B48ED7DAD255B2E5 /* Copy generated compatibility header */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Hover; + productName = Hover; + productReference = 847ACD3DD9DA5D9505383E21769469CE /* libHover.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + BFDFE7DC352907FC980B868725387E98 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1100; + LastUpgradeCheck = 1100; + }; + buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = CF1408CF629C7361332E53B88F7BD30C; + productRefGroup = 72DA05EBE74C62294F426320339AC3D4 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 5DC8654BEC6CF98599D3E999827B1258 /* Hover */, + 0AEE99A309977BD12A049FF48AF9BA4B /* Pods-Example */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3575DB0C7BBB4AC8B48ED7DAD255B2E5 /* Copy generated compatibility header */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", + "${PODS_ROOT}/Headers/Public/Hover/Hover.modulemap", + "${PODS_ROOT}/Headers/Public/Hover/Hover-umbrella.h", + ); + name = "Copy generated compatibility header"; + outputFileListPaths = ( + ); + outputPaths = ( + "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", + "${BUILT_PRODUCTS_DIR}/Hover-umbrella.h", + "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/Hover/Hover.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/Hover/Hover-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 28F4B075A93708761CA0F37595469A75 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 52B788B4C7F533CB89BFB743B0024B90 /* Pods-Example-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F5635BE990164B18E008BAC60EEB937B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 68B02716D69E094C6873CA315CB66324 /* Anchor.swift in Sources */, + ED2F9FA8B67B5390D663ACEBE78A2D2D /* CALayer+Decorators.swift in Sources */, + FCC8A7B5724090AE6A97F09D74B667F6 /* Calculator.swift in Sources */, + FED1F3CDCF747C52F49B4AEBF7BB6851 /* CGPoint+Distance.swift in Sources */, + 0E2DC0BCEFB6129B3C8B9E6ADDC02AB1 /* CGPoint+Operators.swift in Sources */, + D43ECCFCF9E53CFE1F800AB699569740 /* CGRect+Center.swift in Sources */, + 9150320427733CD3D4A523E07FBD29D0 /* DimView.swift in Sources */, + 98811863C4F4BF3206DB57FA7DBBDBB0 /* Hover-dummy.m in Sources */, + 212104786D124ADE78417234712B40CE /* HoverButton.swift in Sources */, + AEA9F8E8E18913F8F0D4CEEAA44F25BC /* HoverColor.swift in Sources */, + 76B26B8F648C1DD30E21698954DA07DE /* HoverConfiguration.swift in Sources */, + 8E19FE8FEBAB88DBFB28D102EBB6CA18 /* HoverItem.swift in Sources */, + BB7B46030C0A6A569ED0BE86071CA438 /* HoverItemView.swift in Sources */, + F12743CEFE540D717BA713C7AEEE49D1 /* HoverPosition.swift in Sources */, + 882348AEE501CD52DD2651259A45578C /* HoverView.swift in Sources */, + C46AA71A091C3FCDD7AC3A860CD760D4 /* NSObject+Create.swift in Sources */, + 46A71D317C2C9C7D1B7506AE8BAEAF7B /* Orientation.swift in Sources */, + CB0F12D3CE4ADBB70843FA3DD4C3546C /* UISpringTimingParameters+Init.swift in Sources */, + C7F6322C0127A5E4759A2068C5098DA6 /* UIStackView+Add.swift in Sources */, + EF4FFCE6B747F1D90389D18BD3D32E3E /* UIView+Add.swift in Sources */, + E9184D6C51D0F5A00B597C852CC23182 /* UIView+Decorators.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 0429F3969B33D3692AF9FD41A7FD1C8D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Hover; + target = 5DC8654BEC6CF98599D3E999827B1258 /* Hover */; + targetProxy = 38988C848787F71919E7EB2CD9FDF443 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 1453649A4976F2A1E9F4AA6E7C5F737B /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9A8BC4CE72A41A90356C6098C5A88AF7 /* Pods-Example.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Example/Pods-Example.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 1BE61BA200C2E596A2F90399998EE56A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3D6746E07DAA8BF046F4230C613B314E /* Pods-Example.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Example/Pods-Example.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 257497152829C177993B5EC99C1D227A /* Release */ = { + 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-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=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 = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 5.0; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Release; + }; + CFF381FCA866DC29E2FB698CC8937FF2 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7791A4DFACAFB26E01A27D63A691A472 /* Hover.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/Hover/Hover-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MODULEMAP_FILE = Headers/Public/Hover/Hover.modulemap; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = Hover; + PRODUCT_NAME = Hover; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + DD8F832993327D1DD8046C3CBCBD97CD /* 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 = 11.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; + }; + FD59E35C5A70C56991CF5839FD35DC53 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7791A4DFACAFB26E01A27D63A691A472 /* Hover.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + GCC_PREFIX_HEADER = "Target Support Files/Hover/Hover-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MODULEMAP_FILE = Headers/Public/Hover/Hover.modulemap; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = Hover; + PRODUCT_NAME = Hover; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD8F832993327D1DD8046C3CBCBD97CD /* Debug */, + 257497152829C177993B5EC99C1D227A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7737279FB4A345630621970E18F0D23C /* Build configuration list for PBXNativeTarget "Hover" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CFF381FCA866DC29E2FB698CC8937FF2 /* Debug */, + FD59E35C5A70C56991CF5839FD35DC53 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + F0993D17C227941D5A965101A2816CED /* Build configuration list for PBXNativeTarget "Pods-Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1BE61BA200C2E596A2F90399998EE56A /* Debug */, + 1453649A4976F2A1E9F4AA6E7C5F737B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; +} diff --git a/Example/Pods/Target Support Files/Hover/Hover-dummy.m b/Example/Pods/Target Support Files/Hover/Hover-dummy.m new file mode 100644 index 0000000..1079063 --- /dev/null +++ b/Example/Pods/Target Support Files/Hover/Hover-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Hover : NSObject +@end +@implementation PodsDummy_Hover +@end diff --git a/Example/Pods/Target Support Files/Hover/Hover-prefix.pch b/Example/Pods/Target Support Files/Hover/Hover-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Example/Pods/Target Support Files/Hover/Hover-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Example/Pods/Target Support Files/Hover/Hover-umbrella.h b/Example/Pods/Target Support Files/Hover/Hover-umbrella.h new file mode 100644 index 0000000..4e6a8d8 --- /dev/null +++ b/Example/Pods/Target Support Files/Hover/Hover-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double HoverVersionNumber; +FOUNDATION_EXPORT const unsigned char HoverVersionString[]; + diff --git a/Example/Pods/Target Support Files/Hover/Hover.modulemap b/Example/Pods/Target Support Files/Hover/Hover.modulemap new file mode 100644 index 0000000..4abf786 --- /dev/null +++ b/Example/Pods/Target Support Files/Hover/Hover.modulemap @@ -0,0 +1,6 @@ +module Hover { + umbrella header "Hover-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Hover/Hover.xcconfig b/Example/Pods/Target Support Files/Hover/Hover.xcconfig new file mode 100644 index 0000000..c1a5036 --- /dev/null +++ b/Example/Pods/Target Support Files/Hover/Hover.xcconfig @@ -0,0 +1,9 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Hover +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/Pods-Example/Info.plist b/Example/Pods/Target Support Files/Pods-Example/Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Example/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.markdown new file mode 100644 index 0000000..1562143 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.markdown @@ -0,0 +1,28 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## Hover + +MIT License + +Copyright (c) 2019 Pedro Carrasco + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.plist new file mode 100644 index 0000000..3f9bd59 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.plist @@ -0,0 +1,60 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + MIT License + +Copyright (c) 2019 Pedro Carrasco + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + License + MIT + Title + Hover + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/Pods/Target Support Files/Pods-Example/Pods-Example-dummy.m b/Example/Pods/Target Support Files/Pods-Example/Pods-Example-dummy.m new file mode 100644 index 0000000..6ee3f90 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Example/Pods-Example-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_Example : NSObject +@end +@implementation PodsDummy_Pods_Example +@end diff --git a/Example/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh new file mode 100755 index 0000000..08e3eaa --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Example/Pods-Example-frameworks.sh @@ -0,0 +1,146 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +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}" + +# 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 +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --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[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + fi +} + +# 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_identitiy + 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 +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi + stripped="" + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi + STRIP_BINARY_RETVAL=1 +} + +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/Example/Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh b/Example/Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh new file mode 100755 index 0000000..345301f --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh @@ -0,0 +1,118 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then + # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy + # resources to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +# 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 +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +case "${TARGETED_DEVICE_FAMILY:-}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" || true + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + else + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" + fi +fi diff --git a/Example/Pods/Target Support Files/Pods-Example/Pods-Example-umbrella.h b/Example/Pods/Target Support Files/Pods-Example/Pods-Example-umbrella.h new file mode 100644 index 0000000..ecf498e --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Example/Pods-Example-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_ExampleVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_ExampleVersionString[]; + diff --git a/Example/Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig new file mode 100644 index 0000000..683b60f --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Hover" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Hover/Hover.modulemap" +OTHER_LDFLAGS = $(inherited) -ObjC -l"Hover" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Hover/Hover.modulemap" +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 +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Hover" diff --git a/Example/Pods/Target Support Files/Pods-Example/Pods-Example.modulemap b/Example/Pods/Target Support Files/Pods-Example/Pods-Example.modulemap new file mode 100644 index 0000000..175128e --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Example/Pods-Example.modulemap @@ -0,0 +1,6 @@ +module Pods_Example { + umbrella header "Pods-Example-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig new file mode 100644 index 0000000..683b60f --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Hover" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Hover/Hover.modulemap" +OTHER_LDFLAGS = $(inherited) -ObjC -l"Hover" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/Hover/Hover.modulemap" +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 +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Hover" diff --git a/Hover.podspec b/Hover.podspec new file mode 100644 index 0000000..c7dfd2e --- /dev/null +++ b/Hover.podspec @@ -0,0 +1,18 @@ +Pod::Spec.new do |spec| + spec.name = 'Hover' + spec.version = '1.0.0' + spec.license = { :type => 'MIT', :file => 'LICENSE' } + spec.homepage = 'https://github.com/pedrommcarrasco/Hover' + spec.authors = { 'Pedro Carrasco' => 'https://twitter.com/pedrommcarrasco' } + spec.summary = '🎈 The smartest floating button' + spec.description = 'Hover is a draggable floating action button (FAB) inspired by Apple's session Designing Fluid Interfaces & Nathan Gitter's fluid-interfaces. Hover will always stick to the nearest corner to avoid blocking content and allows the user to send it to any other corner with a single swipe.' + + spec.source = { :git => 'https://github.com/pedrommcarrasco/Hover.git', :tag => spec.version.to_s } + spec.swift_version = '5.0' + + spec.ios.deployment_target = '11.0' + + spec.source_files = 'Hover/**/*' + spec.exclude_files = "Hover/*.plist" + +end diff --git a/Hover.xcodeproj/project.pbxproj b/Hover.xcodeproj/project.pbxproj new file mode 100644 index 0000000..cd95981 --- /dev/null +++ b/Hover.xcodeproj/project.pbxproj @@ -0,0 +1,447 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 200A2A5F22DB36010034E819 /* HoverColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 200A2A5E22DB36010034E819 /* HoverColor.swift */; }; + 2020302522DA33CD001781B6 /* CALayer+Decorators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2020302422DA33CD001781B6 /* CALayer+Decorators.swift */; }; + 20427AB122D905E7007C5ED0 /* CGPoint+Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20427AB022D905E7007C5ED0 /* CGPoint+Operators.swift */; }; + 20427AB522D907CE007C5ED0 /* CGPoint+Distance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20427AB422D907CE007C5ED0 /* CGPoint+Distance.swift */; }; + 20427AB722D90CBC007C5ED0 /* UISpringTimingParameters+Init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20427AB622D90CBC007C5ED0 /* UISpringTimingParameters+Init.swift */; }; + 206168A022DE7F8D003A39C8 /* DimView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2061689F22DE7F8D003A39C8 /* DimView.swift */; }; + 207F0EAA22DBBAD70009ED1E /* Anchor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 207F0EA922DBBAD70009ED1E /* Anchor.swift */; }; + 207F0EAC22DBBC370009ED1E /* HoverConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 207F0EAB22DBBC370009ED1E /* HoverConfiguration.swift */; }; + 207F0EAE22DBD3770009ED1E /* Orientation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 207F0EAD22DBD3770009ED1E /* Orientation.swift */; }; + 20979A9722D9F80700160A89 /* CGRect+Center.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20979A9622D9F80700160A89 /* CGRect+Center.swift */; }; + 209DED6422DA63D100B869AC /* UIView+Add.swift in Sources */ = {isa = PBXBuildFile; fileRef = 209DED6322DA63D100B869AC /* UIView+Add.swift */; }; + 209DED6622DA6D1B00B869AC /* NSObject+Create.swift in Sources */ = {isa = PBXBuildFile; fileRef = 209DED6522DA6D1B00B869AC /* NSObject+Create.swift */; }; + 209DED7822DA82A300B869AC /* Calculator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 209DED7022DA82A300B869AC /* Calculator.swift */; }; + 209DED7922DA82A300B869AC /* HoverButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 209DED7222DA82A300B869AC /* HoverButton.swift */; }; + 209DED7A22DA82A300B869AC /* HoverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 209DED7322DA82A300B869AC /* HoverView.swift */; }; + 209DED7C22DA82A300B869AC /* HoverPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 209DED7622DA82A300B869AC /* HoverPosition.swift */; }; + 209DED7D22DA82A300B869AC /* HoverItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 209DED7722DA82A300B869AC /* HoverItem.swift */; }; + 209DED7F22DA82D300B869AC /* HoverItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 209DED7E22DA82D300B869AC /* HoverItemView.swift */; }; + 209DED8122DA845600B869AC /* UIStackView+Add.swift in Sources */ = {isa = PBXBuildFile; fileRef = 209DED8022DA845600B869AC /* UIStackView+Add.swift */; }; + 20D3C01722DA28AC000664C8 /* UIView+Decorators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20D3C01622DA28AC000664C8 /* UIView+Decorators.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 200A2A5E22DB36010034E819 /* HoverColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HoverColor.swift; sourceTree = ""; }; + 2020302422DA33CD001781B6 /* CALayer+Decorators.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CALayer+Decorators.swift"; sourceTree = ""; }; + 20427AB022D905E7007C5ED0 /* CGPoint+Operators.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGPoint+Operators.swift"; sourceTree = ""; }; + 20427AB422D907CE007C5ED0 /* CGPoint+Distance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGPoint+Distance.swift"; sourceTree = ""; }; + 20427AB622D90CBC007C5ED0 /* UISpringTimingParameters+Init.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UISpringTimingParameters+Init.swift"; sourceTree = ""; }; + 2061689F22DE7F8D003A39C8 /* DimView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DimView.swift; sourceTree = ""; }; + 207F0EA922DBBAD70009ED1E /* Anchor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Anchor.swift; sourceTree = ""; }; + 207F0EAB22DBBC370009ED1E /* HoverConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HoverConfiguration.swift; sourceTree = ""; }; + 207F0EAD22DBD3770009ED1E /* Orientation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Orientation.swift; sourceTree = ""; }; + 20979A9622D9F80700160A89 /* CGRect+Center.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGRect+Center.swift"; sourceTree = ""; }; + 209B721422D7ECD5009F3433 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 209DED6322DA63D100B869AC /* UIView+Add.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Add.swift"; sourceTree = ""; }; + 209DED6522DA6D1B00B869AC /* NSObject+Create.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSObject+Create.swift"; sourceTree = ""; }; + 209DED7022DA82A300B869AC /* Calculator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Calculator.swift; sourceTree = ""; }; + 209DED7222DA82A300B869AC /* HoverButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HoverButton.swift; sourceTree = ""; }; + 209DED7322DA82A300B869AC /* HoverView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HoverView.swift; sourceTree = ""; }; + 209DED7622DA82A300B869AC /* HoverPosition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HoverPosition.swift; sourceTree = ""; }; + 209DED7722DA82A300B869AC /* HoverItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HoverItem.swift; sourceTree = ""; }; + 209DED7E22DA82D300B869AC /* HoverItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HoverItemView.swift; sourceTree = ""; }; + 209DED8022DA845600B869AC /* UIStackView+Add.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIStackView+Add.swift"; sourceTree = ""; }; + 20D3C01622DA28AC000664C8 /* UIView+Decorators.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Decorators.swift"; sourceTree = ""; }; + 20FB2C6222D7E82300D933D2 /* Hover.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Hover.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 20FB2C5F22D7E82300D933D2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 2020302622DA3624001781B6 /* Extensions */ = { + isa = PBXGroup; + children = ( + 20427AB622D90CBC007C5ED0 /* UISpringTimingParameters+Init.swift */, + 20427AB422D907CE007C5ED0 /* CGPoint+Distance.swift */, + 20427AB022D905E7007C5ED0 /* CGPoint+Operators.swift */, + 20979A9622D9F80700160A89 /* CGRect+Center.swift */, + 20D3C01622DA28AC000664C8 /* UIView+Decorators.swift */, + 2020302422DA33CD001781B6 /* CALayer+Decorators.swift */, + 209DED6322DA63D100B869AC /* UIView+Add.swift */, + 209DED6522DA6D1B00B869AC /* NSObject+Create.swift */, + 209DED8022DA845600B869AC /* UIStackView+Add.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 209DED6F22DA82A300B869AC /* Helpers */ = { + isa = PBXGroup; + children = ( + 209DED7022DA82A300B869AC /* Calculator.swift */, + ); + path = Helpers; + sourceTree = ""; + }; + 209DED7122DA82A300B869AC /* UI */ = { + isa = PBXGroup; + children = ( + 209DED7222DA82A300B869AC /* HoverButton.swift */, + 209DED7322DA82A300B869AC /* HoverView.swift */, + 209DED7E22DA82D300B869AC /* HoverItemView.swift */, + 2061689F22DE7F8D003A39C8 /* DimView.swift */, + ); + path = UI; + sourceTree = ""; + }; + 209DED7522DA82A300B869AC /* Model */ = { + isa = PBXGroup; + children = ( + 207F0EA922DBBAD70009ED1E /* Anchor.swift */, + 200A2A5E22DB36010034E819 /* HoverColor.swift */, + 207F0EAB22DBBC370009ED1E /* HoverConfiguration.swift */, + 209DED7722DA82A300B869AC /* HoverItem.swift */, + 209DED7622DA82A300B869AC /* HoverPosition.swift */, + 207F0EAD22DBD3770009ED1E /* Orientation.swift */, + ); + path = Model; + sourceTree = ""; + }; + 20FB2C5822D7E82300D933D2 = { + isa = PBXGroup; + children = ( + 20FB2C6422D7E82400D933D2 /* Hover */, + 20FB2C6322D7E82400D933D2 /* Products */, + ); + sourceTree = ""; + }; + 20FB2C6322D7E82400D933D2 /* Products */ = { + isa = PBXGroup; + children = ( + 20FB2C6222D7E82300D933D2 /* Hover.framework */, + ); + name = Products; + sourceTree = ""; + }; + 20FB2C6422D7E82400D933D2 /* Hover */ = { + isa = PBXGroup; + children = ( + 209B721422D7ECD5009F3433 /* Info.plist */, + 2020302622DA3624001781B6 /* Extensions */, + 209DED6F22DA82A300B869AC /* Helpers */, + 209DED7522DA82A300B869AC /* Model */, + 209DED7122DA82A300B869AC /* UI */, + ); + path = Hover; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 20FB2C5D22D7E82300D933D2 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 20FB2C6122D7E82300D933D2 /* Hover */ = { + isa = PBXNativeTarget; + buildConfigurationList = 20FB2C6A22D7E82400D933D2 /* Build configuration list for PBXNativeTarget "Hover" */; + buildPhases = ( + 20FB2C5D22D7E82300D933D2 /* Headers */, + 20FB2C5E22D7E82300D933D2 /* Sources */, + 20FB2C5F22D7E82300D933D2 /* Frameworks */, + 20FB2C6022D7E82300D933D2 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Hover; + productName = Hover; + productReference = 20FB2C6222D7E82300D933D2 /* Hover.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 20FB2C5922D7E82300D933D2 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + ORGANIZATIONNAME = "Pedro Carrasco"; + TargetAttributes = { + 20FB2C6122D7E82300D933D2 = { + CreatedOnToolsVersion = 10.2.1; + LastSwiftMigration = 1020; + }; + }; + }; + buildConfigurationList = 20FB2C5C22D7E82300D933D2 /* Build configuration list for PBXProject "Hover" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 20FB2C5822D7E82300D933D2; + productRefGroup = 20FB2C6322D7E82400D933D2 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 20FB2C6122D7E82300D933D2 /* Hover */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 20FB2C6022D7E82300D933D2 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 20FB2C5E22D7E82300D933D2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 209DED7F22DA82D300B869AC /* HoverItemView.swift in Sources */, + 2020302522DA33CD001781B6 /* CALayer+Decorators.swift in Sources */, + 209DED7D22DA82A300B869AC /* HoverItem.swift in Sources */, + 20427AB122D905E7007C5ED0 /* CGPoint+Operators.swift in Sources */, + 209DED8122DA845600B869AC /* UIStackView+Add.swift in Sources */, + 209DED7C22DA82A300B869AC /* HoverPosition.swift in Sources */, + 20427AB522D907CE007C5ED0 /* CGPoint+Distance.swift in Sources */, + 20979A9722D9F80700160A89 /* CGRect+Center.swift in Sources */, + 209DED6422DA63D100B869AC /* UIView+Add.swift in Sources */, + 206168A022DE7F8D003A39C8 /* DimView.swift in Sources */, + 200A2A5F22DB36010034E819 /* HoverColor.swift in Sources */, + 209DED7822DA82A300B869AC /* Calculator.swift in Sources */, + 207F0EAC22DBBC370009ED1E /* HoverConfiguration.swift in Sources */, + 207F0EAE22DBD3770009ED1E /* Orientation.swift in Sources */, + 20D3C01722DA28AC000664C8 /* UIView+Decorators.swift in Sources */, + 20427AB722D90CBC007C5ED0 /* UISpringTimingParameters+Init.swift in Sources */, + 209DED7922DA82A300B869AC /* HoverButton.swift in Sources */, + 209DED7A22DA82A300B869AC /* HoverView.swift in Sources */, + 209DED6622DA6D1B00B869AC /* NSObject+Create.swift in Sources */, + 207F0EAA22DBBAD70009ED1E /* Anchor.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 20FB2C6822D7E82400D933D2 /* 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; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + 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 = ( + "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 = 11.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 20FB2C6922D7E82400D933D2 /* Release */ = { + 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; + CODE_SIGN_IDENTITY = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + 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 = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 20FB2C6B22D7E82400D933D2 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 7GE4Q65N57; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Hover/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = pedrommcarrasco.Hover; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 20FB2C6C22D7E82400D933D2 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 7GE4Q65N57; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Hover/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = pedrommcarrasco.Hover; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 20FB2C5C22D7E82300D933D2 /* Build configuration list for PBXProject "Hover" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 20FB2C6822D7E82400D933D2 /* Debug */, + 20FB2C6922D7E82400D933D2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 20FB2C6A22D7E82400D933D2 /* Build configuration list for PBXNativeTarget "Hover" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 20FB2C6B22D7E82400D933D2 /* Debug */, + 20FB2C6C22D7E82400D933D2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 20FB2C5922D7E82300D933D2 /* Project object */; +} diff --git a/Hover.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Hover.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..c38dff1 --- /dev/null +++ b/Hover.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Hover.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Hover.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Hover.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Hover/Extensions/CALayer+Decorators.swift b/Hover/Extensions/CALayer+Decorators.swift new file mode 100644 index 0000000..ee4b933 --- /dev/null +++ b/Hover/Extensions/CALayer+Decorators.swift @@ -0,0 +1,17 @@ +// +// CALayer+Decorators.swift +// Hover +// +// Created by Pedro Carrasco on 13/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - Corners +extension CALayer { + + func decorateAsCircle() { + cornerRadius = bounds.height / 2 + } +} diff --git a/Hover/Extensions/CGPoint+Distance.swift b/Hover/Extensions/CGPoint+Distance.swift new file mode 100644 index 0000000..274dd43 --- /dev/null +++ b/Hover/Extensions/CGPoint+Distance.swift @@ -0,0 +1,17 @@ +// +// CGPoint+Distance.swift +// Hover +// +// Created by Pedro Carrasco on 12/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - Distance +extension CGPoint { + + func distance(to point: CGPoint) -> CGFloat { + return sqrt(pow(point.x - x, 2) + pow(point.y - y, 2)) + } +} diff --git a/Hover/Extensions/CGPoint+Operators.swift b/Hover/Extensions/CGPoint+Operators.swift new file mode 100644 index 0000000..37cff70 --- /dev/null +++ b/Hover/Extensions/CGPoint+Operators.swift @@ -0,0 +1,17 @@ +// +// CGPoint+Operators.swift +// Hover +// +// Created by Pedro Carrasco on 12/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - Operators +extension CGPoint { + + static func -(lhs: CGPoint, rhs: CGPoint) -> CGPoint { + return CGPoint(x: lhs.x - rhs.x, y: lhs.y - rhs.y) + } +} diff --git a/Hover/Extensions/CGRect+Center.swift b/Hover/Extensions/CGRect+Center.swift new file mode 100644 index 0000000..2fe709f --- /dev/null +++ b/Hover/Extensions/CGRect+Center.swift @@ -0,0 +1,17 @@ +// +// CGRect+Center.swift +// Hover +// +// Created by Pedro Carrasco on 13/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - Center +extension CGRect { + + var center: CGPoint { + return CGPoint(x: midX, y: midY) + } +} diff --git a/Hover/Extensions/NSObject+Create.swift b/Hover/Extensions/NSObject+Create.swift new file mode 100644 index 0000000..a94a543 --- /dev/null +++ b/Hover/Extensions/NSObject+Create.swift @@ -0,0 +1,19 @@ +// +// NSObject+Create.swift +// Hover +// +// Created by Pedro Carrasco on 13/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import Foundation + +// MARK: - Create +extension NSObject { + + static func create(_ setup: (T) -> Void) -> T where T: NSObject { + let object = T() + setup(object) + return object + } +} diff --git a/Hover/Extensions/UISpringTimingParameters+Init.swift b/Hover/Extensions/UISpringTimingParameters+Init.swift new file mode 100644 index 0000000..aa0e06d --- /dev/null +++ b/Hover/Extensions/UISpringTimingParameters+Init.swift @@ -0,0 +1,19 @@ +// +// UISpringTimingParameters+Init.swift +// Hover +// +// Created by Pedro Carrasco on 12/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - Init +extension UISpringTimingParameters { + + convenience init(damping: CGFloat, response: CGFloat, initialVelocity: CGVector = .zero) { + let stiffness = pow(2 * .pi / response, 2) + let damp = 4 * .pi * damping / response + self.init(mass: 1, stiffness: stiffness, damping: damp, initialVelocity: initialVelocity) + } +} diff --git a/Hover/Extensions/UIStackView+Add.swift b/Hover/Extensions/UIStackView+Add.swift new file mode 100644 index 0000000..9c52023 --- /dev/null +++ b/Hover/Extensions/UIStackView+Add.swift @@ -0,0 +1,28 @@ +// +// UIStackView+Add.swift +// Hover +// +// Created by Pedro Carrasco on 13/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - Add +extension UIStackView { + + func add(arrangedViews: UIView...) { + arrangedViews.forEach { + self.addArrangedSubview($0) + $0.translatesAutoresizingMaskIntoConstraints = false + } + } + + func add(arrangedViews: [UIView], hidden: Bool = false) { + arrangedViews.forEach { + self.addArrangedSubview($0) + $0.translatesAutoresizingMaskIntoConstraints = false + $0.alpha = hidden ? 0.0 : 1.0 + } + } +} diff --git a/Hover/Extensions/UIView+Add.swift b/Hover/Extensions/UIView+Add.swift new file mode 100644 index 0000000..0a1bd59 --- /dev/null +++ b/Hover/Extensions/UIView+Add.swift @@ -0,0 +1,33 @@ +// +// UIView+Add.swift +// Hover +// +// Created by Pedro Carrasco on 13/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - Add +extension UIView { + + func add(views: UIView...) { + views.forEach { + self.addSubview($0) + $0.translatesAutoresizingMaskIntoConstraints = false + } + } + + func add(views: [UIView]) { + views.forEach { + self.addSubview($0) + $0.translatesAutoresizingMaskIntoConstraints = false + } + } + + func add(layoutGuides: [UILayoutGuide]) { + layoutGuides.forEach { + self.addLayoutGuide($0) + } + } +} diff --git a/Hover/Extensions/UIView+Decorators.swift b/Hover/Extensions/UIView+Decorators.swift new file mode 100644 index 0000000..8814a8a --- /dev/null +++ b/Hover/Extensions/UIView+Decorators.swift @@ -0,0 +1,48 @@ +// +// UIView+Decorators.swift +// Hover +// +// Created by Pedro Carrasco on 13/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - Gradient +extension UIView { + + // MARK: Constant + private enum GradientConstant { + static let startPoint = CGPoint(x: 0.5, y: 1.0) + static let endPoint = CGPoint(x: 0.5, y: 0.0) + static let locations: [NSNumber] = [0, 1] + } + + // MARK: Functions + func makeGradientLayer(_ gradientLayer: CAGradientLayer = .init()) -> CAGradientLayer { + gradientLayer.startPoint = GradientConstant.startPoint + gradientLayer.endPoint = GradientConstant.endPoint + gradientLayer.locations = GradientConstant.locations + layer.insertSublayer(gradientLayer, at: 0) + return gradientLayer + } +} + +// MARK: - Shadow +extension UIView { + + // MARK: Constant + private enum ShadowConstant { + static let heightOffset = 0 + static let opacity: Float = 0.55 + static let radius: CGFloat = 10 + } + + // MARK: Functions + func addShadow() { + layer.shadowColor = UIColor.black.cgColor + layer.shadowOffset = CGSize(width: 0, height: 5) + layer.shadowOpacity = ShadowConstant.opacity + layer.shadowRadius = ShadowConstant.radius + } +} diff --git a/Hover/Helpers/Calculator.swift b/Hover/Helpers/Calculator.swift new file mode 100644 index 0000000..7c0c563 --- /dev/null +++ b/Hover/Helpers/Calculator.swift @@ -0,0 +1,65 @@ +// +// Calculator.swift +// Hover +// +// Created by Pedro Carrasco on 12/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - Calculator +struct Calculator { + + // MARK: Constant + private enum Constant { + static let delayMultiplier = 0.05 + static let translationBase: CGFloat = 50.0 + static let translationMultiplier: CGFloat = 10.0 + } + + // MARK: Functions + static func nearestPoint(from point: CGPoint, to points: [Anchor]) -> Anchor { + var minimumDistance = CGFloat.greatestFiniteMagnitude + return points.reduce(into: points[0]) { + let distance = point.distance(to: $1.center) + if distance < minimumDistance { + minimumDistance = distance + $0 = $1 + } + } + } + + static func relativeVelocity(for velocity: CGPoint, from pointA: CGPoint, to pointB: CGPoint) -> CGVector { + return CGVector(dx: relativeVelocity(for: velocity.x, from: pointA.x, to: pointB.x), + dy: relativeVelocity(for: velocity.y, from: pointA.y, to: pointB.y)) + } + + static func project(velocity: CGPoint, decelerationRate: UIScrollView.DecelerationRate, into point: CGPoint) -> CGPoint { + return CGPoint(x: point.x + project(velocity: velocity.x, decelerationRate: .normal), + y: point.y + project(velocity: velocity.y, decelerationRate: .normal)) + } + + static func delay(for index: Int) -> TimeInterval { + return Constant.delayMultiplier * Double(index) + } + + static func translation(for index: Int, anchor: Anchor) -> CGAffineTransform { + let extra = Constant.translationMultiplier * CGFloat(index) + return CGAffineTransform(translationX: (Constant.translationBase + extra) * anchor.position.xOrientation.translationModifier, + y: .zero) + } +} + +// MARK: - Private Functions +private extension Calculator { + + static func project(velocity: CGFloat, decelerationRate: UIScrollView.DecelerationRate) -> CGFloat { + return (velocity / 2500) * decelerationRate.rawValue / (1 - decelerationRate.rawValue) + } + + static func relativeVelocity(for velocity: CGFloat, from valueA: CGFloat, to valueB: CGFloat) -> CGFloat { + guard valueA - valueB != .zero else { return .zero } + return velocity / (valueB - valueA) + } +} diff --git a/Hover/Info.plist b/Hover/Info.plist new file mode 100644 index 0000000..e1fe4cf --- /dev/null +++ b/Hover/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/Hover/Model/Anchor.swift b/Hover/Model/Anchor.swift new file mode 100644 index 0000000..652a4f4 --- /dev/null +++ b/Hover/Model/Anchor.swift @@ -0,0 +1,24 @@ +// +// Anchor.swift +// Hover +// +// Created by Pedro Carrasco on 14/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - Anchor +struct Anchor { + + // MARK: Properties + let position: HoverPosition + let guide = UILayoutGuide() + + var center: CGPoint { + return guide.layoutFrame.center + } +} + +// MARK: - Equatable +extension Anchor: Equatable {} diff --git a/Hover/Model/HoverColor.swift b/Hover/Model/HoverColor.swift new file mode 100644 index 0000000..4e09ba9 --- /dev/null +++ b/Hover/Model/HoverColor.swift @@ -0,0 +1,16 @@ +// +// HoverColor.swift +// Hover +// +// Created by Pedro Carrasco on 14/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - HoverColor +public enum HoverColor { + case color(UIColor) + case gradient(top: UIColor, bottom: UIColor) +} + diff --git a/Hover/Model/HoverConfiguration.swift b/Hover/Model/HoverConfiguration.swift new file mode 100644 index 0000000..31498b6 --- /dev/null +++ b/Hover/Model/HoverConfiguration.swift @@ -0,0 +1,80 @@ +// +// HoverConfiguration.swift +// Hover +// +// Created by Pedro Carrasco on 14/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - HoverConfiguration +public struct HoverConfiguration { + + // MARK: Constant + private enum Constant { + static let itemSizeRatio: CGFloat = 0.75 + static let defaultSize: CGFloat = 60.0 + } + + // MARK: Properties + /// Color / Gradient of the floating button + public var color: HoverColor + /// Image displayed in the floating button + public var image: UIImage? + /// Size of the floating button + public var size: CGFloat + /// Dictates the size of the image shown in any button (imageSize = size * iconSizeRatio) + public var imageSizeRatio: CGFloat + /// Spacing between the floating button to the edges + public var spacing: CGFloat + /// Font used in items' labels + public var font: UIFont? + /// Color of the overlay + public var dimColor: UIColor + /// Initial position of the floating button + public var initialPosition: HoverPosition + /// Allowed positions in which the floating button can be placed + public var allowedPositions: Set + + var itemConfiguration: HoverItemConfiguration { + return HoverItemConfiguration(size: size * Constant.itemSizeRatio, + imageSizeRatio: imageSizeRatio, + margin: size * ((1 - Constant.itemSizeRatio) / 2), + font: font, + initialXOrientation: initialPosition.xOrientation) + } + + // MARK: Init + public init(icon: UIImage? = nil, + color: HoverColor = .color(.blue), + size: CGFloat = 60.0, + iconSizeRatio: CGFloat = 0.4, + spacing: CGFloat = 12.0, + font: UIFont? = nil, + dimColor: UIColor = UIColor.black.withAlphaComponent(0.75), + initialPosition: HoverPosition = .bottomRight, + allowedPositions: Set = .all) { + + self.color = color + self.image = icon + self.size = size + self.imageSizeRatio = iconSizeRatio + self.spacing = spacing + self.font = font + self.dimColor = dimColor + self.initialPosition = initialPosition + self.allowedPositions = allowedPositions + } +} + +// MARK: - HoverItemConfiguration +struct HoverItemConfiguration { + + let size: CGFloat + let imageSizeRatio: CGFloat + let margin: CGFloat + let font: UIFont? + let initialXOrientation: Orientation.X +} + diff --git a/Hover/Model/HoverItem.swift b/Hover/Model/HoverItem.swift new file mode 100644 index 0000000..1678f44 --- /dev/null +++ b/Hover/Model/HoverItem.swift @@ -0,0 +1,25 @@ +// +// HoverItem.swift +// Hover +// +// Created by Pedro Carrasco on 13/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - HoverItem +public struct HoverItem { + + // MARK: Properties + let title: String? + let image: UIImage + let onTap: () -> () + + // MARK: Lifecycle + public init(title: String? = nil, image: UIImage, onTap: @escaping () -> ()) { + self.title = title + self.image = image + self.onTap = onTap + } +} diff --git a/Hover/Model/HoverPosition.swift b/Hover/Model/HoverPosition.swift new file mode 100644 index 0000000..fc9e586 --- /dev/null +++ b/Hover/Model/HoverPosition.swift @@ -0,0 +1,82 @@ +// +// HoverPosition.swift +// Hover +// +// Created by Pedro Carrasco on 12/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - HoverPosition +public enum HoverPosition { + case topLeft + case topRight + case bottomLeft + case bottomRight +} + +// MARK: - Properties +extension HoverPosition { + + var xOrientation: Orientation.X { + switch self { + case .topLeft, .bottomLeft: + return .leftToRight + case .topRight, .bottomRight: + return .rightToLeft + } + } + + var yOrientation: Orientation.Y { + switch self { + case .bottomLeft, .bottomRight: + return .bottomToTop + case .topLeft, .topRight: + return .topToBottom + } + } +} + +// MARK: - Configuration +extension HoverPosition { + + func configurePosition(of guide: UILayoutGuide, inside view: UIView, with spacing: CGFloat) { + let positionConstraints: [NSLayoutConstraint] + switch self { + case .topLeft: + positionConstraints = [ + guide.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: spacing), + guide.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: spacing) + ] + case .topRight: + positionConstraints = [ + guide.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: spacing), + guide.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -spacing) + ] + case .bottomLeft: + positionConstraints = [ + guide.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -spacing), + guide.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: spacing) + ] + case .bottomRight: + positionConstraints = [ + guide.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -spacing), + guide.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -spacing) + ] + } + NSLayoutConstraint.activate(positionConstraints) + } +} + +// MARK: - Sugar +public extension Set where Element == HoverPosition { + + static let all: Set = [.topLeft, .topRight, .bottomLeft, .bottomRight] +} + +// MARK: - CaseIterable +extension HoverPosition: CaseIterable {} + +// MARK: - Equatable +extension HoverPosition: Equatable {} diff --git a/Hover/Model/Orientation.swift b/Hover/Model/Orientation.swift new file mode 100644 index 0000000..a1cb20f --- /dev/null +++ b/Hover/Model/Orientation.swift @@ -0,0 +1,43 @@ +// +// Orientation.swift +// Hover +// +// Created by Pedro Carrasco on 14/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - Orientation +struct Orientation { + + // MARK: X + enum X { + case leftToRight + case rightToLeft + + var translationModifier: CGFloat { + switch self { + case .leftToRight: + return -1.0 + case .rightToLeft: + return 1.0 + } + } + } + + // MARK: Y + enum Y { + case topToBottom + case bottomToTop + + func reverseArrayIfNeeded(_ array: [T]) -> [T] { + switch self { + case .topToBottom: + return array + case .bottomToTop: + return array.reversed() + } + } + } +} diff --git a/Hover/UI/DimView.swift b/Hover/UI/DimView.swift new file mode 100644 index 0000000..ec2e5dd --- /dev/null +++ b/Hover/UI/DimView.swift @@ -0,0 +1,28 @@ +// +// DimView.swift +// Hover +// +// Created by Pedro Carrasco on 16/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +final class DimView: UIView { + + init() { + super.init(frame: .zero) + configure() + } + + required init?(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} + +private extension DimView { + + func configure() { + isUserInteractionEnabled = false + } +} diff --git a/Hover/UI/HoverButton.swift b/Hover/UI/HoverButton.swift new file mode 100644 index 0000000..3b830fd --- /dev/null +++ b/Hover/UI/HoverButton.swift @@ -0,0 +1,114 @@ +// +// HoverButton.swift +// Hover +// +// Created by Pedro Carrasco on 13/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: HoverButton +class HoverButton: UIControl { + + // MARK: Constant + private enum Constant { + static let minimumHeight: CGFloat = 44.0 + static let scaleDownTransform = CGAffineTransform(scaleX: 0.9, y: 0.9) + static let animationDuration = 0.5 + static let animationDamping: CGFloat = 0.4 + static let highlightColor = UIColor.white.withAlphaComponent(0.2) + } + + // MARK: Outlets + private var gradientLayer: CAGradientLayer? + private let imageView: UIImageView = .create { + $0.contentMode = .scaleAspectFit + $0.isUserInteractionEnabled = false + } + private let hightlightView: UIView = .create { + $0.backgroundColor = Constant.highlightColor + $0.isUserInteractionEnabled = false + $0.clipsToBounds = true + $0.alpha = 0.0 + } + + // MARK: Overriden Properties + override var intrinsicContentSize: CGSize { + return CGSize(width: bounds.width, height: bounds.height) + } + + override var isHighlighted: Bool { + didSet { + let transform: CGAffineTransform = isHighlighted ? Constant.scaleDownTransform : .identity + let alpha: CGFloat = isHighlighted ? 1.0 : 0.0 + + UIViewPropertyAnimator(duration: Constant.animationDuration, dampingRatio: Constant.animationDamping) { + self.transform = transform + self.hightlightView.alpha = alpha + }.startAnimation() + } + } + + // MARK: Lifecycle + init(with color: HoverColor, image: UIImage?, imageSizeRatio: CGFloat) { + super.init(frame: .zero) + configure(with: color, image: image, imageSizeRatio: imageSizeRatio) + } + + required init?(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func layoutSubviews() { + super.layoutSubviews() + invalidateIntrinsicContentSize() + layer.decorateAsCircle() + hightlightView.layer.decorateAsCircle() + gradientLayer?.frame = bounds + gradientLayer?.decorateAsCircle() + addShadow() + } +} + +// MARK: - Configuration +private extension HoverButton { + + func configure(with color: HoverColor, image: UIImage?, imageSizeRatio: CGFloat) { + addSubviews() + defineConstraints(with: imageSizeRatio) + setupSubviews(with: color, image: image) + } + + func addSubviews() { + add(views: imageView, hightlightView) + } + + func defineConstraints(with imageSizeRatio: CGFloat) { + NSLayoutConstraint.activate( + [ + imageView.heightAnchor.constraint(equalTo: heightAnchor, multiplier: imageSizeRatio), + imageView.widthAnchor.constraint(equalTo: imageView.heightAnchor), + imageView.centerXAnchor.constraint(equalTo: centerXAnchor), + imageView.centerYAnchor.constraint(equalTo: centerYAnchor), + + hightlightView.topAnchor.constraint(equalTo: topAnchor), + hightlightView.bottomAnchor.constraint(equalTo: bottomAnchor), + hightlightView.leadingAnchor.constraint(equalTo: leadingAnchor), + hightlightView.trailingAnchor.constraint(equalTo: trailingAnchor) + ] + ) + } + + func setupSubviews(with color: HoverColor, image: UIImage?) { + imageView.image = image + + switch color { + case .color(let color): + backgroundColor = color + case .gradient(let top, let bottom): + gradientLayer = makeGradientLayer() + gradientLayer?.colors = [bottom, top].map { $0.cgColor } + } + } +} diff --git a/Hover/UI/HoverItemView.swift b/Hover/UI/HoverItemView.swift new file mode 100644 index 0000000..b7bb91a --- /dev/null +++ b/Hover/UI/HoverItemView.swift @@ -0,0 +1,106 @@ +// +// HoverItemView.swift +// Hover +// +// Created by Pedro Carrasco on 13/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - HoverItemView +class HoverItemView: UIStackView { + + // MARK: Constant + private enum Constant { + static let interItemSpacing: CGFloat = 8.0 + } + + // MARK: Outlets + private let button: HoverButton + private let label: UILabel = .create { + $0.textColor = .white + } + + // MARK: Properties + var onTap: (() -> ())? + var orientation: Orientation.X { + didSet { adapt(to: orientation) } + } + + // MARK: Private Properties + private let item: HoverItem + + // MARK: Lifecycle + init(with item: HoverItem, configuration: HoverItemConfiguration) { + self.item = item + self.orientation = configuration.initialXOrientation + self.button = HoverButton(with: .color(.white), image: item.image, imageSizeRatio: configuration.imageSizeRatio) + + if let font = configuration.font { + self.label.font = font + } + + self.label.text = item.title + super.init(frame: .zero) + configure(with: configuration) + } + + required init(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} + +// MARK: - Configuration +private extension HoverItemView { + + func configure(with configuration: HoverItemConfiguration) { + spacing = Constant.interItemSpacing + + addSubviews() + defineConstraints(with: configuration.size) + setupSubviews() + } + + func addSubviews() { + adapt(to: orientation) + } + + func defineConstraints(with size: CGFloat) { + NSLayoutConstraint.activate( + [ + button.heightAnchor.constraint(equalToConstant: size), + button.widthAnchor.constraint(equalTo: button.heightAnchor) + ] + ) + } + + func setupSubviews() { + button.addTarget(self, action: #selector(onTapInButton), for: .touchUpInside) + } +} + +// MARK: - Actions +private extension HoverItemView { + + @objc + func onTapInButton() { + item.onTap() + onTap?() + } +} + +// MARK: - Condional Constraints +private extension HoverItemView { + + func adapt(to orientation: Orientation.X) { + switch orientation { + case .leftToRight: + label.textAlignment = .left + add(arrangedViews: button, label) + case .rightToLeft: + label.textAlignment = .right + add(arrangedViews: label, button) + } + } +} diff --git a/Hover/UI/HoverView.swift b/Hover/UI/HoverView.swift new file mode 100644 index 0000000..d729b09 --- /dev/null +++ b/Hover/UI/HoverView.swift @@ -0,0 +1,275 @@ +// +// HoverView.swift +// Hover +// +// Created by Pedro Carrasco on 11/07/2019. +// Copyright © 2019 Pedro Carrasco. All rights reserved. +// + +import UIKit + +// MARK: - HoverView +public class HoverView: UIView { + + // MARK: Constant + private enum Constant { + static let animationDamping: CGFloat = 0.8 + static let animationResponse: CGFloat = 0.5 + static let animationDuration = 0.4 + static let anchorAnimationDuration = 0.15 + static let interItemSpacing: CGFloat = 12.0 + } + + // MARK: State + private enum State { + case none + case disappearing + case pending + } + + // MARK: Outlets + private let button: HoverButton + private let itemViews: [HoverItemView] + private let itemsStackView: UIStackView = .create { + $0.spacing = Constant.interItemSpacing + $0.axis = .vertical + $0.isUserInteractionEnabled = false + } + private let dimView: DimView = .create { + $0.alpha = 0.0 + } + + // MARK: Constraints + private var stackViewXConstraint = NSLayoutConstraint() + private var stackViewYConstraint = NSLayoutConstraint() + + // MARK: Private Properties + private let anchors: [Anchor] + private let configuration: HoverConfiguration + private let items: [HoverItem] + private let panRecognizer = UIPanGestureRecognizer() + private var state: State = .none + private var isOpen = false + private var offset = CGPoint.zero + private var currentAnchor: Anchor { + didSet { + if state == .disappearing { + state = .pending + } else { + adapt(to: currentAnchor) + } + } + } + + // MARK: Lifecycle + public init(with configuration: HoverConfiguration = .init(), items: [HoverItem] = .init()) { + + guard !configuration.allowedPositions.isEmpty else { + fatalError("`allowedPositions` can't be empty") + } + + self.anchors = configuration.allowedPositions.map(Anchor.init) + + guard let currentAnchor = anchors.first(where: { $0.position == configuration.initialPosition }) else { + fatalError("`allowedPositions` must contain the `initalPosition`") + } + + self.currentAnchor = currentAnchor + self.configuration = configuration + self.button = HoverButton(with: configuration.color, image: configuration.image, imageSizeRatio: configuration.imageSizeRatio) + self.itemViews = items.reversed().map { HoverItemView(with: $0, configuration: configuration.itemConfiguration) } + self.items = items + super.init(frame: .zero) + configure() + } + + public required init?(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + public override func layoutSubviews() { + super.layoutSubviews() + button.center = currentAnchor.center + } +} + +public extension HoverView { + + override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { + let hitView = super.hitTest(point, with: event) + if hitView == self { + onTouchInDim() + return nil + } + return hitView + } +} + +// MARK: - Configuration +private extension HoverView { + + func configure() { + addSubviews() + defineConstraints() + setupSubviews() + } + + func addSubviews() { + add(layoutGuides: anchors.map { $0.guide }) + add(views: dimView, itemsStackView, button) + itemsStackView.add(arrangedViews: itemViews, hidden: true) + } + + func defineConstraints() { + anchors.forEach { + $0.position.configurePosition(of: $0.guide, inside: self, with: self.configuration.spacing) + NSLayoutConstraint.activate( + [ + $0.guide.widthAnchor.constraint(equalToConstant: self.configuration.size), + $0.guide.heightAnchor.constraint(equalToConstant: self.configuration.size) + ] + ) + } + + NSLayoutConstraint.activate( + [ + button.widthAnchor.constraint(equalToConstant: configuration.size), + button.heightAnchor.constraint(equalToConstant: configuration.size), + + dimView.topAnchor.constraint(equalTo: topAnchor), + dimView.bottomAnchor.constraint(equalTo: bottomAnchor), + dimView.leadingAnchor.constraint(equalTo: leadingAnchor), + dimView.trailingAnchor.constraint(equalTo: trailingAnchor) + ] + ) + + adapt(to: currentAnchor) + } + + func setupSubviews() { + dimView.backgroundColor = configuration.dimColor + + button.addGestureRecognizer(UIPanGestureRecognizer(target: self, action: #selector(onPan(from:)))) + button.addTarget(self, action: #selector(onTapInButton), for: .touchUpInside) + + itemViews.forEach { $0.onTap = onTapInButton } + } +} + +// MARK: - Gestures +private extension HoverView { + + func onTouchInDim() { + animateState(to: false) + } + + @objc + func onTapInButton() { + animateState(to: !isOpen) + } + + @objc + func onPan(from recognizer: UIPanGestureRecognizer) { + animateState(to: false) + + let touchPoint = recognizer.location(in: self) + switch recognizer.state { + case .began: + offset = touchPoint - button.center + case .changed: + button.center = touchPoint - offset + case .ended, .cancelled: + let velocity = recognizer.velocity(in: self) + let projectedPosition = Calculator.project(velocity: velocity, decelerationRate: .normal, into: button.center) + currentAnchor = Calculator.nearestPoint(from: projectedPosition, to: anchors) + let relativeVelocity = Calculator.relativeVelocity(for: velocity, from: button.center, to: currentAnchor.center) + + let timingParameters = UISpringTimingParameters(damping: Constant.animationDamping, + response: Constant.animationResponse, + initialVelocity: relativeVelocity) + let animator = UIViewPropertyAnimator(duration: Constant.anchorAnimationDuration, timingParameters: timingParameters) + animator.addAnimations { self.button.center = self.currentAnchor.center } + animator.startAnimation() + default: + break + } + } +} + +// MARK: - Animations +private extension HoverView { + + func animateState(to isOpen: Bool) { + guard self.isOpen != isOpen else { return } + self.isOpen = isOpen + UIImpactFeedbackGenerator(style: .light).impactOccurred() + + if isOpen { + animate(isOpening: true, anchor: currentAnchor) + } else { + state = .disappearing + animate(isOpening: false, anchor: currentAnchor) { + if self.state == .pending { + self.adapt(to: self.currentAnchor) + } + + self.state = .none + } + } + } + + private func animate(isOpening: Bool, anchor: Anchor, completion: (() -> Void)? = nil) { + itemsStackView.isUserInteractionEnabled = isOpening + + UIViewPropertyAnimator(duration: Constant.animationDuration, curve: .easeInOut) { + self.dimView.alpha = isOpening ? 1.0 : 0.0 + }.startAnimation() + + anchor.position.yOrientation.reverseArrayIfNeeded(itemsStackView.arrangedSubviews).enumerated().forEach { (index, view) in + let translationTransform = Calculator.translation(for: index, anchor: anchor) + view.transform = isOpening ? translationTransform : .identity + + let animator = UIViewPropertyAnimator(duration: Constant.animationDuration, dampingRatio: Constant.animationDamping) { + view.transform = isOpening ? .identity : translationTransform + view.alpha = isOpening ? 1.0 : 0.0 + } + + animator.addCompletion { _ in + if index == self.itemsStackView.arrangedSubviews.count - 1 { + completion?() + } + } + + animator.startAnimation(afterDelay: Calculator.delay(for: index)) + } + } +} + +// MARK: - Conditional Constraints +private extension HoverView { + + func adapt(to anchor: Anchor) { + NSLayoutConstraint.deactivate([stackViewXConstraint, stackViewYConstraint]) + switch anchor.position { + case .topLeft: + itemsStackView.add(arrangedViews: itemViews.reversed(), hidden: true) + stackViewXConstraint = itemsStackView.leadingAnchor.constraint(equalTo: anchor.guide.leadingAnchor, constant: self.configuration.itemConfiguration.margin) + stackViewYConstraint = itemsStackView.topAnchor.constraint(equalTo: currentAnchor.guide.bottomAnchor, constant: self.configuration.spacing) + case .topRight: + itemsStackView.add(arrangedViews: itemViews.reversed(), hidden: true) + stackViewXConstraint = itemsStackView.trailingAnchor.constraint(equalTo: anchor.guide.trailingAnchor, constant: -self.configuration.itemConfiguration.margin) + stackViewYConstraint = itemsStackView.topAnchor.constraint(equalTo: currentAnchor.guide.bottomAnchor, constant: self.configuration.spacing) + case .bottomLeft: + itemsStackView.add(arrangedViews: itemViews, hidden: true) + stackViewXConstraint = itemsStackView.leadingAnchor.constraint(equalTo: anchor.guide.leadingAnchor, constant: self.configuration.itemConfiguration.margin) + stackViewYConstraint = itemsStackView.bottomAnchor.constraint(equalTo: currentAnchor.guide.topAnchor, constant: -self.configuration.spacing) + case .bottomRight: + itemsStackView.add(arrangedViews: itemViews, hidden: true) + stackViewXConstraint = itemsStackView.trailingAnchor.constraint(equalTo: anchor.guide.trailingAnchor, constant: -self.configuration.itemConfiguration.margin) + stackViewYConstraint = itemsStackView.bottomAnchor.constraint(equalTo: currentAnchor.guide.topAnchor, constant: -self.configuration.spacing) + } + NSLayoutConstraint.activate([stackViewXConstraint, stackViewYConstraint]) + + itemViews.forEach { $0.orientation = currentAnchor.position.xOrientation } + } +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..63b97a2 --- /dev/null +++ b/README.md @@ -0,0 +1,96 @@ +![](https://github.com/pedrommcarrasco/Hover/blob/master/Design/logo.png?raw=true) + +

+Presentation +

+ +# 🎈 What's Hover? + +> **Hover** *(/ˈhɒv.ər/)*, *verb* +> +> "to stay in one place in the air" + +Hover is a draggable **floating action button** (FAB) inspired by Apple's session [**Designing Fluid Interfaces**](https://developer.apple.com/wwdc18/803) & Nathan Gitter's [fluid-interfaces](https://github.com/nathangitter/fluid-interfaces). Hover will always stick to the nearest corner to avoid blocking content and allows the user to send it to any other corner with a single swipe. + +[![CocoaPods](https://img.shields.io/cocoapods/v/Hover.svg)](https://cocoapods.org/pods/Hover) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![apm](https://img.shields.io/apm/l/vim-mode.svg)](https://github.com/pedrommcarrasco/Hover/blob/master/LICENSE) + +# 📦 Installation + +## CocoaPods +Add the following line to your `podfile`: + +```swift +pod 'Hover' +``` +And then run the following command in terminal: + +```swift +pod install +``` + +## Carthage +Add the following line to your `cartfile`: + +```swift +github "pedrommcarrasco/Hover" +``` + +And then run the following command in terminal: + +```swift +carthage update +``` + +# ⌨️ Usage Example +After installing **Hover**, you should start by importing the framework: + +```swift +import Hover +``` + +Once imported, you can start using **Hover** like follows: + +```swift +// Create Hover's Configuration (all parameters have defaults) +let configuration = HoverConfiguration(icon: UIImage(named: "add"), color: .gradient(top: .blue, bottom: .cyan)) + +// Create the items to display +let items = [ + HoverItem(title: "Drop it Anywhere", image: UIImage(named: "anywhere")) { print("Tapped 'Drop it anywhere'") }, + HoverItem(title: "Gesture Driven", image: UIImage(named: "gesture")) { print("Tapped 'Gesture driven'") }, + HoverItem(title: "Give it a Star", image: UIImage(named: "star")) { print("Tapped 'Give it a star'") } +] + +// Create an HoverView with the previous configuration & items +let hoverView = HoverView(with: configuration, items: items) + +// Add to the top of the view hierarchy +view.addSubview(hoverView) +hoverView.translatesAutoresizingMaskIntoConstraints = false + +// Apply Constraints +// Never constrain to the safe area as Hover takes care of that +NSLayoutConstraint.activate( + [ + hoverView.topAnchor.constraint(equalTo: view.topAnchor), + hoverView.bottomAnchor.constraint(equalTo: view.bottomAnchor), + hoverView.leadingAnchor.constraint(equalTo: view.leadingAnchor), + hoverView.trailingAnchor.constraint(equalTo: view.trailingAnchor) + ] +) +``` + +For more details about all the parameters that you can configure, take a look into [`HoverConfiguration.swift`](https://github.com/pedrommcarrasco/Hover/blob/master/Hover/Model/HoverConfiguration.swift). + +# 📲 Sample Project +There's a sample project in this repository with some samples of Hover called [Example](https://github.com/pedrommcarrasco/Hover/tree/master/Example). + +# 🙌 Contributing +Feel free to contribute to this project by [reporting bugs](https://github.com/pedrommcarrasco/Hover/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) or open [pull requests](https://github.com/pedrommcarrasco/Hover/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc). + +Hover was created for personal use but dynamic enough to be an open-source framework. As such, while functional, it may lack some additioal customization. If there's something missing that you need, feel free to ask me here or on [Twitter](https://twitter.com/pedrommcarrasco). + +# ⛔ License +Constrictor's available under the MIT license. See the [LICENSE](https://github.com/pedrommcarrasco/Hover/blob/master/LICENSE) file for more information.