From 79857203f115780764ac62a0afca01a5d406aaa1 Mon Sep 17 00:00:00 2001 From: Serhii Stavytskyi Date: Fri, 11 May 2018 23:32:53 +0300 Subject: [PATCH 1/2] SwiftDemo --- .../project.pbxproj | 450 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcschemes/xcschememanagement.plist | 14 + .../contents.xcworkspacedata | 10 + .../HakawaiDemoSwift/AppDelegate.swift | 50 ++ .../Base.lproj/Main.storyboard | 69 +++ .../Mentions/CustomChooserView.swift | 87 ++++ .../Mentions/CustomChooserView.xib | 59 +++ .../Mentions/MentionsDemoViewController.swift | 75 +++ .../Mentions/MentionsEntity.swift | 41 ++ .../Mentions/MentionsManager.swift | 84 ++++ .../AppIcon.appiconset/Contents.json | 93 ++++ .../Base.lproj/LaunchScreen.storyboard | 25 + .../Supporting Files/Info.plist | 43 ++ HakawaiDemoSwift/Podfile | 7 + HakawaiDemoSwift/Podfile.lock | 17 + 16 files changed, 1131 insertions(+) create mode 100755 HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/project.pbxproj create mode 100755 HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100755 HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/xcuserdata/sergstavitskii.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100755 HakawaiDemoSwift/HakawaiDemoSwift.xcworkspace/contents.xcworkspacedata create mode 100755 HakawaiDemoSwift/HakawaiDemoSwift/AppDelegate.swift create mode 100755 HakawaiDemoSwift/HakawaiDemoSwift/Base.lproj/Main.storyboard create mode 100755 HakawaiDemoSwift/HakawaiDemoSwift/Mentions/CustomChooserView.swift create mode 100755 HakawaiDemoSwift/HakawaiDemoSwift/Mentions/CustomChooserView.xib create mode 100755 HakawaiDemoSwift/HakawaiDemoSwift/Mentions/MentionsDemoViewController.swift create mode 100755 HakawaiDemoSwift/HakawaiDemoSwift/Mentions/MentionsEntity.swift create mode 100755 HakawaiDemoSwift/HakawaiDemoSwift/Mentions/MentionsManager.swift create mode 100755 HakawaiDemoSwift/HakawaiDemoSwift/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100755 HakawaiDemoSwift/HakawaiDemoSwift/Resources/Base.lproj/LaunchScreen.storyboard create mode 100755 HakawaiDemoSwift/HakawaiDemoSwift/Supporting Files/Info.plist create mode 100755 HakawaiDemoSwift/Podfile create mode 100755 HakawaiDemoSwift/Podfile.lock diff --git a/HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/project.pbxproj b/HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/project.pbxproj new file mode 100755 index 0000000..445d323 --- /dev/null +++ b/HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/project.pbxproj @@ -0,0 +1,450 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 48; + objects = { + +/* Begin PBXBuildFile section */ + 98642551B770836A30D7E1D4 /* Pods_HakawaiDemoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E4504D25EEE97F7E2EDAECD /* Pods_HakawaiDemoSwift.framework */; }; + CDD0343A20A61F5100E1F0BD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDD0343920A61F5100E1F0BD /* AppDelegate.swift */; }; + CDD0343F20A61F5100E1F0BD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CDD0343D20A61F5100E1F0BD /* Main.storyboard */; }; + CDD0344120A61F5100E1F0BD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CDD0344020A61F5100E1F0BD /* Assets.xcassets */; }; + CDD0344420A61F5100E1F0BD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CDD0344220A61F5100E1F0BD /* LaunchScreen.storyboard */; }; + CDD0344D20A6202000E1F0BD /* MentionsDemoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDD0344C20A6202000E1F0BD /* MentionsDemoViewController.swift */; }; + CDD0344F20A6245800E1F0BD /* MentionsEntity.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDD0344E20A6245800E1F0BD /* MentionsEntity.swift */; }; + CDD0345120A6256200E1F0BD /* MentionsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDD0345020A6256200E1F0BD /* MentionsManager.swift */; }; + CDD0345320A62BE100E1F0BD /* CustomChooserView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDD0345220A62BE100E1F0BD /* CustomChooserView.swift */; }; + CDD0345520A62D4900E1F0BD /* CustomChooserView.xib in Resources */ = {isa = PBXBuildFile; fileRef = CDD0345420A62D4900E1F0BD /* CustomChooserView.xib */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 5068325EF39877E795382F41 /* Pods-HakawaiDemoSwift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HakawaiDemoSwift.release.xcconfig"; path = "Pods/Target Support Files/Pods-HakawaiDemoSwift/Pods-HakawaiDemoSwift.release.xcconfig"; sourceTree = ""; }; + 7E4504D25EEE97F7E2EDAECD /* Pods_HakawaiDemoSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_HakawaiDemoSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 90ED0D547272B7A1C2EF2D01 /* Pods-HakawaiDemoSwift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HakawaiDemoSwift.debug.xcconfig"; path = "Pods/Target Support Files/Pods-HakawaiDemoSwift/Pods-HakawaiDemoSwift.debug.xcconfig"; sourceTree = ""; }; + CDD0343620A61F5100E1F0BD /* HakawaiDemoSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HakawaiDemoSwift.app; sourceTree = BUILT_PRODUCTS_DIR; }; + CDD0343920A61F5100E1F0BD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + CDD0343E20A61F5100E1F0BD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + CDD0344020A61F5100E1F0BD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + CDD0344320A61F5100E1F0BD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + CDD0344520A61F5100E1F0BD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + CDD0344C20A6202000E1F0BD /* MentionsDemoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MentionsDemoViewController.swift; sourceTree = ""; }; + CDD0344E20A6245800E1F0BD /* MentionsEntity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MentionsEntity.swift; sourceTree = ""; }; + CDD0345020A6256200E1F0BD /* MentionsManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MentionsManager.swift; sourceTree = ""; }; + CDD0345220A62BE100E1F0BD /* CustomChooserView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomChooserView.swift; sourceTree = ""; }; + CDD0345420A62D4900E1F0BD /* CustomChooserView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CustomChooserView.xib; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + CDD0343320A61F5100E1F0BD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 98642551B770836A30D7E1D4 /* Pods_HakawaiDemoSwift.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1B103C0EBD37FB6DC9559F16 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 7E4504D25EEE97F7E2EDAECD /* Pods_HakawaiDemoSwift.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + B48DF5B547229E57D68EF420 /* Pods */ = { + isa = PBXGroup; + children = ( + 90ED0D547272B7A1C2EF2D01 /* Pods-HakawaiDemoSwift.debug.xcconfig */, + 5068325EF39877E795382F41 /* Pods-HakawaiDemoSwift.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + CDD0342D20A61F5100E1F0BD = { + isa = PBXGroup; + children = ( + CDD0343820A61F5100E1F0BD /* HakawaiDemoSwift */, + CDD0343720A61F5100E1F0BD /* Products */, + B48DF5B547229E57D68EF420 /* Pods */, + 1B103C0EBD37FB6DC9559F16 /* Frameworks */, + ); + sourceTree = ""; + }; + CDD0343720A61F5100E1F0BD /* Products */ = { + isa = PBXGroup; + children = ( + CDD0343620A61F5100E1F0BD /* HakawaiDemoSwift.app */, + ); + name = Products; + sourceTree = ""; + }; + CDD0343820A61F5100E1F0BD /* HakawaiDemoSwift */ = { + isa = PBXGroup; + children = ( + CDD0343920A61F5100E1F0BD /* AppDelegate.swift */, + CDD0343D20A61F5100E1F0BD /* Main.storyboard */, + CDD0344B20A61FDF00E1F0BD /* Mentions */, + CDD0345720A6306800E1F0BD /* Resources */, + CDD0345620A6303700E1F0BD /* Supporting Files */, + ); + path = HakawaiDemoSwift; + sourceTree = ""; + }; + CDD0344B20A61FDF00E1F0BD /* Mentions */ = { + isa = PBXGroup; + children = ( + CDD0344C20A6202000E1F0BD /* MentionsDemoViewController.swift */, + CDD0344E20A6245800E1F0BD /* MentionsEntity.swift */, + CDD0345020A6256200E1F0BD /* MentionsManager.swift */, + CDD0345220A62BE100E1F0BD /* CustomChooserView.swift */, + CDD0345420A62D4900E1F0BD /* CustomChooserView.xib */, + ); + path = Mentions; + sourceTree = ""; + }; + CDD0345620A6303700E1F0BD /* Supporting Files */ = { + isa = PBXGroup; + children = ( + CDD0344520A61F5100E1F0BD /* Info.plist */, + ); + path = "Supporting Files"; + sourceTree = ""; + }; + CDD0345720A6306800E1F0BD /* Resources */ = { + isa = PBXGroup; + children = ( + CDD0344220A61F5100E1F0BD /* LaunchScreen.storyboard */, + CDD0344020A61F5100E1F0BD /* Assets.xcassets */, + ); + path = Resources; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + CDD0343520A61F5100E1F0BD /* HakawaiDemoSwift */ = { + isa = PBXNativeTarget; + buildConfigurationList = CDD0344820A61F5100E1F0BD /* Build configuration list for PBXNativeTarget "HakawaiDemoSwift" */; + buildPhases = ( + 55E33F4E9F4D98EDEFA48751 /* [CP] Check Pods Manifest.lock */, + CDD0343220A61F5100E1F0BD /* Sources */, + CDD0343320A61F5100E1F0BD /* Frameworks */, + CDD0343420A61F5100E1F0BD /* Resources */, + B333E3F830DB18DCD0A59ED9 /* [CP] Embed Pods Frameworks */, + 742FE208B92B56EB35F19DD6 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HakawaiDemoSwift; + productName = HakawaiDemoSwift; + productReference = CDD0343620A61F5100E1F0BD /* HakawaiDemoSwift.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + CDD0342E20A61F5100E1F0BD /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 0920; + ORGANIZATIONNAME = com.linkedin; + TargetAttributes = { + CDD0343520A61F5100E1F0BD = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = CDD0343120A61F5100E1F0BD /* Build configuration list for PBXProject "HakawaiDemoSwift" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = CDD0342D20A61F5100E1F0BD; + productRefGroup = CDD0343720A61F5100E1F0BD /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + CDD0343520A61F5100E1F0BD /* HakawaiDemoSwift */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + CDD0343420A61F5100E1F0BD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CDD0344420A61F5100E1F0BD /* LaunchScreen.storyboard in Resources */, + CDD0344120A61F5100E1F0BD /* Assets.xcassets in Resources */, + CDD0345520A62D4900E1F0BD /* CustomChooserView.xib in Resources */, + CDD0343F20A61F5100E1F0BD /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 55E33F4E9F4D98EDEFA48751 /* [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-HakawaiDemoSwift-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; + }; + 742FE208B92B56EB35F19DD6 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HakawaiDemoSwift/Pods-HakawaiDemoSwift-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + B333E3F830DB18DCD0A59ED9 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-HakawaiDemoSwift/Pods-HakawaiDemoSwift-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Hakawai/Hakawai.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Hakawai.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HakawaiDemoSwift/Pods-HakawaiDemoSwift-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + CDD0343220A61F5100E1F0BD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CDD0344F20A6245800E1F0BD /* MentionsEntity.swift in Sources */, + CDD0344D20A6202000E1F0BD /* MentionsDemoViewController.swift in Sources */, + CDD0345320A62BE100E1F0BD /* CustomChooserView.swift in Sources */, + CDD0345120A6256200E1F0BD /* MentionsManager.swift in Sources */, + CDD0343A20A61F5100E1F0BD /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + CDD0343D20A61F5100E1F0BD /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + CDD0343E20A61F5100E1F0BD /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + CDD0344220A61F5100E1F0BD /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + CDD0344320A61F5100E1F0BD /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + CDD0344620A61F5100E1F0BD /* 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_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = 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_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 = 11.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + CDD0344720A61F5100E1F0BD /* 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_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = 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_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 = 11.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + CDD0344920A61F5100E1F0BD /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 90ED0D547272B7A1C2EF2D01 /* Pods-HakawaiDemoSwift.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HLS658NRU7; + INFOPLIST_FILE = HakawaiDemoSwift/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.linkedin.HakawaiDemoSwift; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + CDD0344A20A61F5100E1F0BD /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 5068325EF39877E795382F41 /* Pods-HakawaiDemoSwift.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = HLS658NRU7; + INFOPLIST_FILE = HakawaiDemoSwift/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.linkedin.HakawaiDemoSwift; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + CDD0343120A61F5100E1F0BD /* Build configuration list for PBXProject "HakawaiDemoSwift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CDD0344620A61F5100E1F0BD /* Debug */, + CDD0344720A61F5100E1F0BD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + CDD0344820A61F5100E1F0BD /* Build configuration list for PBXNativeTarget "HakawaiDemoSwift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + CDD0344920A61F5100E1F0BD /* Debug */, + CDD0344A20A61F5100E1F0BD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = CDD0342E20A61F5100E1F0BD /* Project object */; +} diff --git a/HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100755 index 0000000..497484d --- /dev/null +++ b/HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/xcuserdata/sergstavitskii.xcuserdatad/xcschemes/xcschememanagement.plist b/HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/xcuserdata/sergstavitskii.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100755 index 0000000..30c038d --- /dev/null +++ b/HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/xcuserdata/sergstavitskii.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + HakawaiDemoSwift.xcscheme + + orderHint + 2 + + + + diff --git a/HakawaiDemoSwift/HakawaiDemoSwift.xcworkspace/contents.xcworkspacedata b/HakawaiDemoSwift/HakawaiDemoSwift.xcworkspace/contents.xcworkspacedata new file mode 100755 index 0000000..fd91970 --- /dev/null +++ b/HakawaiDemoSwift/HakawaiDemoSwift.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/HakawaiDemoSwift/HakawaiDemoSwift/AppDelegate.swift b/HakawaiDemoSwift/HakawaiDemoSwift/AppDelegate.swift new file mode 100755 index 0000000..8293908 --- /dev/null +++ b/HakawaiDemoSwift/HakawaiDemoSwift/AppDelegate.swift @@ -0,0 +1,50 @@ +// +// AppDelegate.swift +// HakawaiDemoSwift +// +// Copyright (c) 2014 LinkedIn Corp. All rights reserved. +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/HakawaiDemoSwift/HakawaiDemoSwift/Base.lproj/Main.storyboard b/HakawaiDemoSwift/HakawaiDemoSwift/Base.lproj/Main.storyboard new file mode 100755 index 0000000..30e9b5c --- /dev/null +++ b/HakawaiDemoSwift/HakawaiDemoSwift/Base.lproj/Main.storyboard @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HakawaiDemoSwift/HakawaiDemoSwift/Mentions/CustomChooserView.swift b/HakawaiDemoSwift/HakawaiDemoSwift/Mentions/CustomChooserView.swift new file mode 100755 index 0000000..d4d1f03 --- /dev/null +++ b/HakawaiDemoSwift/HakawaiDemoSwift/Mentions/CustomChooserView.swift @@ -0,0 +1,87 @@ +// +// CustomChooserView.swift +// HakawaiDemoSwift +// +// Copyright (c) 2014 LinkedIn Corp. All rights reserved. +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// + +import UIKit +import Hakawai + +class CustomChooserView: UIView { + + @IBOutlet weak var pickerView: UIPickerView! + + weak var delegate: HKWCustomChooserViewDelegate? + var borderMode: HKWChooserBorderMode = .top + + // Protocol factory method + @objc(chooserViewWithFrame:delegate:) + class func chooserView(withFrame frame: CGRect, delegate: HKWCustomChooserViewDelegate) -> Any { + let item = Bundle.main.loadNibNamed("CustomChooserView", owner: nil, options: nil)?[0] as! CustomChooserView + item.delegate = delegate + item.frame = frame + item.setNeedsLayout() + return item + } + + override func awakeFromNib() { + super.awakeFromNib() + pickerView.dataSource = self + pickerView.delegate = self + } +} + +// MARK: - HKWChooserViewProtocol +extension CustomChooserView: HKWChooserViewProtocol { + func becomeVisible() { + isHidden = false + setNeedsLayout() + } + + func resetScrollPositionAndHide() { + // Don't do anything + isHidden = true + } + + func reloadData() { + pickerView.reloadComponent(0) + } + + +} + +// MARK: - UIPickerViewDataSource +extension CustomChooserView: UIPickerViewDataSource { + + func numberOfComponents(in pickerView: UIPickerView) -> Int { + return 1 + } + + func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { + return delegate?.numberOfModelObjects() ?? 0 + } +} + +//MARK: - UIPickerViewDelegate +extension CustomChooserView: UIPickerViewDelegate { + + func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? { + let model = delegate?.modelObject(for: row) as! HKWMentionsEntityProtocol + return model.entityName() + } +} + +// MARK: - Controls +extension CustomChooserView { + + @IBAction func chooseButtonTapped(_ sender: UIButton) { + let idx = pickerView.selectedRow(inComponent: 0) + delegate?.modelObjectSelected(at: idx) + } +} diff --git a/HakawaiDemoSwift/HakawaiDemoSwift/Mentions/CustomChooserView.xib b/HakawaiDemoSwift/HakawaiDemoSwift/Mentions/CustomChooserView.xib new file mode 100755 index 0000000..3a57ec6 --- /dev/null +++ b/HakawaiDemoSwift/HakawaiDemoSwift/Mentions/CustomChooserView.xib @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HakawaiDemoSwift/HakawaiDemoSwift/Mentions/MentionsDemoViewController.swift b/HakawaiDemoSwift/HakawaiDemoSwift/Mentions/MentionsDemoViewController.swift new file mode 100755 index 0000000..a7e72bf --- /dev/null +++ b/HakawaiDemoSwift/HakawaiDemoSwift/Mentions/MentionsDemoViewController.swift @@ -0,0 +1,75 @@ +// +// MentionsDemoViewController.swift +// HakawaiDemoSwift +// +// Copyright (c) 2014 LinkedIn Corp. All rights reserved. +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// + +import UIKit +import Hakawai + +class MentionsDemoViewController: UIViewController { + + //MARK: - Outlets + @IBOutlet weak var textView: HKWTextView! + @IBOutlet weak var mentionsListButton: UIButton! + + // + private var plugin: HKWMentionsPlugin! + + override func viewDidLoad() { + super.viewDidLoad() + setupUI() + } + + +} + +// MARK: - +extension MentionsDemoViewController { + + private func setupUI() { + textView.layer.borderWidth = 0.5 + textView.layer.borderColor = UIColor.lightGray.cgColor + // Set up the mentions system + let mode = HKWMentionsChooserPositionMode.enclosedTop + // In this demo, the user may explicitly begin a mention with either the '@' or '+' characters + let controlCharacters = CharacterSet(charactersIn: "@+") + // The user may also begin a mention by typing three characters (set searchLength to 0 to disable) + let mentionsPlugin = HKWMentionsPlugin(chooserMode: mode, + controlCharacters: controlCharacters, + searchLength: 3) + + // NOTE: If you want to see an example of a custom chooser, uncomment the following line. +// mentionsPlugin?.chooserViewClass = CustomChooserView.self + + // If the text view loses focus while the mention chooser is up, and then regains focus, it will automatically put + // the mentions chooser back up + mentionsPlugin?.resumeMentionsCreationEnabled = true + // Add edge insets so chooser view doesn't overlap the text view's cosmetic grey border + mentionsPlugin?.chooserViewEdgeInsets = UIEdgeInsetsMake(2, 0.5, 0.5, 0.5) + plugin = mentionsPlugin + plugin.chooserViewBackgroundColor = .lightGray + // The mentions plug-in requires a delegate, which provides it with mentions entities in response to a query string + mentionsPlugin?.delegate = MentionsManager.shared +// mentionsPlugin?.stateChangeDelegate = + textView.controlFlowPlugin = mentionsPlugin + } +} + +// MARK: - Controls +extension MentionsDemoViewController { + + @IBAction func listMentionsButtonTapped(_ sender: UIButton) { + print("There are mention(s): \(plugin.mentions().count) @% \(plugin.mentions())") + } + + @IBAction func doneEditingButtonTapped(_ sender: UIButton) { + textView.resignFirstResponder() + } +} diff --git a/HakawaiDemoSwift/HakawaiDemoSwift/Mentions/MentionsEntity.swift b/HakawaiDemoSwift/HakawaiDemoSwift/Mentions/MentionsEntity.swift new file mode 100755 index 0000000..b30b425 --- /dev/null +++ b/HakawaiDemoSwift/HakawaiDemoSwift/Mentions/MentionsEntity.swift @@ -0,0 +1,41 @@ +// +// MentionsEntity.swift +// HakawaiDemoSwift +// +// Copyright (c) 2014 LinkedIn Corp. All rights reserved. +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// + +import Foundation +import Hakawai + +class MentionsEntity: NSObject { + + private var name: String! + private var id: String! + + init(name: String, id: String) { + self.name = name + self.id = id + } +} + +extension MentionsEntity: HKWMentionsEntityProtocol { + + func entityId() -> String! { + return id + } + + func entityName() -> String! { + return name + } + + func entityMetadata() -> [AnyHashable : Any]! { + return [id: name] + } +} + diff --git a/HakawaiDemoSwift/HakawaiDemoSwift/Mentions/MentionsManager.swift b/HakawaiDemoSwift/HakawaiDemoSwift/Mentions/MentionsManager.swift new file mode 100755 index 0000000..232a941 --- /dev/null +++ b/HakawaiDemoSwift/HakawaiDemoSwift/Mentions/MentionsManager.swift @@ -0,0 +1,84 @@ +// +// MentionsManager.swift +// HakawaiDemoSwift +// +// Copyright (c) 2014 LinkedIn Corp. All rights reserved. +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// + +import UIKit +import Hakawai + +class MentionsManager: NSObject { + + static let shared = MentionsManager() + + private var fakeData = [MentionsEntity]() + + private func setupFakeData() { + fakeData = [MentionsEntity(name: "Alan Perlis", id: "1"), + MentionsEntity(name: "Maurice Wilkes", id: "2"), + MentionsEntity(name: "Richard Hamming", id: "3"), + MentionsEntity(name: "James Wilkinson", id: "4"), + MentionsEntity(name: "John McCarthy", id: "5"), + MentionsEntity(name: "Edsger Dijkstra", id: "6"), + MentionsEntity(name: "Charles Bachman", id: "7"), + MentionsEntity(name: "Donald Knuth", id: "8"), + MentionsEntity(name: "Allen Newell", id: "9"), + MentionsEntity(name: "Herbert Simon", id: "10"), + MentionsEntity(name: "Michael Rabin", id: "11") + ] + } +} + +//MARK: - HKWMentionsDelegate +extension MentionsManager: HKWMentionsDelegate { + + // In this method, the plug-in gives us a search string and some metadata, as well as a block. Our responsibility is to + // perform whatever work is necessary to get the entities for that search string (network call, database query, etc), + // and then to call the completion block with an array of entity objects corresponding to the search string. See the + // documentation for the method for more details. + func asyncRetrieveEntities(forKeyString keyString: String!, searchType type: HKWMentionsSearchType, controlCharacter character: unichar, completion completionBlock: (([Any]?, Bool, Bool) -> Void)!) { + if completionBlock == nil { + return + } + setupFakeData() + let data = fakeData + var buffer = [MentionsEntity]() + if keyString.count == 0 { + buffer = data + } + else { + for entity in data { + let name = entity.entityName() + if (name!.lowercased().contains(keyString.lowercased())) { + buffer.append(entity) + } + } + } + completionBlock(buffer, false, true) + } + + // In this method, the plug-in gives us a mentions entity (one we previously returned in response to a query), and asks + // us to provide a table view cell corresponding to that entity to be presented to the user. + func cell(forMentionsEntity entity: HKWMentionsEntityProtocol!, withMatch matchString: String!, tableView: UITableView!) -> UITableViewCell! { + var cell = tableView.dequeueReusableCell(withIdentifier: "mentionsCell") + if cell == nil { + cell = UITableViewCell(style: .subtitle, reuseIdentifier: "mentionsCell") + cell?.backgroundColor = .lightGray + } + cell?.textLabel?.text = entity.entityName() + cell?.detailTextLabel?.text = entity.entityId() + return cell + } + + func heightForCell(forMentionsEntity entity: HKWMentionsEntityProtocol!, tableView: UITableView!) -> CGFloat { + return 44 + } + + +} diff --git a/HakawaiDemoSwift/HakawaiDemoSwift/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/HakawaiDemoSwift/HakawaiDemoSwift/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100755 index 0000000..1d060ed --- /dev/null +++ b/HakawaiDemoSwift/HakawaiDemoSwift/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,93 @@ +{ + "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" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/HakawaiDemoSwift/HakawaiDemoSwift/Resources/Base.lproj/LaunchScreen.storyboard b/HakawaiDemoSwift/HakawaiDemoSwift/Resources/Base.lproj/LaunchScreen.storyboard new file mode 100755 index 0000000..f83f6fd --- /dev/null +++ b/HakawaiDemoSwift/HakawaiDemoSwift/Resources/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HakawaiDemoSwift/HakawaiDemoSwift/Supporting Files/Info.plist b/HakawaiDemoSwift/HakawaiDemoSwift/Supporting Files/Info.plist new file mode 100755 index 0000000..89d7858 --- /dev/null +++ b/HakawaiDemoSwift/HakawaiDemoSwift/Supporting Files/Info.plist @@ -0,0 +1,43 @@ + + + + + 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 + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/HakawaiDemoSwift/Podfile b/HakawaiDemoSwift/Podfile new file mode 100755 index 0000000..47a3638 --- /dev/null +++ b/HakawaiDemoSwift/Podfile @@ -0,0 +1,7 @@ +platform :ios, '11.0' +use_frameworks! + +target 'HakawaiDemoSwift' do + pod 'Hakawai' +end + diff --git a/HakawaiDemoSwift/Podfile.lock b/HakawaiDemoSwift/Podfile.lock new file mode 100755 index 0000000..89ea4a3 --- /dev/null +++ b/HakawaiDemoSwift/Podfile.lock @@ -0,0 +1,17 @@ +PODS: + - Hakawai (5.1.1): + - Hakawai/Core (= 5.1.1) + - Hakawai/Mentions (= 5.1.1) + - Hakawai/Core (5.1.1) + - Hakawai/Mentions (5.1.1): + - Hakawai/Core + +DEPENDENCIES: + - Hakawai + +SPEC CHECKSUMS: + Hakawai: 98dfeb08fce7c1ae9310089020c358a98acf29b5 + +PODFILE CHECKSUM: 8afb544880f2856932d1fd9950c29e8e1627c5ba + +COCOAPODS: 1.3.1 From 718fa33f031332e8b0c94e7f5d80ec0f7ef54334 Mon Sep 17 00:00:00 2001 From: Serhii Stavytskyi Date: Tue, 15 May 2018 23:27:01 +0300 Subject: [PATCH 2/2] Code improvements. --- HakawaiDemoSwift/.DS_Store | Bin 0 -> 6148 bytes .../HakawaiDemoSwift.xcodeproj/project.pbxproj | 4 ++-- .../xcschemes/xcschememanagement.plist | 14 -------------- .../UserInterfaceState.xcuserstate | Bin 0 -> 20981 bytes .../Mentions/MentionsDemoViewController.swift | 10 +++------- .../Mentions/MentionsEntity.swift | 2 +- .../Mentions/MentionsManager.swift | 13 ++++++++----- HakawaiDemoSwift/Podfile.lock | 12 ++++++------ 8 files changed, 20 insertions(+), 35 deletions(-) create mode 100644 HakawaiDemoSwift/.DS_Store delete mode 100755 HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/xcuserdata/sergstavitskii.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 HakawaiDemoSwift/HakawaiDemoSwift.xcworkspace/xcuserdata/sergstavitskii.xcuserdatad/UserInterfaceState.xcuserstate diff --git a/HakawaiDemoSwift/.DS_Store b/HakawaiDemoSwift/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..a7c21bc6fa245cf76e1edb3c42da519dcaf1640c GIT binary patch literal 6148 zcmeHK!AiqG5Pe%KRJ`;kp7slb{y``aJa`MZl2Y{Pziy1HlFrf;LjyQZH@?5kdBefh7U5N3F8!VCH7G-C*8HUJ! zoZTrdcy5o>-SexEalOPHHaNoza#SdIvNamc9#)H4mRDsRle%pB#wn{bEw-B+c=sP~ zuUGx!6u%OuzTeF&q}Pj|r>t48s`Y~T@V8-N3>X8(z@Qk=dueh!sIRh*F$Ro*Auu5K zgQp56ifzPjb#MqR0C7xn5YDBS5Ff9YD7F##gyNzrF}gZ!F^*MB@t~j28@Ay1`gtKD)s;T=l*}+$yUaIG4QV#aN{&f=S)d!YbQCW uwVrxS6_I^y#4i_4LMi56Da9w$Ahdg#5EI2VA}tjABM@k?!5H{c20j5Hk65(; literal 0 HcmV?d00001 diff --git a/HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/project.pbxproj b/HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/project.pbxproj index 445d323..a97ec09 100755 --- a/HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/project.pbxproj +++ b/HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/project.pbxproj @@ -398,7 +398,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = HLS658NRU7; - INFOPLIST_FILE = HakawaiDemoSwift/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/HakawaiDemoSwift/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.linkedin.HakawaiDemoSwift; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -414,7 +414,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = HLS658NRU7; - INFOPLIST_FILE = HakawaiDemoSwift/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/HakawaiDemoSwift/Supporting Files/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.linkedin.HakawaiDemoSwift; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/xcuserdata/sergstavitskii.xcuserdatad/xcschemes/xcschememanagement.plist b/HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/xcuserdata/sergstavitskii.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100755 index 30c038d..0000000 --- a/HakawaiDemoSwift/HakawaiDemoSwift.xcodeproj/xcuserdata/sergstavitskii.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - SchemeUserState - - HakawaiDemoSwift.xcscheme - - orderHint - 2 - - - - diff --git a/HakawaiDemoSwift/HakawaiDemoSwift.xcworkspace/xcuserdata/sergstavitskii.xcuserdatad/UserInterfaceState.xcuserstate b/HakawaiDemoSwift/HakawaiDemoSwift.xcworkspace/xcuserdata/sergstavitskii.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..19145ea93e01b1b8997c2d970d4011fa8a2e14c6 GIT binary patch literal 20981 zcmeHvX?#<~*YM1}w_Ca;O}e*fx}0x z0s<;+5kwFWWfMe16i`HVL_k4AMfoc(xB$v~=H8~XfIfbBp7;ImKFzPm+*!}eIdir- zbH}wb87$U>gi{D32C;}k4#<()&%HZ5Vxrz`F_?_QBTVDQ>uao*stBFArojN& zixJ(o8pmJ_ zPQWR+4<3ZmaR$!Eg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&(Mv-Fnqj`S}Xk~zs-WUexI znWxN8rj)5(?)LrE5BWv-4fZqnE%RIB zx884q->ZIG{oe4~?zhu#uir<0XZ+6ko%6fkcNJ_LcmE)NjemiEp?|UeQ2#Rj3jcZj zPy0XTztaDC{}=t+{5$-&`0w_A$Nydb_xum~f9C&nfMb9w*g|~*(gOMg3e)CU|zudfCT}+2HXww4h#rP2uusC4KxHU30xO=Ht@^9>w&)q z-U_@E_*alqkb96~TUMMe?50#IR>*e)w zgS=60mRsc$<&))8<+J5a%2&wS{wg}e~5I%HeOj*wj;yF=ard+|`n@sN`tr$f$$oC`T0 z@=eIMA=g8`54j!kXUJUzR(L4H3NM9B5vmARC>2qPzKUE$zM?=;sHjskD8_@GX;e&7 zOjS%*JffJVculcgaY=D4)H75T+BY;ebVTT=&@rK7L&t^IhSr5PgpLnw3Y{5h3w<}J?+VSk0Aa3N1-St${|V=MxT$q82x$l7cpru+L+>)(wK^v;V~m)YGdkS#>X_rw8WUf zLO&97J2oOVF}8PXN^Dwe|JZ@Cxv@iHi(^Y;%VTw5xsQ)+iZ#Zz#!il%8apF)W^707 z#@Jo4`(pRU9*BKE_M_O3V~@w4iaitidF(H-f5xFWHqIf=Cr%L;9v2xG6Q_zxj?0Y8 zjT;pP)V1nHwNX7mZB)pdTr^%9e~n6$rb*XiX|$SrO^K#VQ>m%a zjMUU>>NHK7DH@`AR5MpIU-PtPv1X~}In7GV8qGS*o8ZAXsyVJXr8%qlOmkWDrRHnR zHO)_&KN1-2liG#aRoeC1joQuHt=etco!Z^nL)s6uA8C(iPijwV&uY(U|H=)|EzF&i zOL8B}eI|EF?(?~8a@Xg+mHT$?!Q5lHCv#8dp3VI-_v_qixz}@l$o(<*R_>p Void)!) { - if completionBlock == nil { + func asyncRetrieveEntities(forKeyString keyString: String!, searchType type: HKWMentionsSearchType, controlCharacter character: unichar, + completion completionBlock: (([Any]?, Bool, Bool) -> Void)!) { + guard completionBlock != nil else { return } setupFakeData() @@ -66,9 +69,9 @@ extension MentionsManager: HKWMentionsDelegate { // In this method, the plug-in gives us a mentions entity (one we previously returned in response to a query), and asks // us to provide a table view cell corresponding to that entity to be presented to the user. func cell(forMentionsEntity entity: HKWMentionsEntityProtocol!, withMatch matchString: String!, tableView: UITableView!) -> UITableViewCell! { - var cell = tableView.dequeueReusableCell(withIdentifier: "mentionsCell") + var cell = tableView.dequeueReusableCell(withIdentifier: mentionsCellId) if cell == nil { - cell = UITableViewCell(style: .subtitle, reuseIdentifier: "mentionsCell") + cell = UITableViewCell(style: .subtitle, reuseIdentifier: mentionsCellId) cell?.backgroundColor = .lightGray } cell?.textLabel?.text = entity.entityName() @@ -77,7 +80,7 @@ extension MentionsManager: HKWMentionsDelegate { } func heightForCell(forMentionsEntity entity: HKWMentionsEntityProtocol!, tableView: UITableView!) -> CGFloat { - return 44 + return mentionsCellHeight } diff --git a/HakawaiDemoSwift/Podfile.lock b/HakawaiDemoSwift/Podfile.lock index 89ea4a3..6654fef 100755 --- a/HakawaiDemoSwift/Podfile.lock +++ b/HakawaiDemoSwift/Podfile.lock @@ -1,16 +1,16 @@ PODS: - - Hakawai (5.1.1): - - Hakawai/Core (= 5.1.1) - - Hakawai/Mentions (= 5.1.1) - - Hakawai/Core (5.1.1) - - Hakawai/Mentions (5.1.1): + - Hakawai (5.1.4): + - Hakawai/Core (= 5.1.4) + - Hakawai/Mentions (= 5.1.4) + - Hakawai/Core (5.1.4) + - Hakawai/Mentions (5.1.4): - Hakawai/Core DEPENDENCIES: - Hakawai SPEC CHECKSUMS: - Hakawai: 98dfeb08fce7c1ae9310089020c358a98acf29b5 + Hakawai: b525498fdef6485445127d615a65cbee5f0cfea2 PODFILE CHECKSUM: 8afb544880f2856932d1fd9950c29e8e1627c5ba