From aca4b1d6b6538b512c5bff687eb67a965595df28 Mon Sep 17 00:00:00 2001 From: Jorge Ovalle Date: Thu, 29 Oct 2020 15:52:57 -0600 Subject: [PATCH 01/15] Remove InformationView --- Example/Pods/Pods.xcodeproj/project.pbxproj | 355 +++++++++--------- Pod/Classes/EmojiSelectorView.swift | 24 +- .../Classes/Extensions/CGRect+init.swift | 0 .../Classes/Extensions/CGSize+init.swift | 0 Pod/Classes/InformationView.swift | 84 ----- 5 files changed, 181 insertions(+), 282 deletions(-) rename CGRect+init.swift => Pod/Classes/Extensions/CGRect+init.swift (100%) rename CGSize+init.swift => Pod/Classes/Extensions/CGSize+init.swift (100%) delete mode 100644 Pod/Classes/InformationView.swift diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 8b796bb..5be08e0 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,23 +7,22 @@ objects = { /* Begin PBXBuildFile section */ + 0E5A924C8B75FDA2292DACC4C7884481 /* EmojiSelectorView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0D1295DBEA16561C7799C7FCEEC17973 /* EmojiSelectorView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 10CC54B464850065E6DE1E53A7B87D46 /* EmojiSelectorView.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 23039DB12E2FEDA53DBC0E390044E3BB /* EmojiSelectorView.bundle */; }; + 2678F31335E857CBB94C3AEBED19F653 /* CGSize+init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BBF320B181C62265BE07F7F3F937F98 /* CGSize+init.swift */; }; 2F90788F589DCECAF4288E777CB32683 /* Pods-EmojiSelectorView_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 05A7AE4D4F1D7E4E8B3477AFF28546CE /* Pods-EmojiSelectorView_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 343CA84DB0B3A656BA7B3EA3174D50E0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; - 39F090407C0F3C55980904F7D0BCE329 /* EmojiSelectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BD0C437C4A9FA0ADD24D831E694C466 /* EmojiSelectorView.swift */; }; - 3ADBE3166B8A8E0F89B0D70C0683359C /* EmojiSelectorView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 347DBD2F40DC5379696EA770D0948F02 /* EmojiSelectorView-dummy.m */; }; + 31270D34A4FC472F2D1DA5B7F2BE332A /* EmojiSelectorViewOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCFC282D68E8FA73FC68C363149CF175 /* EmojiSelectorViewOption.swift */; }; 3AE3E45A6AEEDD2D579130B6DF3ADDE8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; - 4D6B25C87EA7717A585A56D3453A2452 /* EmojiSelectorViewOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B2C84775FE2F64D4289F7F0707608B9 /* EmojiSelectorViewOption.swift */; }; + 47B7850C21378E9E227222744DCFFFA7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; 54ADEDD2BD9240FFD32A4E9352B0F1FF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; - 646FB28A3569D0DF75043D8F4BA2FA60 /* EmojiSelectorViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B20DC0C9FE0EF6CF43BAFB1BC037C476 /* EmojiSelectorViewDelegate.swift */; }; 6591071C43D9B87AFA228C85CDDEAD33 /* Pods-EmojiSelectorView_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A87C4E68A3D13428D55987315EB2A41 /* Pods-EmojiSelectorView_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6D18FC5763E456280CBE7AD9897AF27F /* SelectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B23F19D1CEA722C42F09DE015411086 /* SelectorView.swift */; }; - 7AE3E8A1254B5BF70085E93A /* CGSize+init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AE3E89F254B5BF60085E93A /* CGSize+init.swift */; }; - 7AE3E8A2254B5BF70085E93A /* CGRect+init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AE3E8A0254B5BF60085E93A /* CGRect+init.swift */; }; - 89B53FA2B8E23D6B27DADAC6CBAC0EC7 /* EmojiSelectorViewConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5F0E6BA64A4AEBF8651667B0448F658 /* EmojiSelectorViewConfig.swift */; }; + 848B385E9305205A802100B71061D9FD /* EmojiSelectorView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 79D52CE154951E5AB2EAC7E613500282 /* EmojiSelectorView-dummy.m */; }; + 85CB39A5AABE21C73030DB5FE1024250 /* CGRect+init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DF2911012A9A236C5F2B6D4EB1D4094 /* CGRect+init.swift */; }; 934EB4B96C029D7A175A99E83A86A4B0 /* Pods-EmojiSelectorView_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 67C39957D3F4186F0D3CC7D4CC2C3F7C /* Pods-EmojiSelectorView_Example-dummy.m */; }; - B1B6B383E0C8C5B340C80E10FC5BBC45 /* EmojiSelectorView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3E9F115B1F90788E8791C797D6FD5DE3 /* EmojiSelectorView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BE35B699FA3D0B1A21220201262E8D33 /* InformationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A1045F63BE318F1AD990F6C6BF1856B /* InformationView.swift */; }; - CF7B1C2AD4E00AB49E4CA722CDC35E52 /* EmojiSelectorView.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 23039DB12E2FEDA53DBC0E390044E3BB /* EmojiSelectorView.bundle */; }; + BF6E731C71D2F6963367EBB90628C488 /* EmojiSelectorViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8107FB9C18556C3BEDB6C18FA985F8DE /* EmojiSelectorViewDelegate.swift */; }; + DE59754D4F08534EE5D7515ADB91241C /* SelectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44438EA33E0CD35B81EFB7DDDF9F9105 /* SelectorView.swift */; }; + E786A40A908BDED9AF542CE49A7E1930 /* EmojiSelectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA4FDA624318CBDB154216BF9409A1DE /* EmojiSelectorView.swift */; }; + ED1F943FC0C71899F1DAF2C2C5FC0915 /* EmojiSelectorViewConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0BFC4C63056431C327840C9A2F5D946 /* EmojiSelectorViewConfig.swift */; }; F8B9F90FC1C5B94FECCB2A6D663BB68D /* Pods-EmojiSelectorView_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B9F963A73C8AEEBF4C4FCDCAA70B5609 /* Pods-EmojiSelectorView_Tests-dummy.m */; }; /* End PBXBuildFile section */ @@ -35,7 +34,7 @@ remoteGlobalIDString = 1D332AEEDB5E74D9CD9FDDAE4A776D4A; remoteInfo = EmojiSelectorView; }; - C7E9EBAE147273FFA7CF5E70DA520AB3 /* PBXContainerItemProxy */ = { + 8E5DB072889219987478C77219370A2C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; @@ -53,70 +52,69 @@ /* Begin PBXFileReference section */ 05A7AE4D4F1D7E4E8B3477AFF28546CE /* Pods-EmojiSelectorView_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-EmojiSelectorView_Tests-umbrella.h"; sourceTree = ""; }; + 0D1295DBEA16561C7799C7FCEEC17973 /* EmojiSelectorView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EmojiSelectorView-umbrella.h"; sourceTree = ""; }; 0F28FC89D2F94B12130119CEEE717279 /* Pods-EmojiSelectorView_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-EmojiSelectorView_Example.modulemap"; sourceTree = ""; }; 178D6D17455F143939B7F8B9503A7563 /* Pods-EmojiSelectorView_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-EmojiSelectorView_Tests-acknowledgements.plist"; sourceTree = ""; }; 23039DB12E2FEDA53DBC0E390044E3BB /* EmojiSelectorView.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EmojiSelectorView.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 27A8597A8FD4EAE7F466E05F1E0756B5 /* Pods-EmojiSelectorView_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-EmojiSelectorView_Example-acknowledgements.markdown"; sourceTree = ""; }; - 2B1F1433B6A00C2D034BBC47557CA752 /* EmojiSelectorView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = EmojiSelectorView.modulemap; sourceTree = ""; }; 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 347DBD2F40DC5379696EA770D0948F02 /* EmojiSelectorView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "EmojiSelectorView-dummy.m"; sourceTree = ""; }; - 3B23F19D1CEA722C42F09DE015411086 /* SelectorView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SelectorView.swift; path = Pod/Classes/SelectorView.swift; sourceTree = ""; }; - 3B2C84775FE2F64D4289F7F0707608B9 /* EmojiSelectorViewOption.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorViewOption.swift; path = Pod/Classes/EmojiSelectorViewOption.swift; sourceTree = ""; }; 3C12C0786146C5DB619F1593ADAC8503 /* Pods-EmojiSelectorView_Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-EmojiSelectorView_Tests-Info.plist"; sourceTree = ""; }; - 3E9F115B1F90788E8791C797D6FD5DE3 /* EmojiSelectorView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EmojiSelectorView-umbrella.h"; sourceTree = ""; }; - 454EA33B503A1FDD93DA3CAFC5853772 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + 44438EA33E0CD35B81EFB7DDDF9F9105 /* SelectorView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SelectorView.swift; path = Pod/Classes/SelectorView.swift; sourceTree = ""; }; 4705277B7290207BE08E25D46100C6B0 /* Pods-EmojiSelectorView_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-EmojiSelectorView_Tests.modulemap"; sourceTree = ""; }; 49FB8B84CD444A429A9FEE0311CC0B71 /* Pods-EmojiSelectorView_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-EmojiSelectorView_Example.release.xcconfig"; sourceTree = ""; }; 4A87C4E68A3D13428D55987315EB2A41 /* Pods-EmojiSelectorView_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-EmojiSelectorView_Example-umbrella.h"; sourceTree = ""; }; 4B79032E21611A31F229ACE463517B7D /* Pods-EmojiSelectorView_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-EmojiSelectorView_Tests-acknowledgements.markdown"; sourceTree = ""; }; - 4BD0C437C4A9FA0ADD24D831E694C466 /* EmojiSelectorView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorView.swift; path = Pod/Classes/EmojiSelectorView.swift; sourceTree = ""; }; 60C0B68990B832A303E45B3CA15BAAFC /* Pods_EmojiSelectorView_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_EmojiSelectorView_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 67C39957D3F4186F0D3CC7D4CC2C3F7C /* Pods-EmojiSelectorView_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-EmojiSelectorView_Example-dummy.m"; sourceTree = ""; }; - 7753404EA4BD91EFACA1BF43FBA28BC9 /* ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist"; sourceTree = ""; }; - 7A1045F63BE318F1AD990F6C6BF1856B /* InformationView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InformationView.swift; path = Pod/Classes/InformationView.swift; sourceTree = ""; }; - 7AE3E89F254B5BF60085E93A /* CGSize+init.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CGSize+init.swift"; sourceTree = ""; }; - 7AE3E8A0254B5BF60085E93A /* CGRect+init.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CGRect+init.swift"; sourceTree = ""; }; + 6A1C7320D8A0390C039C8291962C9A13 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + 79D52CE154951E5AB2EAC7E613500282 /* EmojiSelectorView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "EmojiSelectorView-dummy.m"; sourceTree = ""; }; + 8107FB9C18556C3BEDB6C18FA985F8DE /* EmojiSelectorViewDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorViewDelegate.swift; path = Pod/Classes/EmojiSelectorViewDelegate.swift; sourceTree = ""; }; + 814C5846B5A784B1E2D7898C3F07F8D4 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 86DB893EE585CCE838C5BEAD0F5E5769 /* Pods-EmojiSelectorView_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-EmojiSelectorView_Example-Info.plist"; sourceTree = ""; }; + 8DF2911012A9A236C5F2B6D4EB1D4094 /* CGRect+init.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CGRect+init.swift"; sourceTree = ""; }; + 8ECF3E37912BA7D17A22BC37D6307C67 /* EmojiSelectorView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EmojiSelectorView-prefix.pch"; sourceTree = ""; }; + 99E97F92E2DC86664BCB23B0AAF2E1F8 /* EmojiSelectorView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = EmojiSelectorView.xcconfig; sourceTree = ""; }; + 9BBF320B181C62265BE07F7F3F937F98 /* CGSize+init.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CGSize+init.swift"; sourceTree = ""; }; 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 9FDA233E6B0FD7074B933CACA89B6CDB /* EmojiSelectorView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = EmojiSelectorView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A77ABFACBA800F1C03986B5486627153 /* Pods-EmojiSelectorView_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-EmojiSelectorView_Tests.release.xcconfig"; sourceTree = ""; }; - B20DC0C9FE0EF6CF43BAFB1BC037C476 /* EmojiSelectorViewDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorViewDelegate.swift; path = Pod/Classes/EmojiSelectorViewDelegate.swift; sourceTree = ""; }; + B0BFC4C63056431C327840C9A2F5D946 /* EmojiSelectorViewConfig.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorViewConfig.swift; path = Pod/Classes/EmojiSelectorViewConfig.swift; sourceTree = ""; }; B7A4B27CBCB48B1DB9BB6003B172F94E /* Pods-EmojiSelectorView_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-EmojiSelectorView_Example.debug.xcconfig"; sourceTree = ""; }; B82AD4B0313FB795114174A120851C84 /* Pods-EmojiSelectorView_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-EmojiSelectorView_Example-acknowledgements.plist"; sourceTree = ""; }; B9F963A73C8AEEBF4C4FCDCAA70B5609 /* Pods-EmojiSelectorView_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-EmojiSelectorView_Tests-dummy.m"; sourceTree = ""; }; BE3F9920AB73920FC16557EC8A0BAC4C /* Pods-EmojiSelectorView_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-EmojiSelectorView_Tests.debug.xcconfig"; sourceTree = ""; }; BF32EF9B2E401A1B8685090B9D3C6506 /* Pods-EmojiSelectorView_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-EmojiSelectorView_Tests-frameworks.sh"; sourceTree = ""; }; - C5F0E6BA64A4AEBF8651667B0448F658 /* EmojiSelectorViewConfig.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorViewConfig.swift; path = Pod/Classes/EmojiSelectorViewConfig.swift; sourceTree = ""; }; - CF2DD32312A48242C15FF0795A97029E /* EmojiSelectorView-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "EmojiSelectorView-Info.plist"; sourceTree = ""; }; + C13FA60CE88593E696D660CA9F728DA1 /* EmojiSelectorView.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = EmojiSelectorView.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + CA4FDA624318CBDB154216BF9409A1DE /* EmojiSelectorView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorView.swift; path = Pod/Classes/EmojiSelectorView.swift; sourceTree = ""; }; + D6370B9F98F542CAF50F51E753CB0076 /* EmojiSelectorView-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "EmojiSelectorView-Info.plist"; sourceTree = ""; }; E11623859D4956E382B841D7924BC804 /* Pods_EmojiSelectorView_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_EmojiSelectorView_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E4C58EE4C927F8C52D3416B1FF5DD7E7 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - EB02653572D7646F6C135F53FCD5FE41 /* EmojiSelectorView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = EmojiSelectorView.xcconfig; sourceTree = ""; }; - EF59F852EAD32E7649BBC38097FAB39A /* EmojiSelectorView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EmojiSelectorView-prefix.pch"; sourceTree = ""; }; - F0366EC7F79AD504966113DC02149E22 /* EmojiSelectorView.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = EmojiSelectorView.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + E3BB0F35D9AE2C9D389E266D80E6B9F1 /* EmojiSelectorView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = EmojiSelectorView.modulemap; sourceTree = ""; }; + E9334105D5825404F166C525766B41F7 /* ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist"; sourceTree = ""; }; F25F78A6CC16DDCADDDBE6D074FB2CE7 /* Pods-EmojiSelectorView_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-EmojiSelectorView_Example-frameworks.sh"; sourceTree = ""; }; + FCFC282D68E8FA73FC68C363149CF175 /* EmojiSelectorViewOption.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorViewOption.swift; path = Pod/Classes/EmojiSelectorViewOption.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 7C98C410EA86A4E4C7417AE46299258B /* Frameworks */ = { + 3910323FCB106E417D39B3EDCD0ED86A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 343CA84DB0B3A656BA7B3EA3174D50E0 /* Foundation.framework in Frameworks */, + 47B7850C21378E9E227222744DCFFFA7 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 9C56396991C94798000A8F02226E31CD /* Frameworks */ = { + C202BB2377A27408ED9B0223D5F5CA2B /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 54ADEDD2BD9240FFD32A4E9352B0F1FF /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - C202BB2377A27408ED9B0223D5F5CA2B /* Frameworks */ = { + D5A4FBF1ECB6A7CF3157BA5EBCCAFCE0 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 54ADEDD2BD9240FFD32A4E9352B0F1FF /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -157,47 +155,63 @@ path = "Target Support Files/Pods-EmojiSelectorView_Tests"; sourceTree = ""; }; - 2C070F42C60A602DB17DA6F9AE8E0AE2 /* EmojiSelectorView */ = { + 453D180F3B03E75A0E5F67F909889BB9 /* Extensions */ = { isa = PBXGroup; children = ( - 7AE3E89F254B5BF60085E93A /* CGSize+init.swift */, - 7AE3E8A0254B5BF60085E93A /* CGRect+init.swift */, - 7A1045F63BE318F1AD990F6C6BF1856B /* InformationView.swift */, - 4BD0C437C4A9FA0ADD24D831E694C466 /* EmojiSelectorView.swift */, - C5F0E6BA64A4AEBF8651667B0448F658 /* EmojiSelectorViewConfig.swift */, - B20DC0C9FE0EF6CF43BAFB1BC037C476 /* EmojiSelectorViewDelegate.swift */, - 3B2C84775FE2F64D4289F7F0707608B9 /* EmojiSelectorViewOption.swift */, - 3B23F19D1CEA722C42F09DE015411086 /* SelectorView.swift */, - 39AA766375C653AAD9F219EE049BD084 /* Pod */, - B4E52EB5ED9A8CDF2414453A5F9267C0 /* Support Files */, + 8DF2911012A9A236C5F2B6D4EB1D4094 /* CGRect+init.swift */, + 9BBF320B181C62265BE07F7F3F937F98 /* CGSize+init.swift */, ); - name = EmojiSelectorView; - path = ../..; + name = Extensions; + path = Pod/Classes/Extensions; sourceTree = ""; }; - 39AA766375C653AAD9F219EE049BD084 /* Pod */ = { + 51A48CF9A39605D233BC3FC9BD729F44 /* Support Files */ = { isa = PBXGroup; children = ( - F0366EC7F79AD504966113DC02149E22 /* EmojiSelectorView.podspec */, - E4C58EE4C927F8C52D3416B1FF5DD7E7 /* LICENSE */, - 454EA33B503A1FDD93DA3CAFC5853772 /* README.md */, + E3BB0F35D9AE2C9D389E266D80E6B9F1 /* EmojiSelectorView.modulemap */, + 99E97F92E2DC86664BCB23B0AAF2E1F8 /* EmojiSelectorView.xcconfig */, + 79D52CE154951E5AB2EAC7E613500282 /* EmojiSelectorView-dummy.m */, + D6370B9F98F542CAF50F51E753CB0076 /* EmojiSelectorView-Info.plist */, + 8ECF3E37912BA7D17A22BC37D6307C67 /* EmojiSelectorView-prefix.pch */, + 0D1295DBEA16561C7799C7FCEEC17973 /* EmojiSelectorView-umbrella.h */, + E9334105D5825404F166C525766B41F7 /* ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist */, ); - name = Pod; + name = "Support Files"; + path = "Example/Pods/Target Support Files/EmojiSelectorView"; sourceTree = ""; }; - B4E52EB5ED9A8CDF2414453A5F9267C0 /* Support Files */ = { + 7BED6EB02697BE894A24D9BB13AC32A2 /* Development Pods */ = { isa = PBXGroup; children = ( - 2B1F1433B6A00C2D034BBC47557CA752 /* EmojiSelectorView.modulemap */, - EB02653572D7646F6C135F53FCD5FE41 /* EmojiSelectorView.xcconfig */, - 347DBD2F40DC5379696EA770D0948F02 /* EmojiSelectorView-dummy.m */, - CF2DD32312A48242C15FF0795A97029E /* EmojiSelectorView-Info.plist */, - EF59F852EAD32E7649BBC38097FAB39A /* EmojiSelectorView-prefix.pch */, - 3E9F115B1F90788E8791C797D6FD5DE3 /* EmojiSelectorView-umbrella.h */, - 7753404EA4BD91EFACA1BF43FBA28BC9 /* ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist */, + 96B4955CB4870AB14C2B45C68227C542 /* EmojiSelectorView */, ); - name = "Support Files"; - path = "Example/Pods/Target Support Files/EmojiSelectorView"; + name = "Development Pods"; + sourceTree = ""; + }; + 96B4955CB4870AB14C2B45C68227C542 /* EmojiSelectorView */ = { + isa = PBXGroup; + children = ( + CA4FDA624318CBDB154216BF9409A1DE /* EmojiSelectorView.swift */, + B0BFC4C63056431C327840C9A2F5D946 /* EmojiSelectorViewConfig.swift */, + 8107FB9C18556C3BEDB6C18FA985F8DE /* EmojiSelectorViewDelegate.swift */, + FCFC282D68E8FA73FC68C363149CF175 /* EmojiSelectorViewOption.swift */, + 44438EA33E0CD35B81EFB7DDDF9F9105 /* SelectorView.swift */, + 453D180F3B03E75A0E5F67F909889BB9 /* Extensions */, + AC322BA465FF8C3E8FC283D8F8C954F7 /* Pod */, + 51A48CF9A39605D233BC3FC9BD729F44 /* Support Files */, + ); + name = EmojiSelectorView; + path = ../..; + sourceTree = ""; + }; + AC322BA465FF8C3E8FC283D8F8C954F7 /* Pod */ = { + isa = PBXGroup; + children = ( + C13FA60CE88593E696D660CA9F728DA1 /* EmojiSelectorView.podspec */, + 6A1C7320D8A0390C039C8291962C9A13 /* LICENSE */, + 814C5846B5A784B1E2D7898C3F07F8D4 /* README.md */, + ); + name = Pod; sourceTree = ""; }; C0834CEBB1379A84116EF29F93051C60 /* iOS */ = { @@ -212,7 +226,7 @@ isa = PBXGroup; children = ( 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, - E0D1BFF79CE23EDC427A9A813BED5476 /* Development Pods */, + 7BED6EB02697BE894A24D9BB13AC32A2 /* Development Pods */, D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */, E688808E4450D6EB82B93BA82636058B /* Products */, 1BBC52D84BB93B87CBBAB8914569B363 /* Targets Support Files */, @@ -227,14 +241,6 @@ name = Frameworks; sourceTree = ""; }; - E0D1BFF79CE23EDC427A9A813BED5476 /* Development Pods */ = { - isa = PBXGroup; - children = ( - 2C070F42C60A602DB17DA6F9AE8E0AE2 /* EmojiSelectorView */, - ); - name = "Development Pods"; - sourceTree = ""; - }; E688808E4450D6EB82B93BA82636058B /* Products */ = { isa = PBXGroup; children = ( @@ -282,11 +288,11 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - C7119A306835229B918CE62E348D32C8 /* Headers */ = { + 926B9D3D353F39D56C4AF4A6C2D09F64 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - B1B6B383E0C8C5B340C80E10FC5BBC45 /* EmojiSelectorView-umbrella.h in Headers */, + 0E5A924C8B75FDA2292DACC4C7884481 /* EmojiSelectorView-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -295,17 +301,17 @@ /* Begin PBXNativeTarget section */ 1D332AEEDB5E74D9CD9FDDAE4A776D4A /* EmojiSelectorView */ = { isa = PBXNativeTarget; - buildConfigurationList = DA633DCD64F642519628C99590123F27 /* Build configuration list for PBXNativeTarget "EmojiSelectorView" */; + buildConfigurationList = 8C6A3E7611A580EF635EA78488C40C1B /* Build configuration list for PBXNativeTarget "EmojiSelectorView" */; buildPhases = ( - C7119A306835229B918CE62E348D32C8 /* Headers */, - 06A214D362BBCDE9FB37D92F22D98AC7 /* Sources */, - 7C98C410EA86A4E4C7417AE46299258B /* Frameworks */, - 31E0D182711FEBED20C29A88AB8AF808 /* Resources */, + 926B9D3D353F39D56C4AF4A6C2D09F64 /* Headers */, + 61018FCF4631287DFC7EF43220E84F8B /* Sources */, + 3910323FCB106E417D39B3EDCD0ED86A /* Frameworks */, + 1131CE4ADF8A7C4BFC2A78447C4AEEE9 /* Resources */, ); buildRules = ( ); dependencies = ( - 240D93A0D641F9AF43B7256CFD172CBF /* PBXTargetDependency */, + 0FE3CE70019E9C9378081887AAF18E7B /* PBXTargetDependency */, ); name = EmojiSelectorView; productName = EmojiSelectorView; @@ -333,11 +339,11 @@ }; D2C77D1FA998B98D6A884971D75417C3 /* EmojiSelectorView-EmojiSelectorView */ = { isa = PBXNativeTarget; - buildConfigurationList = E6266FABF61A5D1750728039426CE5F1 /* Build configuration list for PBXNativeTarget "EmojiSelectorView-EmojiSelectorView" */; + buildConfigurationList = 67F65540C82ADA31348CD42DF5658FC5 /* Build configuration list for PBXNativeTarget "EmojiSelectorView-EmojiSelectorView" */; buildPhases = ( - 941DBC42EB13A763C5141C8A0BDFB272 /* Sources */, - 9C56396991C94798000A8F02226E31CD /* Frameworks */, - 8C57F6592A383961751C0CF3E8E30B4C /* Resources */, + 4A44A9EF9865B4C72F482C1BE6EDB5DA /* Sources */, + D5A4FBF1ECB6A7CF3157BA5EBCCAFCE0 /* Frameworks */, + 8AC8585A8E5BE1FD13E36A27285D1A33 /* Resources */, ); buildRules = ( ); @@ -398,11 +404,11 @@ /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 31E0D182711FEBED20C29A88AB8AF808 /* Resources */ = { + 1131CE4ADF8A7C4BFC2A78447C4AEEE9 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - CF7B1C2AD4E00AB49E4CA722CDC35E52 /* EmojiSelectorView.bundle in Resources */, + 10CC54B464850065E6DE1E53A7B87D46 /* EmojiSelectorView.bundle in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -413,7 +419,7 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 8C57F6592A383961751C0CF3E8E30B4C /* Resources */ = { + 8AC8585A8E5BE1FD13E36A27285D1A33 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -430,53 +436,52 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 06A214D362BBCDE9FB37D92F22D98AC7 /* Sources */ = { + 0C4A4072DCB1EE545E3630ECDE743DDD /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 7AE3E8A2254B5BF70085E93A /* CGRect+init.swift in Sources */, - 7AE3E8A1254B5BF70085E93A /* CGSize+init.swift in Sources */, - 3ADBE3166B8A8E0F89B0D70C0683359C /* EmojiSelectorView-dummy.m in Sources */, - BE35B699FA3D0B1A21220201262E8D33 /* InformationView.swift in Sources */, - 39F090407C0F3C55980904F7D0BCE329 /* EmojiSelectorView.swift in Sources */, - 89B53FA2B8E23D6B27DADAC6CBAC0EC7 /* EmojiSelectorViewConfig.swift in Sources */, - 646FB28A3569D0DF75043D8F4BA2FA60 /* EmojiSelectorViewDelegate.swift in Sources */, - 4D6B25C87EA7717A585A56D3453A2452 /* EmojiSelectorViewOption.swift in Sources */, - 6D18FC5763E456280CBE7AD9897AF27F /* SelectorView.swift in Sources */, + 934EB4B96C029D7A175A99E83A86A4B0 /* Pods-EmojiSelectorView_Example-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 0C4A4072DCB1EE545E3630ECDE743DDD /* Sources */ = { + 2A6066A849F153410AF90111B7D50831 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 934EB4B96C029D7A175A99E83A86A4B0 /* Pods-EmojiSelectorView_Example-dummy.m in Sources */, + F8B9F90FC1C5B94FECCB2A6D663BB68D /* Pods-EmojiSelectorView_Tests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 2A6066A849F153410AF90111B7D50831 /* Sources */ = { + 4A44A9EF9865B4C72F482C1BE6EDB5DA /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - F8B9F90FC1C5B94FECCB2A6D663BB68D /* Pods-EmojiSelectorView_Tests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 941DBC42EB13A763C5141C8A0BDFB272 /* Sources */ = { + 61018FCF4631287DFC7EF43220E84F8B /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 85CB39A5AABE21C73030DB5FE1024250 /* CGRect+init.swift in Sources */, + 2678F31335E857CBB94C3AEBED19F653 /* CGSize+init.swift in Sources */, + 848B385E9305205A802100B71061D9FD /* EmojiSelectorView-dummy.m in Sources */, + E786A40A908BDED9AF542CE49A7E1930 /* EmojiSelectorView.swift in Sources */, + ED1F943FC0C71899F1DAF2C2C5FC0915 /* EmojiSelectorViewConfig.swift in Sources */, + BF6E731C71D2F6963367EBB90628C488 /* EmojiSelectorViewDelegate.swift in Sources */, + 31270D34A4FC472F2D1DA5B7F2BE332A /* EmojiSelectorViewOption.swift in Sources */, + DE59754D4F08534EE5D7515ADB91241C /* SelectorView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 240D93A0D641F9AF43B7256CFD172CBF /* PBXTargetDependency */ = { + 0FE3CE70019E9C9378081887AAF18E7B /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "EmojiSelectorView-EmojiSelectorView"; target = D2C77D1FA998B98D6A884971D75417C3 /* EmojiSelectorView-EmojiSelectorView */; - targetProxy = C7E9EBAE147273FFA7CF5E70DA520AB3 /* PBXContainerItemProxy */; + targetProxy = 8E5DB072889219987478C77219370A2C /* PBXContainerItemProxy */; }; 822A05A60AFDDCBD301B637FD6679928 /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -528,6 +533,39 @@ }; name = Debug; }; + 0AE9FA245B0CE64BE03A054B23DD50D6 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 99E97F92E2DC86664BCB23B0AAF2E1F8 /* EmojiSelectorView.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/EmojiSelectorView/EmojiSelectorView-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView.modulemap"; + PRODUCT_MODULE_NAME = EmojiSelectorView; + PRODUCT_NAME = EmojiSelectorView; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; 131356BE54884448CA49C07BEDF4BB2A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -628,9 +666,9 @@ }; name = Release; }; - 18E82F24822469E449B2EB169CA63843 /* Release */ = { + 208B02A12B537D3A484E1B9F5E2575DD /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EB02653572D7646F6C135F53FCD5FE41 /* EmojiSelectorView.xcconfig */; + baseConfigurationReference = 99E97F92E2DC86664BCB23B0AAF2E1F8 /* EmojiSelectorView.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/EmojiSelectorView"; @@ -645,42 +683,9 @@ }; name = Release; }; - 4E5282E5A47BC100AA552D7490626D04 /* Release */ = { + 2C52647EC5050D0F139927E60E7AA6B4 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EB02653572D7646F6C135F53FCD5FE41 /* EmojiSelectorView.xcconfig */; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/EmojiSelectorView/EmojiSelectorView-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView.modulemap"; - PRODUCT_MODULE_NAME = EmojiSelectorView; - PRODUCT_NAME = EmojiSelectorView; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 4E5EC5625E42B64C4783FA0593255140 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = EB02653572D7646F6C135F53FCD5FE41 /* EmojiSelectorView.xcconfig */; + baseConfigurationReference = 99E97F92E2DC86664BCB23B0AAF2E1F8 /* EmojiSelectorView.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/EmojiSelectorView"; @@ -730,11 +735,10 @@ }; name = Debug; }; - CE55BBAAE3880954565C4DA957BA8905 /* Release */ = { + 67F90FEA77FA1B005B8EB2178B5BED51 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A77ABFACBA800F1C03986B5486627153 /* Pods-EmojiSelectorView_Tests.release.xcconfig */; + baseConfigurationReference = 99E97F92E2DC86664BCB23B0AAF2E1F8 /* EmojiSelectorView.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; @@ -746,30 +750,28 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-EmojiSelectorView_Tests/Pods-EmojiSelectorView_Tests-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/EmojiSelectorView/EmojiSelectorView-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-EmojiSelectorView_Tests/Pods-EmojiSelectorView_Tests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + MODULEMAP_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView.modulemap"; + PRODUCT_MODULE_NAME = EmojiSelectorView; + PRODUCT_NAME = EmojiSelectorView; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - DC2CC37508B8FA1CBEF8B1EEF536D66C /* Debug */ = { + CE55BBAAE3880954565C4DA957BA8905 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EB02653572D7646F6C135F53FCD5FE41 /* EmojiSelectorView.xcconfig */; + baseConfigurationReference = A77ABFACBA800F1C03986B5486627153 /* Pods-EmojiSelectorView_Tests.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; @@ -781,22 +783,25 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/EmojiSelectorView/EmojiSelectorView-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView-Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-EmojiSelectorView_Tests/Pods-EmojiSelectorView_Tests-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView.modulemap"; - PRODUCT_MODULE_NAME = EmojiSelectorView; - PRODUCT_NAME = EmojiSelectorView; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-EmojiSelectorView_Tests/Pods-EmojiSelectorView_Tests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; F090CD07A80273D5A73C8EA19224ADDB /* Release */ = { isa = XCBuildConfiguration; @@ -878,29 +883,29 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A2927E4F43907AB7B95B1E8719811A3F /* Build configuration list for PBXNativeTarget "Pods-EmojiSelectorView_Tests" */ = { + 67F65540C82ADA31348CD42DF5658FC5 /* Build configuration list for PBXNativeTarget "EmojiSelectorView-EmojiSelectorView" */ = { isa = XCConfigurationList; buildConfigurations = ( - 05D95D44630624BE0F2985939EABD188 /* Debug */, - CE55BBAAE3880954565C4DA957BA8905 /* Release */, + 2C52647EC5050D0F139927E60E7AA6B4 /* Debug */, + 208B02A12B537D3A484E1B9F5E2575DD /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - DA633DCD64F642519628C99590123F27 /* Build configuration list for PBXNativeTarget "EmojiSelectorView" */ = { + 8C6A3E7611A580EF635EA78488C40C1B /* Build configuration list for PBXNativeTarget "EmojiSelectorView" */ = { isa = XCConfigurationList; buildConfigurations = ( - DC2CC37508B8FA1CBEF8B1EEF536D66C /* Debug */, - 4E5282E5A47BC100AA552D7490626D04 /* Release */, + 67F90FEA77FA1B005B8EB2178B5BED51 /* Debug */, + 0AE9FA245B0CE64BE03A054B23DD50D6 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - E6266FABF61A5D1750728039426CE5F1 /* Build configuration list for PBXNativeTarget "EmojiSelectorView-EmojiSelectorView" */ = { + A2927E4F43907AB7B95B1E8719811A3F /* Build configuration list for PBXNativeTarget "Pods-EmojiSelectorView_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 4E5EC5625E42B64C4783FA0593255140 /* Debug */, - 18E82F24822469E449B2EB169CA63843 /* Release */, + 05D95D44630624BE0F2985939EABD188 /* Debug */, + CE55BBAAE3880954565C4DA957BA8905 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Pod/Classes/EmojiSelectorView.swift b/Pod/Classes/EmojiSelectorView.swift index 7ad6a3e..fd69e5e 100644 --- a/Pod/Classes/EmojiSelectorView.swift +++ b/Pod/Classes/EmojiSelectorView.swift @@ -43,7 +43,6 @@ open class EmojiSelectorView: UIButton { return backgroundView }() - private var informationView: InformationView! private var optionsView: UIView! private let config: EmojiSelectorView.Config @@ -89,7 +88,6 @@ open class EmojiSelectorView: UIButton { resetUI() UIView.animate(withDuration: 0.2) { - self.optionsView.frame.origin.y = self.originPoint.y - (config.spaceBetweenComponents + sizeBtn.height) self.optionsView.alpha = 1 } @@ -119,22 +117,12 @@ open class EmojiSelectorView: UIButton { for (i, option) in optionsView.subviews.enumerated() { UIView.animate(withDuration: 0.2, delay: 0.05 * Double(i), options: .curveEaseInOut, animations: { - self.informationView.alpha = 0 option.alpha = 0.3 option.frame.size = CGSize(sideSize: DesignConstants.sizeBeforeOpen) - var yPosForOption: CGFloat = self.optionsView.frame.height + self.config.size / 2 - - if let selectedItem = self.selectedItem, selectedItem == i { - yPosForOption = -self.optionsView.frame.height - } - - option.center = CGPoint(x: self.xPosition(for: i) + self.config.size / 2, - y: yPosForOption) }, completion: { (finished) -> Void in if finished && i == (dataset.count / 2) { UIView.animate(withDuration: 0.1, animations: { self.optionsView.alpha = 0 - self.optionsView.frame.origin.y = self.originPoint.y - self.config.heightForSize }, completion: { (finished) -> Void in self.isActive = false self.backgroundView.removeFromSuperview() @@ -154,13 +142,10 @@ open class EmojiSelectorView: UIButton { private func loseFocusFromOptions() { guard let dataset = dataset else { fatalError("Dataset not initialized.") } selectedItem = nil - informationView.show() let config = self.config UIView.animate(withDuration: 0.3) { let sizeBtn = CGSize(width: self.xPosition(for: dataset.count), height: config.heightForSize) - let originOptionView = CGPoint(x: self.originPoint.x, y: self.originPoint.y - (config.spaceBetweenComponents + sizeBtn.height)) - self.optionsView.frame = CGRect(origin: originOptionView, size: sizeBtn) self.optionsView.layer.cornerRadius = sizeBtn.height / 2 for (idx, view) in self.optionsView.subviews.enumerated() { view.frame = CGRect(x: self.xPosition(for: idx), y: config.spacing, sideSize: config.size) @@ -176,13 +161,10 @@ open class EmojiSelectorView: UIButton { if index >= 0 && index < dataset.count { selectedItem = index - informationView.hide() let config = self.config UIView.animate(withDuration: 0.3) { let previousOption = CGFloat(dataset.count - 1) let sizeBtn = CGSize(width: previousOption * (config.spacing + config.minSize) + config.maxSize, height: config.heightForMinSize) - self.optionsView.frame = CGRect(origin: CGPoint(x: self.originPoint.x, y: self.originPoint.y - (config.spaceBetweenComponents + sizeBtn.height)), - size: sizeBtn) self.optionsView.layer.cornerRadius = sizeBtn.height / 2 var last: CGFloat = index != 0 ? config.spacing : 0 @@ -229,10 +211,6 @@ open class EmojiSelectorView: UIButton { superview?.addSubview(backgroundView) - informationView = InformationView(frame: CGRect(x: 0, y: originPoint.y, width: DesignConstants.screenRect.width, height: frame.height)) - informationView.backgroundColor = .white - backgroundView.addSubview(informationView) - let optionsViewSize = CGSize(width: xPosition(for: dataset.count), height: config.heightForSize) let optionsViewOrigin = CGPoint(x: originPoint.x, y: originPoint.y - optionsViewSize.height) optionsView = UIView(frame: CGRect(origin: optionsViewOrigin, size: optionsViewSize)) @@ -254,7 +232,7 @@ extension EmojiSelectorView: SelectorViewDelegate { let relativeSizePerOption = optionsView.frame.width / CGFloat(dataset.count) // Check if the point's position is inside the defined area. - if point.y < (optionsView.frame.minY - DesignConstants.bottomThresholdLoseFocus) || point.y > (informationView.frame.maxY + DesignConstants.topThresholdLoseFocus) { + if point.y < (optionsView.frame.minY - DesignConstants.bottomThresholdLoseFocus) || point.y > (optionsView.frame.maxY + DesignConstants.topThresholdLoseFocus) { loseFocusFromOptions() } else { if point.x - originPoint.x > 0 && point.x < optionsView.frame.maxX { diff --git a/CGRect+init.swift b/Pod/Classes/Extensions/CGRect+init.swift similarity index 100% rename from CGRect+init.swift rename to Pod/Classes/Extensions/CGRect+init.swift diff --git a/CGSize+init.swift b/Pod/Classes/Extensions/CGSize+init.swift similarity index 100% rename from CGSize+init.swift rename to Pod/Classes/Extensions/CGSize+init.swift diff --git a/Pod/Classes/InformationView.swift b/Pod/Classes/InformationView.swift deleted file mode 100644 index 035ff90..0000000 --- a/Pod/Classes/InformationView.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// InformationView.swift -// EmojiSelectorView -// -// Created by Jorge R Ovalle Z on 4/6/18. -// - -import UIKit - -/// A type that represents an `InformationView`. -class InformationView: UIView { - - /// Constants for UI purposes. - private enum DesignConstants { - - /// The width for the border lines. - static let borderLinesWidth: CGFloat = 1 - - /// The color for the top and button borders in the current `InformationView`. - static let lineColor = UIColor(red: 0.8, green: 0.81, blue: 0.82, alpha: 1) - - /// The color of the information we're displaying. - static let textColor = UIColor(red: 0.57, green: 0.59, blue: 0.64, alpha: 1) - - /// The width for the dotted line when when the user is selecting an option. - static let dotSize: CGFloat = 3 - - /// The spacing between dots. - static let dotSpacing: CGFloat = 37 - } - - /// The `UILabel` where information is displayed. - private lazy var textInformation: UILabel = { - let textInformation = UILabel(frame: .zero) - textInformation.backgroundColor = .white - textInformation.textColor = DesignConstants.textColor - textInformation.text = "Release to Cancel" - textInformation.textAlignment = .center - textInformation.font = UIFont.boldSystemFont(ofSize: 12) - textInformation.isHidden = true - return textInformation - }() - - open override func draw(_ rect: CGRect) { - - func createLine(from: CGPoint, to: CGPoint) { - let line = UIBezierPath() - line.move(to: from) - line.addLine(to: to) - DesignConstants.lineColor.setStroke() - line.lineWidth = DesignConstants.borderLinesWidth - line.stroke() - } - - let dots = UIBezierPath() - dots.move(to: CGPoint(x: DesignConstants.dotSpacing/2, y: (rect.height / 2))) - dots.addLine(to: CGPoint(x: rect.width, y: (rect.height/2))) - dots.lineCapStyle = .round - DesignConstants.lineColor.setStroke() - dots.lineWidth = DesignConstants.dotSize - let dashes: [CGFloat] = [0, DesignConstants.dotSpacing] - dots.setLineDash(dashes, count: dashes.count, phase: 0) - dots.stroke() - - textInformation.frame = CGRect(origin: CGPoint(x: 0, y: DesignConstants.borderLinesWidth), - size: CGSize(width: rect.width, height: rect.height - (DesignConstants.borderLinesWidth * 2))) - addSubview(textInformation) - - createLine(from: .zero, to: CGPoint(x: rect.width, y: 0)) - createLine(from: CGPoint(x: 0, y: rect.height), to: CGPoint(x: rect.width, y: rect.height)) - - } - - /// Show the current `InformationView`. - func show() { - textInformation.isHidden = false - alpha = 1 - } - - /// Hide the current `InformationView`. - func hide() { - textInformation.isHidden = true - } -} From e5a3e7b41570de18f88f020f0ebaf31eeaeb4169 Mon Sep 17 00:00:00 2001 From: Jorge Ovalle Date: Thu, 29 Oct 2020 15:57:18 -0600 Subject: [PATCH 02/15] Remove optionallity to dataset --- Pod/Classes/EmojiSelectorView.swift | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/Pod/Classes/EmojiSelectorView.swift b/Pod/Classes/EmojiSelectorView.swift index fd69e5e..7d2058a 100644 --- a/Pod/Classes/EmojiSelectorView.swift +++ b/Pod/Classes/EmojiSelectorView.swift @@ -30,7 +30,7 @@ open class EmojiSelectorView: UIButton { open weak var delegate: EmojiSelectorViewDelegate? - open var dataset: [EmojiSelectorViewOption]? + open var dataset: [EmojiSelectorViewOption] = [] private var isActive: Bool = false public private (set) var selectedItem: Int? @@ -51,7 +51,7 @@ open class EmojiSelectorView: UIButton { private lazy var longTap: UILongPressGestureRecognizer = { return UILongPressGestureRecognizer(target: self, - action: #selector(EmojiSelectorView.expandOptions)) + action: #selector(EmojiSelectorView.expand)) }() // MARK: - View lifecycle @@ -70,6 +70,7 @@ open class EmojiSelectorView: UIButton { layer.masksToBounds = false } + @available(*, unavailable) required public init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } @@ -77,9 +78,8 @@ open class EmojiSelectorView: UIButton { // MARK: - Visual component interaction / animation /// Function that open and expand the Options Selector. - @objc private func expandOptions() { + @objc private func expand() { if !isActive { - guard let dataset = dataset else { fatalError("Dataset not initialized.") } selectedItem = nil isActive = true @@ -112,15 +112,13 @@ open class EmojiSelectorView: UIButton { } /// Function that collapse and close the Options Selector. - private func collapseOptions() { - guard let dataset = dataset else { fatalError("Dataset not initialized.") } - + private func collapse() { for (i, option) in optionsView.subviews.enumerated() { UIView.animate(withDuration: 0.2, delay: 0.05 * Double(i), options: .curveEaseInOut, animations: { option.alpha = 0.3 option.frame.size = CGSize(sideSize: DesignConstants.sizeBeforeOpen) }, completion: { (finished) -> Void in - if finished && i == (dataset.count / 2) { + if finished && i == (self.dataset.count / 2) { UIView.animate(withDuration: 0.1, animations: { self.optionsView.alpha = 0 }, completion: { (finished) -> Void in @@ -140,11 +138,10 @@ open class EmojiSelectorView: UIButton { /// A function intended to animate the selector and the options, /// in case the user is not focusing a specific option. private func loseFocusFromOptions() { - guard let dataset = dataset else { fatalError("Dataset not initialized.") } selectedItem = nil let config = self.config UIView.animate(withDuration: 0.3) { - let sizeBtn = CGSize(width: self.xPosition(for: dataset.count), + let sizeBtn = CGSize(width: self.xPosition(for: self.dataset.count), height: config.heightForSize) self.optionsView.layer.cornerRadius = sizeBtn.height / 2 for (idx, view) in self.optionsView.subviews.enumerated() { @@ -157,13 +154,11 @@ open class EmojiSelectorView: UIButton { /// /// - Parameter index: The index of the option in the dataset. private func focusOption(withIndex index: Int) { - guard let dataset = dataset else { fatalError("Dataset not initialized.") } - if index >= 0 && index < dataset.count { selectedItem = index let config = self.config UIView.animate(withDuration: 0.3) { - let previousOption = CGFloat(dataset.count - 1) + let previousOption = CGFloat(self.dataset.count - 1) let sizeBtn = CGSize(width: previousOption * (config.spacing + config.minSize) + config.maxSize, height: config.heightForMinSize) self.optionsView.layer.cornerRadius = sizeBtn.height / 2 var last: CGFloat = index != 0 ? config.spacing : 0 @@ -200,8 +195,6 @@ open class EmojiSelectorView: UIButton { /// Reset the UI to the initial state. private func resetUI() { - guard let dataset = dataset else { fatalError("Dataset not initialized.") } - originPoint = superview?.convert(frame.origin, to: nil) ?? .zero if originPoint != frame.origin { @@ -228,7 +221,6 @@ open class EmojiSelectorView: UIButton { extension EmojiSelectorView: SelectorViewDelegate { public func movedTo(_ point: CGPoint) { - guard let dataset = dataset else { fatalError("Dataset not initialized.") } let relativeSizePerOption = optionsView.frame.width / CGFloat(dataset.count) // Check if the point's position is inside the defined area. @@ -244,6 +236,6 @@ extension EmojiSelectorView: SelectorViewDelegate { } public func endTouch(_ point: CGPoint) { - collapseOptions() + collapse() } } From e4b01ae43de76a08f3c321be4f63fd451fb67bb0 Mon Sep 17 00:00:00 2001 From: Jorge Ovalle Date: Thu, 29 Oct 2020 18:28:11 -0600 Subject: [PATCH 03/15] Add extension to reduce complexity on Selectorview --- Example/Pods/Pods.xcodeproj/project.pbxproj | 22 ++-- Pod/Classes/EmojiSelectorView.swift | 124 ++++++++----------- Pod/Classes/Extensions/UIView+contains.swift | 19 +++ 3 files changed, 84 insertions(+), 81 deletions(-) create mode 100644 Pod/Classes/Extensions/UIView+contains.swift diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 5be08e0..8866cd7 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -16,6 +16,7 @@ 47B7850C21378E9E227222744DCFFFA7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; 54ADEDD2BD9240FFD32A4E9352B0F1FF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; 6591071C43D9B87AFA228C85CDDEAD33 /* Pods-EmojiSelectorView_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A87C4E68A3D13428D55987315EB2A41 /* Pods-EmojiSelectorView_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7A34BDE5254B94C000067081 /* UIView+contains.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A34BDE4254B94C000067081 /* UIView+contains.swift */; }; 848B385E9305205A802100B71061D9FD /* EmojiSelectorView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 79D52CE154951E5AB2EAC7E613500282 /* EmojiSelectorView-dummy.m */; }; 85CB39A5AABE21C73030DB5FE1024250 /* CGRect+init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DF2911012A9A236C5F2B6D4EB1D4094 /* CGRect+init.swift */; }; 934EB4B96C029D7A175A99E83A86A4B0 /* Pods-EmojiSelectorView_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 67C39957D3F4186F0D3CC7D4CC2C3F7C /* Pods-EmojiSelectorView_Example-dummy.m */; }; @@ -68,6 +69,7 @@ 67C39957D3F4186F0D3CC7D4CC2C3F7C /* Pods-EmojiSelectorView_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-EmojiSelectorView_Example-dummy.m"; sourceTree = ""; }; 6A1C7320D8A0390C039C8291962C9A13 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 79D52CE154951E5AB2EAC7E613500282 /* EmojiSelectorView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "EmojiSelectorView-dummy.m"; sourceTree = ""; }; + 7A34BDE4254B94C000067081 /* UIView+contains.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+contains.swift"; sourceTree = ""; }; 8107FB9C18556C3BEDB6C18FA985F8DE /* EmojiSelectorViewDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorViewDelegate.swift; path = Pod/Classes/EmojiSelectorViewDelegate.swift; sourceTree = ""; }; 814C5846B5A784B1E2D7898C3F07F8D4 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 86DB893EE585CCE838C5BEAD0F5E5769 /* Pods-EmojiSelectorView_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-EmojiSelectorView_Example-Info.plist"; sourceTree = ""; }; @@ -160,6 +162,7 @@ children = ( 8DF2911012A9A236C5F2B6D4EB1D4094 /* CGRect+init.swift */, 9BBF320B181C62265BE07F7F3F937F98 /* CGSize+init.swift */, + 7A34BDE4254B94C000067081 /* UIView+contains.swift */, ); name = Extensions; path = Pod/Classes/Extensions; @@ -380,7 +383,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1100; - LastUpgradeCheck = 1100; + LastUpgradeCheck = 1210; }; buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -468,6 +471,7 @@ 848B385E9305205A802100B71061D9FD /* EmojiSelectorView-dummy.m in Sources */, E786A40A908BDED9AF542CE49A7E1930 /* EmojiSelectorView.swift in Sources */, ED1F943FC0C71899F1DAF2C2C5FC0915 /* EmojiSelectorViewConfig.swift in Sources */, + 7A34BDE5254B94C000067081 /* UIView+contains.swift in Sources */, BF6E731C71D2F6963367EBB90628C488 /* EmojiSelectorViewDelegate.swift in Sources */, 31270D34A4FC472F2D1DA5B7F2BE332A /* EmojiSelectorViewOption.swift in Sources */, DE59754D4F08534EE5D7515ADB91241C /* SelectorView.swift in Sources */, @@ -503,7 +507,6 @@ baseConfigurationReference = BE3F9920AB73920FC16557EC8A0BAC4C /* Pods-EmojiSelectorView_Tests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -537,7 +540,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 99E97F92E2DC86664BCB23B0AAF2E1F8 /* EmojiSelectorView.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -551,7 +553,7 @@ GCC_PREFIX_HEADER = "Target Support Files/EmojiSelectorView/EmojiSelectorView-prefix.pch"; INFOPLIST_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView.modulemap"; PRODUCT_MODULE_NAME = EmojiSelectorView; @@ -592,6 +594,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -635,7 +638,6 @@ baseConfigurationReference = 49FB8B84CD444A429A9FEE0311CC0B71 /* Pods-EmojiSelectorView_Example.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -674,7 +676,7 @@ CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/EmojiSelectorView"; IBSC_MODULE = EmojiSelectorView; INFOPLIST_FILE = "Target Support Files/EmojiSelectorView/ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; PRODUCT_NAME = EmojiSelectorView; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -691,7 +693,7 @@ CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/EmojiSelectorView"; IBSC_MODULE = EmojiSelectorView; INFOPLIST_FILE = "Target Support Files/EmojiSelectorView/ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; PRODUCT_NAME = EmojiSelectorView; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -705,7 +707,6 @@ baseConfigurationReference = B7A4B27CBCB48B1DB9BB6003B172F94E /* Pods-EmojiSelectorView_Example.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -739,7 +740,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 99E97F92E2DC86664BCB23B0AAF2E1F8 /* EmojiSelectorView.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -753,7 +753,7 @@ GCC_PREFIX_HEADER = "Target Support Files/EmojiSelectorView/EmojiSelectorView-prefix.pch"; INFOPLIST_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView.modulemap"; PRODUCT_MODULE_NAME = EmojiSelectorView; @@ -772,7 +772,6 @@ baseConfigurationReference = A77ABFACBA800F1C03986B5486627153 /* Pods-EmojiSelectorView_Tests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -829,6 +828,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; diff --git a/Pod/Classes/EmojiSelectorView.swift b/Pod/Classes/EmojiSelectorView.swift index 7d2058a..4efa8e7 100644 --- a/Pod/Classes/EmojiSelectorView.swift +++ b/Pod/Classes/EmojiSelectorView.swift @@ -79,45 +79,44 @@ open class EmojiSelectorView: UIButton { /// Function that open and expand the Options Selector. @objc private func expand() { - if !isActive { - selectedItem = nil - isActive = true + guard !isActive else { return } + selectedItem = nil + isActive = true - let config = self.config - let sizeBtn = CGSize(width: xPosition(for: dataset.count), height: config.heightForSize) - resetUI() + let config = self.config + let sizeBtn = CGSize(width: xPosition(for: dataset.count), height: config.heightForSize) + resetUI() - UIView.animate(withDuration: 0.2) { - self.optionsView.alpha = 1 - } + UIView.animate(withDuration: 0.2) { + self.optionsView.alpha = 1 + } - for i in 0.. Void in + } completion: { (finished) in if finished && i == (self.dataset.count / 2) { UIView.animate(withDuration: 0.1, animations: { self.optionsView.alpha = 0 @@ -131,7 +130,7 @@ open class EmojiSelectorView: UIButton { } }) } - }) + } } } @@ -139,13 +138,9 @@ open class EmojiSelectorView: UIButton { /// in case the user is not focusing a specific option. private func loseFocusFromOptions() { selectedItem = nil - let config = self.config UIView.animate(withDuration: 0.3) { - let sizeBtn = CGSize(width: self.xPosition(for: self.dataset.count), - height: config.heightForSize) - self.optionsView.layer.cornerRadius = sizeBtn.height / 2 for (idx, view) in self.optionsView.subviews.enumerated() { - view.frame = CGRect(x: self.xPosition(for: idx), y: config.spacing, sideSize: config.size) + view.frame = CGRect(x: self.xPosition(for: idx), y: self.config.spacing, sideSize: self.config.size) } } } @@ -154,31 +149,25 @@ open class EmojiSelectorView: UIButton { /// /// - Parameter index: The index of the option in the dataset. private func focusOption(withIndex index: Int) { - if index >= 0 && index < dataset.count { - selectedItem = index - let config = self.config - UIView.animate(withDuration: 0.3) { - let previousOption = CGFloat(self.dataset.count - 1) - let sizeBtn = CGSize(width: previousOption * (config.spacing + config.minSize) + config.maxSize, height: config.heightForMinSize) - self.optionsView.layer.cornerRadius = sizeBtn.height / 2 - var last: CGFloat = index != 0 ? config.spacing : 0 - - let minSizeCenter = config.minSize / 2 - let centerYForOption = minSizeCenter + config.spacing - - for (idx, view) in self.optionsView.subviews.enumerated() { - view.frame = CGRect(x: last, y: config.spacing, sideSize: config.minSize) - switch idx { - case (index-1): - view.center.y = minSizeCenter - last += config.minSize - case index: - view.frame = CGRect(x: last, y: -(config.maxSize/2), sideSize: config.maxSize) - last += config.maxSize - default: - view.center.y = centerYForOption - last += config.minSize + config.spacing - } + guard index >= 0 && index < dataset.count else { return } + selectedItem = index + let config = self.config + var last: CGFloat = index != 0 ? config.spacing : 0 + let centerYForOption = optionsView.bounds.height/2 + + UIView.animate(withDuration: 0.3) { + for (idx, view) in self.optionsView.subviews.enumerated() { + view.frame = CGRect(x: last, y: config.spacing, sideSize: config.minSize) + switch idx { + case (index-1): + view.center.y = centerYForOption + last += config.minSize + case index: + view.frame = CGRect(x: last, y: -(config.maxSize/2), sideSize: config.maxSize) + last += config.maxSize + default: + view.center.y = centerYForOption + last += config.minSize + config.spacing } } } @@ -201,8 +190,8 @@ open class EmojiSelectorView: UIButton { backgroundView.frame.origin.x -= originPoint.x backgroundView.frame.origin.y -= originPoint.y } - - superview?.addSubview(backgroundView) + + UIApplication.shared.keyWindow?.rootViewController?.view.addSubview(backgroundView) let optionsViewSize = CGSize(width: xPosition(for: dataset.count), height: config.heightForSize) let optionsViewOrigin = CGPoint(x: originPoint.x, y: originPoint.y - optionsViewSize.height) @@ -221,17 +210,12 @@ open class EmojiSelectorView: UIButton { extension EmojiSelectorView: SelectorViewDelegate { public func movedTo(_ point: CGPoint) { - let relativeSizePerOption = optionsView.frame.width / CGFloat(dataset.count) - // Check if the point's position is inside the defined area. - if point.y < (optionsView.frame.minY - DesignConstants.bottomThresholdLoseFocus) || point.y > (optionsView.frame.maxY + DesignConstants.topThresholdLoseFocus) { - loseFocusFromOptions() + if optionsView.contains(point) { + let relativeSizePerOption = optionsView.frame.width / CGFloat(dataset.count) + focusOption(withIndex: Int(round((point.x - originPoint.x) / relativeSizePerOption))) } else { - if point.x - originPoint.x > 0 && point.x < optionsView.frame.maxX { - focusOption(withIndex: Int(round((point.x - originPoint.x) / relativeSizePerOption))) - } else { - loseFocusFromOptions() - } + loseFocusFromOptions() } } diff --git a/Pod/Classes/Extensions/UIView+contains.swift b/Pod/Classes/Extensions/UIView+contains.swift new file mode 100644 index 0000000..6c12a81 --- /dev/null +++ b/Pod/Classes/Extensions/UIView+contains.swift @@ -0,0 +1,19 @@ +// +// UIView+contains.swift +// EmojiSelectorView +// +// Created by Jorge Ovalle on 29/10/20. +// + +import Foundation + +extension UIView { + + /// A function that checks if a given point is whether or not in the frame of the view. + /// - Parameter point: The point to look for. + /// - Returns: A boolean that represents if the point is inside the frame. + func contains(_ point: CGPoint) -> Bool { + point.x > frame.minX && point.x < frame.maxX && point.y > frame.minY && point.y < frame.maxY + } + +} From faee539a1b519506e39c548f1da22ae55b58a029 Mon Sep 17 00:00:00 2001 From: Jorge Ovalle Date: Thu, 29 Oct 2020 19:02:06 -0600 Subject: [PATCH 04/15] Remove extra delegate and simplify logic --- Example/Pods/Pods.xcodeproj/project.pbxproj | 4 -- Pod/Classes/EmojiSelectorView.swift | 44 +++++++++--------- Pod/Classes/SelectorView.swift | 51 --------------------- 3 files changed, 21 insertions(+), 78 deletions(-) delete mode 100644 Pod/Classes/SelectorView.swift diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 8866cd7..8e3be64 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -21,7 +21,6 @@ 85CB39A5AABE21C73030DB5FE1024250 /* CGRect+init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DF2911012A9A236C5F2B6D4EB1D4094 /* CGRect+init.swift */; }; 934EB4B96C029D7A175A99E83A86A4B0 /* Pods-EmojiSelectorView_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 67C39957D3F4186F0D3CC7D4CC2C3F7C /* Pods-EmojiSelectorView_Example-dummy.m */; }; BF6E731C71D2F6963367EBB90628C488 /* EmojiSelectorViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8107FB9C18556C3BEDB6C18FA985F8DE /* EmojiSelectorViewDelegate.swift */; }; - DE59754D4F08534EE5D7515ADB91241C /* SelectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44438EA33E0CD35B81EFB7DDDF9F9105 /* SelectorView.swift */; }; E786A40A908BDED9AF542CE49A7E1930 /* EmojiSelectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA4FDA624318CBDB154216BF9409A1DE /* EmojiSelectorView.swift */; }; ED1F943FC0C71899F1DAF2C2C5FC0915 /* EmojiSelectorViewConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0BFC4C63056431C327840C9A2F5D946 /* EmojiSelectorViewConfig.swift */; }; F8B9F90FC1C5B94FECCB2A6D663BB68D /* Pods-EmojiSelectorView_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B9F963A73C8AEEBF4C4FCDCAA70B5609 /* Pods-EmojiSelectorView_Tests-dummy.m */; }; @@ -60,7 +59,6 @@ 27A8597A8FD4EAE7F466E05F1E0756B5 /* Pods-EmojiSelectorView_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-EmojiSelectorView_Example-acknowledgements.markdown"; sourceTree = ""; }; 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 3C12C0786146C5DB619F1593ADAC8503 /* Pods-EmojiSelectorView_Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-EmojiSelectorView_Tests-Info.plist"; sourceTree = ""; }; - 44438EA33E0CD35B81EFB7DDDF9F9105 /* SelectorView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SelectorView.swift; path = Pod/Classes/SelectorView.swift; sourceTree = ""; }; 4705277B7290207BE08E25D46100C6B0 /* Pods-EmojiSelectorView_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-EmojiSelectorView_Tests.modulemap"; sourceTree = ""; }; 49FB8B84CD444A429A9FEE0311CC0B71 /* Pods-EmojiSelectorView_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-EmojiSelectorView_Example.release.xcconfig"; sourceTree = ""; }; 4A87C4E68A3D13428D55987315EB2A41 /* Pods-EmojiSelectorView_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-EmojiSelectorView_Example-umbrella.h"; sourceTree = ""; }; @@ -198,7 +196,6 @@ B0BFC4C63056431C327840C9A2F5D946 /* EmojiSelectorViewConfig.swift */, 8107FB9C18556C3BEDB6C18FA985F8DE /* EmojiSelectorViewDelegate.swift */, FCFC282D68E8FA73FC68C363149CF175 /* EmojiSelectorViewOption.swift */, - 44438EA33E0CD35B81EFB7DDDF9F9105 /* SelectorView.swift */, 453D180F3B03E75A0E5F67F909889BB9 /* Extensions */, AC322BA465FF8C3E8FC283D8F8C954F7 /* Pod */, 51A48CF9A39605D233BC3FC9BD729F44 /* Support Files */, @@ -474,7 +471,6 @@ 7A34BDE5254B94C000067081 /* UIView+contains.swift in Sources */, BF6E731C71D2F6963367EBB90628C488 /* EmojiSelectorViewDelegate.swift in Sources */, 31270D34A4FC472F2D1DA5B7F2BE332A /* EmojiSelectorViewOption.swift in Sources */, - DE59754D4F08534EE5D7515ADB91241C /* SelectorView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Pod/Classes/EmojiSelectorView.swift b/Pod/Classes/EmojiSelectorView.swift index 4efa8e7..0f2678c 100644 --- a/Pod/Classes/EmojiSelectorView.swift +++ b/Pod/Classes/EmojiSelectorView.swift @@ -36,9 +36,8 @@ open class EmojiSelectorView: UIButton { public private (set) var selectedItem: Int? private var originPoint: CGPoint = .zero - private lazy var backgroundView: SelectorView = { - let backgroundView = SelectorView(frame: DesignConstants.screenRect) - backgroundView.delegate = self + private lazy var backgroundView: UIView = { + let backgroundView = UIView(frame: DesignConstants.screenRect) backgroundView.backgroundColor = .clear return backgroundView }() @@ -78,8 +77,25 @@ open class EmojiSelectorView: UIButton { // MARK: - Visual component interaction / animation /// Function that open and expand the Options Selector. - @objc private func expand() { - guard !isActive else { return } + @objc private func expand(sender: UILongPressGestureRecognizer) { + if sender.state == .ended { + collapse() + return + } + + let point = sender.location(ofTouch: 0, in: UIApplication.shared.keyWindow?.rootViewController?.view) + + guard !isActive else { + // Check if the point's position is inside the defined area. + if optionsView.contains(point) { + let relativeSizePerOption = optionsView.frame.width / CGFloat(dataset.count) + focusOption(withIndex: Int(round((point.x - originPoint.x) / relativeSizePerOption))) + } else { + loseFocusFromOptions() + } + return + } + selectedItem = nil isActive = true @@ -205,21 +221,3 @@ open class EmojiSelectorView: UIButton { backgroundView.addSubview(optionsView) } } - -// MARK: - SelectorViewDelegate -extension EmojiSelectorView: SelectorViewDelegate { - - public func movedTo(_ point: CGPoint) { - // Check if the point's position is inside the defined area. - if optionsView.contains(point) { - let relativeSizePerOption = optionsView.frame.width / CGFloat(dataset.count) - focusOption(withIndex: Int(round((point.x - originPoint.x) / relativeSizePerOption))) - } else { - loseFocusFromOptions() - } - } - - public func endTouch(_ point: CGPoint) { - collapse() - } -} diff --git a/Pod/Classes/SelectorView.swift b/Pod/Classes/SelectorView.swift deleted file mode 100644 index d4464ca..0000000 --- a/Pod/Classes/SelectorView.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// SelectorView.swift -// EmojiSelectorView -// -// Created by Jorge Raul Ovalle Zuleta on 2/28/16. -// - -import UIKit - -/// Describes a type that is informed of events occurring within a `SelectorView`. -public protocol SelectorViewDelegate: AnyObject { - - /// This function is dispatched when `touchesMoved` is triggered in `SelectorView`. - /// - /// - Parameter point: CGPoint where the finger moved. - func movedTo(_ point: CGPoint) - - /// This function is dispatched when `touchesEnded` is triggered in `SelectorView`. - /// - /// - Parameter point: CGPoint where the finger move ended. - func endTouch(_ point: CGPoint) -} - -/// A type that represents the SelectorView where options are shown. -open class SelectorView: UIView { - - /// The object that acts as the delegate of the `SelectorView`. - weak var delegate: SelectorViewDelegate? - - /// Sent to the gesture recognizer when one or more fingers move in the associated view. - /// - /// - Parameters: - /// - touches: A set of UITouch instances in the event represented by - /// event that represent touches in the UITouchPhaseMoved phase. - /// - event: A UIEvent object representing the event to which the touches belong. - open override func touchesMoved(_ touches: Set, with event: UIEvent?) { - guard let location = (touches.first?.location(in: self)) else { return } - delegate?.movedTo(location) - } - - /// Sent to the gesture recognizer when one or more fingers lift from the associated view. - /// - /// - Parameters: - /// - touches: A set of UITouch instances in the event represented by event that represent - /// the touches in the UITouchPhaseEnded phase. - /// - event: A UIEvent object representing the event to which the touches belong. - open override func touchesEnded(_ touches: Set, with event: UIEvent?) { - guard let location = (touches.first?.location(in: self)) else { return } - delegate?.endTouch(location) - } -} From 174654e05a049bb54405917d6918ff9fefd0b4cf Mon Sep 17 00:00:00 2001 From: Jorge Ovalle Date: Thu, 29 Oct 2020 19:57:28 -0600 Subject: [PATCH 05/15] Change handlers for tap --- Pod/Classes/EmojiSelectorView.swift | 114 ++++++++++++++-------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/Pod/Classes/EmojiSelectorView.swift b/Pod/Classes/EmojiSelectorView.swift index 0f2678c..d2bc140 100644 --- a/Pod/Classes/EmojiSelectorView.swift +++ b/Pod/Classes/EmojiSelectorView.swift @@ -9,52 +9,45 @@ import UIKit /// A type that represents the selector with options froma dataset. open class EmojiSelectorView: UIButton { - + /// Constants used for UI component layout. private enum DesignConstants { - + /// The bottom threshold area to release / cancel the selection. static let bottomThresholdLoseFocus: CGFloat = 50 - + /// The top threshold area to release / cancel the selection. static let topThresholdLoseFocus: CGFloat = 30 - + /// A `CGRect` that match with the screen rect. static let screenRect = UIScreen.main.bounds - + /// The size of the option when the expande animation start. static let sizeBeforeOpen: CGFloat = 10 } - + // MARK: - Properties declaration - + open weak var delegate: EmojiSelectorViewDelegate? - + open var dataset: [EmojiSelectorViewOption] = [] - + private var isActive: Bool = false public private (set) var selectedItem: Int? private var originPoint: CGPoint = .zero - + private lazy var backgroundView: UIView = { let backgroundView = UIView(frame: DesignConstants.screenRect) backgroundView.backgroundColor = .clear return backgroundView }() - + private var optionsView: UIView! - + private let config: EmojiSelectorView.Config - - // MARK: - Events declaration - - private lazy var longTap: UILongPressGestureRecognizer = { - return UILongPressGestureRecognizer(target: self, - action: #selector(EmojiSelectorView.expand)) - }() - + // MARK: - View lifecycle - + /// Creates a new instace of `EmojiSelectorView`. /// /// - Parameters: @@ -64,49 +57,46 @@ open class EmojiSelectorView: UIButton { self.config = config self.dataset = [] super.init(frame: frame) - + + let longTap = UILongPressGestureRecognizer(target: self, + action: #selector(EmojiSelectorView.handlePress(sender:))) addGestureRecognizer(longTap) layer.masksToBounds = false } - + @available(*, unavailable) required public init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } - + // MARK: - Visual component interaction / animation - + /// Function that open and expand the Options Selector. - @objc private func expand(sender: UILongPressGestureRecognizer) { - if sender.state == .ended { + @objc private func handlePress(sender: UILongPressGestureRecognizer) { + switch sender.state { + case .began: + expand() + case .changed: + let point = sender.location(ofTouch: 0, in: UIApplication.shared.keyWindow?.rootViewController?.view) + move(point) + case .ended: collapse() - return - } - - let point = sender.location(ofTouch: 0, in: UIApplication.shared.keyWindow?.rootViewController?.view) - - guard !isActive else { - // Check if the point's position is inside the defined area. - if optionsView.contains(point) { - let relativeSizePerOption = optionsView.frame.width / CGFloat(dataset.count) - focusOption(withIndex: Int(round((point.x - originPoint.x) / relativeSizePerOption))) - } else { - loseFocusFromOptions() - } - return + default: break } - + } + + private func expand() { selectedItem = nil isActive = true - + let config = self.config let sizeBtn = CGSize(width: xPosition(for: dataset.count), height: config.heightForSize) - resetUI() - + reset() + UIView.animate(withDuration: 0.2) { self.optionsView.alpha = 1 } - + for i in 0.. Void in + } completion: { finished in self.isActive = false self.backgroundView.removeFromSuperview() if let selectedItem = self.selectedItem { @@ -144,12 +144,12 @@ open class EmojiSelectorView: UIButton { } else { self.delegate?.cancelledAction(self) } - }) + } } } } } - + /// A function intended to animate the selector and the options, /// in case the user is not focusing a specific option. private func loseFocusFromOptions() { @@ -160,7 +160,7 @@ open class EmojiSelectorView: UIButton { } } } - + /// When a user in focusing an option, that option should magnify. /// /// - Parameter index: The index of the option in the dataset. @@ -188,7 +188,7 @@ open class EmojiSelectorView: UIButton { } } } - + /// Calculate the `x` position for a given dataset option. /// /// - Parameter option: the position of the option in the dataset. <0... dataset.count>. @@ -197,18 +197,18 @@ open class EmojiSelectorView: UIButton { let option = CGFloat(option) return (option + 1) * config.spacing + config.size * option } - + /// Reset the UI to the initial state. - private func resetUI() { + private func reset() { originPoint = superview?.convert(frame.origin, to: nil) ?? .zero - + if originPoint != frame.origin { backgroundView.frame.origin.x -= originPoint.x backgroundView.frame.origin.y -= originPoint.y } UIApplication.shared.keyWindow?.rootViewController?.view.addSubview(backgroundView) - + let optionsViewSize = CGSize(width: xPosition(for: dataset.count), height: config.heightForSize) let optionsViewOrigin = CGPoint(x: originPoint.x, y: originPoint.y - optionsViewSize.height) optionsView = UIView(frame: CGRect(origin: optionsViewOrigin, size: optionsViewSize)) From d9a95e5bcc4c31f2eca7b3e4628b053ce3991d05 Mon Sep 17 00:00:00 2001 From: Jorge Ovalle Date: Thu, 29 Oct 2020 20:56:55 -0600 Subject: [PATCH 06/15] Organize Rootview interface --- Pod/Classes/EmojiSelectorView.swift | 93 +++++++++-------------- Pod/Classes/EmojiSelectorViewConfig.swift | 12 +-- 2 files changed, 41 insertions(+), 64 deletions(-) diff --git a/Pod/Classes/EmojiSelectorView.swift b/Pod/Classes/EmojiSelectorView.swift index d2bc140..9eef0c9 100644 --- a/Pod/Classes/EmojiSelectorView.swift +++ b/Pod/Classes/EmojiSelectorView.swift @@ -8,37 +8,23 @@ import UIKit /// A type that represents the selector with options froma dataset. -open class EmojiSelectorView: UIButton { +public final class EmojiSelectorView: UIButton { - /// Constants used for UI component layout. - private enum DesignConstants { - - /// The bottom threshold area to release / cancel the selection. - static let bottomThresholdLoseFocus: CGFloat = 50 - - /// The top threshold area to release / cancel the selection. - static let topThresholdLoseFocus: CGFloat = 30 - - /// A `CGRect` that match with the screen rect. - static let screenRect = UIScreen.main.bounds - - /// The size of the option when the expande animation start. - static let sizeBeforeOpen: CGFloat = 10 - } - - // MARK: - Properties declaration + private let sizeBeforeOpen: CGFloat = 10 - open weak var delegate: EmojiSelectorViewDelegate? + public weak var delegate: EmojiSelectorViewDelegate? - open var dataset: [EmojiSelectorViewOption] = [] + public var dataset: [EmojiSelectorViewOption] = [] private var isActive: Bool = false + public private (set) var selectedItem: Int? + private var originPoint: CGPoint = .zero private lazy var backgroundView: UIView = { - let backgroundView = UIView(frame: DesignConstants.screenRect) - backgroundView.backgroundColor = .clear + let backgroundView = UIView(frame: UIScreen.main.bounds) + backgroundView.backgroundColor = .orange return backgroundView }() @@ -46,6 +32,10 @@ open class EmojiSelectorView: UIButton { private let config: EmojiSelectorView.Config + private var rootView: UIView? { + return UIApplication.shared.keyWindow?.rootViewController?.view + } + // MARK: - View lifecycle /// Creates a new instace of `EmojiSelectorView`. @@ -77,7 +67,7 @@ open class EmojiSelectorView: UIButton { case .began: expand() case .changed: - let point = sender.location(ofTouch: 0, in: UIApplication.shared.keyWindow?.rootViewController?.view) + let point = sender.location(ofTouch: 0, in: rootView) move(point) case .ended: collapse() @@ -99,7 +89,7 @@ open class EmojiSelectorView: UIButton { for i in 0..= 0 && index < dataset.count else { return } + guard (0.. Date: Thu, 29 Oct 2020 21:58:47 -0600 Subject: [PATCH 07/15] Organize animation blocks and properties in general --- Pod/Classes/EmojiSelectorView.swift | 75 +++++++++++++---------------- 1 file changed, 34 insertions(+), 41 deletions(-) diff --git a/Pod/Classes/EmojiSelectorView.swift b/Pod/Classes/EmojiSelectorView.swift index 9eef0c9..f4878b0 100644 --- a/Pod/Classes/EmojiSelectorView.swift +++ b/Pod/Classes/EmojiSelectorView.swift @@ -20,15 +20,24 @@ public final class EmojiSelectorView: UIButton { public private (set) var selectedItem: Int? - private var originPoint: CGPoint = .zero - private lazy var backgroundView: UIView = { let backgroundView = UIView(frame: UIScreen.main.bounds) - backgroundView.backgroundColor = .orange + backgroundView.backgroundColor = .clear return backgroundView }() - private var optionsView: UIView! + private lazy var optionsView: UIView = { + let optionsViewSize = CGSize(width: xPosition(for: dataset.count), height: config.heightForSize) + let optionsView = UIView(frame: CGRect(origin: .zero, size: optionsViewSize)) + optionsView.layer.cornerRadius = optionsView.frame.height / 2 + optionsView.backgroundColor = .white + optionsView.layer.shadowColor = UIColor.lightGray.cgColor + optionsView.layer.shadowOffset = .zero + optionsView.layer.shadowOpacity = 0.5 + optionsView.alpha = 0.3 + backgroundView.addSubview(optionsView) + return optionsView + }() private let config: EmojiSelectorView.Config @@ -48,10 +57,8 @@ public final class EmojiSelectorView: UIButton { self.dataset = [] super.init(frame: frame) - let longTap = UILongPressGestureRecognizer(target: self, - action: #selector(EmojiSelectorView.handlePress(sender:))) - addGestureRecognizer(longTap) - layer.masksToBounds = false + addGestureRecognizer(UILongPressGestureRecognizer(target: self, + action: #selector(EmojiSelectorView.handlePress(sender:)))) } @available(*, unavailable) @@ -81,7 +88,13 @@ public final class EmojiSelectorView: UIButton { let config = self.config let sizeBtn = CGSize(width: xPosition(for: dataset.count), height: config.heightForSize) - reset() + + let originPoint = rootView?.convert(frame.origin, to: nil) ?? .zero + rootView?.addSubview(backgroundView) + + let originalSize = optionsView.frame.size + let optionsViewOrigin = CGPoint(x: originPoint.x, y: originPoint.y - originalSize.height - 10) + optionsView.frame = CGRect(origin: optionsViewOrigin, size: originalSize) UIView.animate(withDuration: 0.2) { self.optionsView.alpha = 1 @@ -110,10 +123,10 @@ public final class EmojiSelectorView: UIButton { // Check if the point's position is inside the defined area. if optionsView.contains(point) { let relativeSizePerOption = optionsView.frame.width / CGFloat(dataset.count) - focusOption(withIndex: Int(round((point.x - originPoint.x) / relativeSizePerOption))) + focusOption(withIndex: Int(round((point.x - optionsView.frame.minX) / relativeSizePerOption))) } else { selectedItem = nil - UIView.animate(withDuration: 0.3) { + UIView.animate(withDuration: 0.2) { for (idx, view) in self.optionsView.subviews.enumerated() { view.frame = CGRect(x: self.xPosition(for: idx), y: self.config.spacing, sideSize: self.config.size) } @@ -125,20 +138,17 @@ public final class EmojiSelectorView: UIButton { private func collapse() { for (i, option) in optionsView.subviews.enumerated() { UIView.animate(withDuration: 0.2, delay: 0.05 * Double(i), options: .curveEaseInOut) { - option.alpha = 0.3 + option.alpha = 0 option.frame.size = CGSize(sideSize: self.sizeBeforeOpen) } completion: { finished in - guard finished && i == (self.dataset.count / 2) else { return } - UIView.animate(withDuration: 0.1) { - self.optionsView.alpha = 0 - } completion: { finished in - self.isActive = false - self.backgroundView.removeFromSuperview() - if let selectedItem = self.selectedItem { - self.delegate?.selectedOption(self, index: selectedItem) - } else { - self.delegate?.cancelledAction(self) - } + guard finished && i == (self.dataset.count/2) else { return } + self.isActive = false + self.backgroundView.removeFromSuperview() + self.optionsView.subviews.forEach { $0.removeFromSuperview() } + if let selectedItem = self.selectedItem { + self.delegate?.selectedOption(self, index: selectedItem) + } else { + self.delegate?.cancelledAction(self) } } } @@ -154,7 +164,7 @@ public final class EmojiSelectorView: UIButton { var last: CGFloat = index != 0 ? config.spacing : 0 let centerYForOption = optionsView.bounds.height/2 - UIView.animate(withDuration: 0.3) { + UIView.animate(withDuration: 0.2) { for (idx, view) in self.optionsView.subviews.enumerated() { view.frame = CGRect(x: last, y: config.spacing, sideSize: config.minSize) switch idx { @@ -180,21 +190,4 @@ public final class EmojiSelectorView: UIButton { let option = CGFloat(option) return (option + 1) * config.spacing + config.size * option } - - /// Reset the UI to the initial state. - private func reset() { - originPoint = rootView?.convert(frame.origin, to: nil) ?? .zero - rootView?.addSubview(backgroundView) - - let optionsViewSize = CGSize(width: xPosition(for: dataset.count), height: config.heightForSize) - let optionsViewOrigin = CGPoint(x: originPoint.x, y: originPoint.y - optionsViewSize.height) - optionsView = UIView(frame: CGRect(origin: optionsViewOrigin, size: optionsViewSize)) - optionsView.layer.cornerRadius = optionsView.frame.height / 2 - optionsView.backgroundColor = .white - optionsView.layer.shadowColor = UIColor.lightGray.cgColor - optionsView.layer.shadowOffset = .zero - optionsView.layer.shadowOpacity = 0.5 - optionsView.alpha = 0.3 - backgroundView.addSubview(optionsView) - } } From 2df6d18e3c109d3d83eda02a8e08c2a4633c4805 Mon Sep 17 00:00:00 2001 From: Jorge Ovalle Date: Thu, 29 Oct 2020 22:13:50 -0600 Subject: [PATCH 08/15] Add custom extension for animation --- Example/Pods/Pods.xcodeproj/project.pbxproj | 4 ++++ Pod/Classes/EmojiSelectorView.swift | 22 +++++++++---------- Pod/Classes/Extensions/UIView+animation.swift | 18 +++++++++++++++ 3 files changed, 33 insertions(+), 11 deletions(-) create mode 100644 Pod/Classes/Extensions/UIView+animation.swift diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 8e3be64..7371c0a 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ 54ADEDD2BD9240FFD32A4E9352B0F1FF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; 6591071C43D9B87AFA228C85CDDEAD33 /* Pods-EmojiSelectorView_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A87C4E68A3D13428D55987315EB2A41 /* Pods-EmojiSelectorView_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7A34BDE5254B94C000067081 /* UIView+contains.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A34BDE4254B94C000067081 /* UIView+contains.swift */; }; + 7A34BDEF254BC9BA00067081 /* UIView+animation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A34BDEE254BC9BA00067081 /* UIView+animation.swift */; }; 848B385E9305205A802100B71061D9FD /* EmojiSelectorView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 79D52CE154951E5AB2EAC7E613500282 /* EmojiSelectorView-dummy.m */; }; 85CB39A5AABE21C73030DB5FE1024250 /* CGRect+init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DF2911012A9A236C5F2B6D4EB1D4094 /* CGRect+init.swift */; }; 934EB4B96C029D7A175A99E83A86A4B0 /* Pods-EmojiSelectorView_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 67C39957D3F4186F0D3CC7D4CC2C3F7C /* Pods-EmojiSelectorView_Example-dummy.m */; }; @@ -68,6 +69,7 @@ 6A1C7320D8A0390C039C8291962C9A13 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 79D52CE154951E5AB2EAC7E613500282 /* EmojiSelectorView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "EmojiSelectorView-dummy.m"; sourceTree = ""; }; 7A34BDE4254B94C000067081 /* UIView+contains.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+contains.swift"; sourceTree = ""; }; + 7A34BDEE254BC9BA00067081 /* UIView+animation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+animation.swift"; sourceTree = ""; }; 8107FB9C18556C3BEDB6C18FA985F8DE /* EmojiSelectorViewDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorViewDelegate.swift; path = Pod/Classes/EmojiSelectorViewDelegate.swift; sourceTree = ""; }; 814C5846B5A784B1E2D7898C3F07F8D4 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 86DB893EE585CCE838C5BEAD0F5E5769 /* Pods-EmojiSelectorView_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-EmojiSelectorView_Example-Info.plist"; sourceTree = ""; }; @@ -158,6 +160,7 @@ 453D180F3B03E75A0E5F67F909889BB9 /* Extensions */ = { isa = PBXGroup; children = ( + 7A34BDEE254BC9BA00067081 /* UIView+animation.swift */, 8DF2911012A9A236C5F2B6D4EB1D4094 /* CGRect+init.swift */, 9BBF320B181C62265BE07F7F3F937F98 /* CGSize+init.swift */, 7A34BDE4254B94C000067081 /* UIView+contains.swift */, @@ -465,6 +468,7 @@ files = ( 85CB39A5AABE21C73030DB5FE1024250 /* CGRect+init.swift in Sources */, 2678F31335E857CBB94C3AEBED19F653 /* CGSize+init.swift in Sources */, + 7A34BDEF254BC9BA00067081 /* UIView+animation.swift in Sources */, 848B385E9305205A802100B71061D9FD /* EmojiSelectorView-dummy.m in Sources */, E786A40A908BDED9AF542CE49A7E1930 /* EmojiSelectorView.swift in Sources */, ED1F943FC0C71899F1DAF2C2C5FC0915 /* EmojiSelectorViewConfig.swift in Sources */, diff --git a/Pod/Classes/EmojiSelectorView.swift b/Pod/Classes/EmojiSelectorView.swift index f4878b0..95448b1 100644 --- a/Pod/Classes/EmojiSelectorView.swift +++ b/Pod/Classes/EmojiSelectorView.swift @@ -74,7 +74,7 @@ public final class EmojiSelectorView: UIButton { case .began: expand() case .changed: - let point = sender.location(ofTouch: 0, in: rootView) + let point = sender.location(in: rootView) move(point) case .ended: collapse() @@ -100,22 +100,22 @@ public final class EmojiSelectorView: UIButton { self.optionsView.alpha = 1 } - for i in 0.. Void, completion: ((Bool) -> Void)? = nil) { + UIView.animate(withDuration: 0.2, delay: 0.05 * Double(index), options: .curveEaseInOut) { + animations() + } completion: { finished in + completion?(finished) + } + } +} From e2ea5806a4691265289f9c8c0d953cb8195afb84 Mon Sep 17 00:00:00 2001 From: Jorge Ovalle Date: Fri, 30 Oct 2020 17:31:03 -0600 Subject: [PATCH 09/15] Fix swiftlint issues --- Example/EmojiSelectorView/AppDelegate.swift | 3 ++- .../EmojiSelectorView/ViewController.swift | 9 +++----- Example/Tests/Tests.swift | 23 ------------------- Pod/Classes/EmojiSelectorView.swift | 10 ++++---- 4 files changed, 10 insertions(+), 35 deletions(-) diff --git a/Example/EmojiSelectorView/AppDelegate.swift b/Example/EmojiSelectorView/AppDelegate.swift index 993a448..4091e62 100644 --- a/Example/EmojiSelectorView/AppDelegate.swift +++ b/Example/EmojiSelectorView/AppDelegate.swift @@ -12,7 +12,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { return true } diff --git a/Example/EmojiSelectorView/ViewController.swift b/Example/EmojiSelectorView/ViewController.swift index 2581bb7..b719ca3 100644 --- a/Example/EmojiSelectorView/ViewController.swift +++ b/Example/EmojiSelectorView/ViewController.swift @@ -8,8 +8,8 @@ import UIKit import EmojiSelectorView -class ViewController: UIViewController, EmojiSelectorViewDelegate { - +final class ViewController: UIViewController, EmojiSelectorViewDelegate { + // MARK: DesignConstants enum DesignConstants { static var mainSampleColor = UIColor(red: 0.27, green: 0.69, blue: 0.67, alpha: 1) @@ -19,7 +19,6 @@ class ViewController: UIViewController, EmojiSelectorViewDelegate { } // MARK: Properties definition - let optionsDataset = [ EmojiSelectorViewOption(image: "img_1", name: "dislike"), EmojiSelectorViewOption(image: "img_2", name: "broken"), @@ -46,7 +45,6 @@ class ViewController: UIViewController, EmojiSelectorViewDelegate { }() // MARK: View lifecycle - override func viewDidLoad() { super.viewDidLoad() @@ -82,9 +80,8 @@ class ViewController: UIViewController, EmojiSelectorViewDelegate { buttonSample2.dataset = optionsDataset view.addSubview(buttonSample2) } - - // MARK: JOEmojiableDelegate + // MARK: JOEmojiableDelegate func selectedOption(_ sender: EmojiSelectorView, index: Int) { print("Option \(index) selected") labelInfo.text = "Option \(index) selected" diff --git a/Example/Tests/Tests.swift b/Example/Tests/Tests.swift index 8ceefc5..59ad649 100644 --- a/Example/Tests/Tests.swift +++ b/Example/Tests/Tests.swift @@ -3,27 +3,4 @@ import XCTest import EmojiSelectorView class Tests: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - XCTAssert(true, "Pass") - } - - func testPerformanceExample() { - // This is an example of a performance test case. - self.measure() { - // Put the code you want to measure the time of here. - } - } - } diff --git a/Pod/Classes/EmojiSelectorView.swift b/Pod/Classes/EmojiSelectorView.swift index 95448b1..20f4529 100644 --- a/Pod/Classes/EmojiSelectorView.swift +++ b/Pod/Classes/EmojiSelectorView.swift @@ -29,12 +29,12 @@ public final class EmojiSelectorView: UIButton { private lazy var optionsView: UIView = { let optionsViewSize = CGSize(width: xPosition(for: dataset.count), height: config.heightForSize) let optionsView = UIView(frame: CGRect(origin: .zero, size: optionsViewSize)) - optionsView.layer.cornerRadius = optionsView.frame.height / 2 - optionsView.backgroundColor = .white - optionsView.layer.shadowColor = UIColor.lightGray.cgColor - optionsView.layer.shadowOffset = .zero + optionsView.layer.cornerRadius = optionsView.frame.height / 2 + optionsView.backgroundColor = .white + optionsView.layer.shadowColor = UIColor.lightGray.cgColor + optionsView.layer.shadowOffset = .zero optionsView.layer.shadowOpacity = 0.5 - optionsView.alpha = 0.3 + optionsView.alpha = 0.3 backgroundView.addSubview(optionsView) return optionsView }() From 711da2834c742ec63901119de0d28f6fae85a875 Mon Sep 17 00:00:00 2001 From: Jorge Ovalle Date: Fri, 30 Oct 2020 19:45:52 -0600 Subject: [PATCH 10/15] Add layout including traits --- .../EmojiSelectorView/ViewController.swift | 24 +------- Pod/Classes/EmojiSelectorView.swift | 60 ++++++++++++------- 2 files changed, 43 insertions(+), 41 deletions(-) diff --git a/Example/EmojiSelectorView/ViewController.swift b/Example/EmojiSelectorView/ViewController.swift index b719ca3..ff27ede 100644 --- a/Example/EmojiSelectorView/ViewController.swift +++ b/Example/EmojiSelectorView/ViewController.swift @@ -51,34 +51,16 @@ final class ViewController: UIViewController, EmojiSelectorViewDelegate { view.addSubview(label) view.addSubview(labelInfo) - // Sample 1 using `default` configuration. + // Sample using `default` configuration. let buttonSample1 = EmojiSelectorView(frame: CGRect(origin: CGPoint(x: 40, y: 200), - size: DesignConstants.sampleButtonSize)) + size: DesignConstants.sampleButtonSize), + items: optionsDataset) buttonSample1.delegate = self buttonSample1.backgroundColor = DesignConstants.mainSampleColor buttonSample1.titleLabel?.font = DesignConstants.buttonFontLabel buttonSample1.layer.cornerRadius = DesignConstants.buttonCornerRadius buttonSample1.setTitle("Long-tap me!", for: [.normal]) - buttonSample1.dataset = optionsDataset view.addSubview(buttonSample1) - - // Sample 2 using custom configuration. - let config = EmojiSelectorView.Config(spacing: 2, - size: 30, - minSize: 34, - maxSize: 45, - spaceBetweenComponents: 30) - - let buttonSample2 = EmojiSelectorView(frame: CGRect(origin: CGPoint(x: 40, y: 300), - size: DesignConstants.sampleButtonSize), - config: config) - buttonSample2.delegate = self - buttonSample2.backgroundColor = DesignConstants.mainSampleColor - buttonSample2.titleLabel?.font = DesignConstants.buttonFontLabel - buttonSample2.layer.cornerRadius = DesignConstants.buttonCornerRadius - buttonSample2.setTitle("Long-tap me!", for: [.normal]) - buttonSample2.dataset = optionsDataset - view.addSubview(buttonSample2) } // MARK: JOEmojiableDelegate diff --git a/Pod/Classes/EmojiSelectorView.swift b/Pod/Classes/EmojiSelectorView.swift index 20f4529..b0bb31a 100644 --- a/Pod/Classes/EmojiSelectorView.swift +++ b/Pod/Classes/EmojiSelectorView.swift @@ -7,14 +7,14 @@ import UIKit -/// A type that represents the selector with options froma dataset. +/// A type that represents the selector with options froma items. public final class EmojiSelectorView: UIButton { private let sizeBeforeOpen: CGFloat = 10 public weak var delegate: EmojiSelectorViewDelegate? - public var dataset: [EmojiSelectorViewOption] = [] + public let items: [EmojiSelectorViewOption] private var isActive: Bool = false @@ -27,7 +27,7 @@ public final class EmojiSelectorView: UIButton { }() private lazy var optionsView: UIView = { - let optionsViewSize = CGSize(width: xPosition(for: dataset.count), height: config.heightForSize) + let optionsViewSize = CGSize(width: xPosition(for: items.count), height: config.heightForSize) let optionsView = UIView(frame: CGRect(origin: .zero, size: optionsViewSize)) optionsView.layer.cornerRadius = optionsView.frame.height / 2 optionsView.backgroundColor = .white @@ -45,6 +45,8 @@ public final class EmojiSelectorView: UIButton { return UIApplication.shared.keyWindow?.rootViewController?.view } + private var frrame: CGRect = .zero + // MARK: - View lifecycle /// Creates a new instace of `EmojiSelectorView`. @@ -52,13 +54,14 @@ public final class EmojiSelectorView: UIButton { /// - Parameters: /// - frame: Frame of the button will open the selector /// - config: The custom configuration for the UI components. - public init(frame: CGRect, config: EmojiSelectorView.Config = .default) { - self.config = config - self.dataset = [] + public init(frame: CGRect, items: [EmojiSelectorViewOption]) { + self.config = .default + self.items = items super.init(frame: frame) addGestureRecognizer(UILongPressGestureRecognizer(target: self, action: #selector(EmojiSelectorView.handlePress(sender:)))) + } @available(*, unavailable) @@ -86,25 +89,25 @@ public final class EmojiSelectorView: UIButton { selectedItem = nil isActive = true + let originPoint = rootView?.convert(frame.origin, to: nil) ?? .zero + optionsView.frame = config.rect(items: items.count, + originalPos: originPoint, + trait: UIScreen.main.traitCollection) + let config = self.config - let sizeBtn = CGSize(width: xPosition(for: dataset.count), height: config.heightForSize) + let sizeBtn = CGSize(width: xPosition(for: items.count), height: config.heightForSize) - let originPoint = rootView?.convert(frame.origin, to: nil) ?? .zero rootView?.addSubview(backgroundView) - let originalSize = optionsView.frame.size - let optionsViewOrigin = CGPoint(x: originPoint.x, y: originPoint.y - originalSize.height - 10) - optionsView.frame = CGRect(origin: optionsViewOrigin, size: originalSize) - UIView.animate(withDuration: 0.2) { self.optionsView.alpha = 1 } - for index in 0... + /// - Parameter option: the position of the option in the items. <0... items.count>. /// - Returns: The x position for a given option. private func xPosition(for option: Int) -> CGFloat { let option = CGFloat(option) return (option + 1) * config.spacing + config.size * option } } + + +extension EmojiSelectorView.Config { + + func rect(items: Int, originalPos: CGPoint, trait: UITraitCollection) -> CGRect { + var originalPos = CGPoint(x: originalPos.x, y: originalPos.y - heightForSize - 10) + let option = CGFloat(items) + let width = (option + 1) * spacing + self.size * option + + if trait.horizontalSizeClass == .compact && trait.verticalSizeClass == .regular { + originalPos.x = (UIScreen.main.bounds.width - width) / 2 + } + + return CGRect(origin: originalPos, size: CGSize(width: width, height: heightForSize)) + } + +} From c19a95ce9630a50dc68aae3ff997fd504c70c2ba Mon Sep 17 00:00:00 2001 From: Jorge Ovalle Date: Fri, 30 Oct 2020 22:45:16 -0600 Subject: [PATCH 11/15] Improve Sample project --- .../project.pbxproj | 8 +- .../Base.lproj/Main.storyboard | 50 ++++++++++-- .../Images.xcassets/Contents.json | 6 ++ Example/EmojiSelectorView/Info.plist | 2 + .../SampleViewController.swift | 53 +++++++++++++ .../EmojiSelectorView/ViewController.swift | 77 ------------------- Example/Pods/Pods.xcodeproj/project.pbxproj | 4 + Pod/Classes/EmojiSelectorView.swift | 55 +++++-------- Pod/Classes/EmojiSelectorViewDelegate.swift | 11 ++- .../EmojiSelectorView.Config+rect.swift | 24 ++++++ 10 files changed, 162 insertions(+), 128 deletions(-) create mode 100644 Example/EmojiSelectorView/Images.xcassets/Contents.json create mode 100644 Example/EmojiSelectorView/SampleViewController.swift delete mode 100644 Example/EmojiSelectorView/ViewController.swift create mode 100644 Pod/Classes/Extensions/EmojiSelectorView.Config+rect.swift diff --git a/Example/EmojiSelectorView.xcodeproj/project.pbxproj b/Example/EmojiSelectorView.xcodeproj/project.pbxproj index f81ba10..6209a7a 100644 --- a/Example/EmojiSelectorView.xcodeproj/project.pbxproj +++ b/Example/EmojiSelectorView.xcodeproj/project.pbxproj @@ -8,7 +8,7 @@ /* Begin PBXBuildFile section */ 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; - 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; + 607FACD81AFB9204008FA782 /* SampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* SampleViewController.swift */; }; 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; @@ -53,7 +53,7 @@ 607FACD01AFB9204008FA782 /* EmojiSelectorView_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EmojiSelectorView_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 607FACD71AFB9204008FA782 /* SampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleViewController.swift; sourceTree = ""; }; 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; @@ -131,7 +131,7 @@ children = ( 7A23AE431C8551F0003A8694 /* Assets */, 607FACD51AFB9204008FA782 /* AppDelegate.swift */, - 607FACD71AFB9204008FA782 /* ViewController.swift */, + 607FACD71AFB9204008FA782 /* SampleViewController.swift */, 607FACD91AFB9204008FA782 /* Main.storyboard */, 607FACDC1AFB9204008FA782 /* Images.xcassets */, 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, @@ -422,7 +422,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, + 607FACD81AFB9204008FA782 /* SampleViewController.swift in Sources */, 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Example/EmojiSelectorView/Base.lproj/Main.storyboard b/Example/EmojiSelectorView/Base.lproj/Main.storyboard index 6638f38..a5e23ce 100644 --- a/Example/EmojiSelectorView/Base.lproj/Main.storyboard +++ b/Example/EmojiSelectorView/Base.lproj/Main.storyboard @@ -1,18 +1,17 @@ - - - - + + - + + - + - + @@ -20,11 +19,46 @@ - + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/EmojiSelectorView/Images.xcassets/Contents.json b/Example/EmojiSelectorView/Images.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Example/EmojiSelectorView/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/EmojiSelectorView/Info.plist b/Example/EmojiSelectorView/Info.plist index 6c48029..6905cc6 100644 --- a/Example/EmojiSelectorView/Info.plist +++ b/Example/EmojiSelectorView/Info.plist @@ -33,6 +33,8 @@ UISupportedInterfaceOrientations UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight diff --git a/Example/EmojiSelectorView/SampleViewController.swift b/Example/EmojiSelectorView/SampleViewController.swift new file mode 100644 index 0000000..c18c5f7 --- /dev/null +++ b/Example/EmojiSelectorView/SampleViewController.swift @@ -0,0 +1,53 @@ +// +// SampleViewController.swift +// EmojiSelectorView +// +// Created by Jorge Raul Ovalle Zuleta on 2/28/16. +// + +import UIKit +import EmojiSelectorView + +final class SampleViewController: UIViewController { + + @IBOutlet weak var selectorView: EmojiSelectorView! + @IBOutlet weak var informationLabel: UILabel! + + // MARK: Properties definition + let optionsDataset = [ + EmojiSelectorViewOption(image: "img_1", name: "dislike"), + EmojiSelectorViewOption(image: "img_2", name: "broken"), + EmojiSelectorViewOption(image: "img_3", name: "he he"), + EmojiSelectorViewOption(image: "img_4", name: "ooh"), + EmojiSelectorViewOption(image: "img_5", name: "meh!"), + EmojiSelectorViewOption(image: "img_6", name: "ahh!") + ] + + override func viewDidLoad() { + super.viewDidLoad() + selectorView.items = optionsDataset + selectorView.delegate = self + } + +} + +// MARK: EmojiSelectorViewDelegate +extension SampleViewController: EmojiSelectorViewDelegate { + func emojiSelector(_ sender: EmojiSelectorView, didSelectedIndex index: Int) { + informationLabel.text = "Option \(index) selected" + } + + func emojiSelector(_ sender: EmojiSelectorView, didChangeFocusTo index: Int?) { + guard let index = index else { + informationLabel.text = "Lose focus" + return + } + + informationLabel.text = "Focused on \(index) option" + } + + func emojiSelectorDidCancelledAction(_ sender: EmojiSelectorView) { + informationLabel.text = "User cancelled selection" + } + +} diff --git a/Example/EmojiSelectorView/ViewController.swift b/Example/EmojiSelectorView/ViewController.swift deleted file mode 100644 index ff27ede..0000000 --- a/Example/EmojiSelectorView/ViewController.swift +++ /dev/null @@ -1,77 +0,0 @@ -// -// ViewController.swift -// EmojiSelectorView -// -// Created by Jorge Raul Ovalle Zuleta on 2/28/16. -// - -import UIKit -import EmojiSelectorView - -final class ViewController: UIViewController, EmojiSelectorViewDelegate { - - // MARK: DesignConstants - enum DesignConstants { - static var mainSampleColor = UIColor(red: 0.27, green: 0.69, blue: 0.67, alpha: 1) - static var buttonCornerRadius: CGFloat = 25 - static var buttonFontLabel = UIFont.systemFont(ofSize: 11) - static var sampleButtonSize = CGSize(width: 100, height: 50) - } - - // MARK: Properties definition - let optionsDataset = [ - EmojiSelectorViewOption(image: "img_1", name: "dislike"), - EmojiSelectorViewOption(image: "img_2", name: "broken"), - EmojiSelectorViewOption(image: "img_3", name: "he he"), - EmojiSelectorViewOption(image: "img_4", name: "ooh"), - EmojiSelectorViewOption(image: "img_5", name: "meh!"), - EmojiSelectorViewOption(image: "img_6", name: "ahh!") - ] - - private var label: UILabel { - let label = UILabel(frame: CGRect(x: 0, y: 30, width: self.view.frame.width, height: 30)) - label.text = "Long tap in the buttons" - label.textColor = DesignConstants.mainSampleColor - label.textAlignment = .center - return label - } - - private lazy var labelInfo: UILabel = { - let label = UILabel(frame: CGRect(x: 0, y: 60, width: self.view.frame.width, height: 30)) - label.text = "" - label.textColor = UIColor(red: 0.27, green: 0.69, blue: 0.67, alpha: 1) - label.textAlignment = .center - return label - }() - - // MARK: View lifecycle - override func viewDidLoad() { - super.viewDidLoad() - - view.addSubview(label) - view.addSubview(labelInfo) - - // Sample using `default` configuration. - let buttonSample1 = EmojiSelectorView(frame: CGRect(origin: CGPoint(x: 40, y: 200), - size: DesignConstants.sampleButtonSize), - items: optionsDataset) - buttonSample1.delegate = self - buttonSample1.backgroundColor = DesignConstants.mainSampleColor - buttonSample1.titleLabel?.font = DesignConstants.buttonFontLabel - buttonSample1.layer.cornerRadius = DesignConstants.buttonCornerRadius - buttonSample1.setTitle("Long-tap me!", for: [.normal]) - view.addSubview(buttonSample1) - } - - // MARK: JOEmojiableDelegate - func selectedOption(_ sender: EmojiSelectorView, index: Int) { - print("Option \(index) selected") - labelInfo.text = "Option \(index) selected" - } - - func cancelledAction(_ sender: EmojiSelectorView) { - print("User cancelled selection") - labelInfo.text = "User cancelled selection" - } - -} diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 7371c0a..d8fdde4 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -18,6 +18,7 @@ 6591071C43D9B87AFA228C85CDDEAD33 /* Pods-EmojiSelectorView_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A87C4E68A3D13428D55987315EB2A41 /* Pods-EmojiSelectorView_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7A34BDE5254B94C000067081 /* UIView+contains.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A34BDE4254B94C000067081 /* UIView+contains.swift */; }; 7A34BDEF254BC9BA00067081 /* UIView+animation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A34BDEE254BC9BA00067081 /* UIView+animation.swift */; }; + 7A34BDFF254D005200067081 /* EmojiSelectorView.Config+rect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A34BDFE254D005200067081 /* EmojiSelectorView.Config+rect.swift */; }; 848B385E9305205A802100B71061D9FD /* EmojiSelectorView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 79D52CE154951E5AB2EAC7E613500282 /* EmojiSelectorView-dummy.m */; }; 85CB39A5AABE21C73030DB5FE1024250 /* CGRect+init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DF2911012A9A236C5F2B6D4EB1D4094 /* CGRect+init.swift */; }; 934EB4B96C029D7A175A99E83A86A4B0 /* Pods-EmojiSelectorView_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 67C39957D3F4186F0D3CC7D4CC2C3F7C /* Pods-EmojiSelectorView_Example-dummy.m */; }; @@ -70,6 +71,7 @@ 79D52CE154951E5AB2EAC7E613500282 /* EmojiSelectorView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "EmojiSelectorView-dummy.m"; sourceTree = ""; }; 7A34BDE4254B94C000067081 /* UIView+contains.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+contains.swift"; sourceTree = ""; }; 7A34BDEE254BC9BA00067081 /* UIView+animation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+animation.swift"; sourceTree = ""; }; + 7A34BDFE254D005200067081 /* EmojiSelectorView.Config+rect.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EmojiSelectorView.Config+rect.swift"; sourceTree = ""; }; 8107FB9C18556C3BEDB6C18FA985F8DE /* EmojiSelectorViewDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorViewDelegate.swift; path = Pod/Classes/EmojiSelectorViewDelegate.swift; sourceTree = ""; }; 814C5846B5A784B1E2D7898C3F07F8D4 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 86DB893EE585CCE838C5BEAD0F5E5769 /* Pods-EmojiSelectorView_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-EmojiSelectorView_Example-Info.plist"; sourceTree = ""; }; @@ -164,6 +166,7 @@ 8DF2911012A9A236C5F2B6D4EB1D4094 /* CGRect+init.swift */, 9BBF320B181C62265BE07F7F3F937F98 /* CGSize+init.swift */, 7A34BDE4254B94C000067081 /* UIView+contains.swift */, + 7A34BDFE254D005200067081 /* EmojiSelectorView.Config+rect.swift */, ); name = Extensions; path = Pod/Classes/Extensions; @@ -473,6 +476,7 @@ E786A40A908BDED9AF542CE49A7E1930 /* EmojiSelectorView.swift in Sources */, ED1F943FC0C71899F1DAF2C2C5FC0915 /* EmojiSelectorViewConfig.swift in Sources */, 7A34BDE5254B94C000067081 /* UIView+contains.swift in Sources */, + 7A34BDFF254D005200067081 /* EmojiSelectorView.Config+rect.swift in Sources */, BF6E731C71D2F6963367EBB90628C488 /* EmojiSelectorViewDelegate.swift in Sources */, 31270D34A4FC472F2D1DA5B7F2BE332A /* EmojiSelectorViewOption.swift in Sources */, ); diff --git a/Pod/Classes/EmojiSelectorView.swift b/Pod/Classes/EmojiSelectorView.swift index b0bb31a..33f6a62 100644 --- a/Pod/Classes/EmojiSelectorView.swift +++ b/Pod/Classes/EmojiSelectorView.swift @@ -14,28 +14,24 @@ public final class EmojiSelectorView: UIButton { public weak var delegate: EmojiSelectorViewDelegate? - public let items: [EmojiSelectorViewOption] + public var items: [EmojiSelectorViewOption] private var isActive: Bool = false - public private (set) var selectedItem: Int? - - private lazy var backgroundView: UIView = { - let backgroundView = UIView(frame: UIScreen.main.bounds) - backgroundView.backgroundColor = .clear - return backgroundView - }() + public private (set) var selectedItem: Int? { + didSet { + delegate?.emojiSelector(self, didChangeFocusTo: selectedItem) + } + } private lazy var optionsView: UIView = { - let optionsViewSize = CGSize(width: xPosition(for: items.count), height: config.heightForSize) - let optionsView = UIView(frame: CGRect(origin: .zero, size: optionsViewSize)) - optionsView.layer.cornerRadius = optionsView.frame.height / 2 + let optionsView = UIView(frame: .zero) + optionsView.layer.cornerRadius = config.heightForSize/2 optionsView.backgroundColor = .white optionsView.layer.shadowColor = UIColor.lightGray.cgColor optionsView.layer.shadowOffset = .zero optionsView.layer.shadowOpacity = 0.5 optionsView.alpha = 0.3 - backgroundView.addSubview(optionsView) return optionsView }() @@ -45,8 +41,6 @@ public final class EmojiSelectorView: UIButton { return UIApplication.shared.keyWindow?.rootViewController?.view } - private var frrame: CGRect = .zero - // MARK: - View lifecycle /// Creates a new instace of `EmojiSelectorView`. @@ -64,9 +58,13 @@ public final class EmojiSelectorView: UIButton { } - @available(*, unavailable) required public init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") + self.config = .default + self.items = [] + super.init(coder: aDecoder) + + addGestureRecognizer(UILongPressGestureRecognizer(target: self, + action: #selector(EmojiSelectorView.handlePress(sender:)))) } // MARK: - Visual component interaction / animation @@ -97,7 +95,7 @@ public final class EmojiSelectorView: UIButton { let config = self.config let sizeBtn = CGSize(width: xPosition(for: items.count), height: config.heightForSize) - rootView?.addSubview(backgroundView) + rootView?.addSubview(optionsView) UIView.animate(withDuration: 0.2) { self.optionsView.alpha = 1 @@ -146,12 +144,12 @@ public final class EmojiSelectorView: UIButton { } completion: { finished in guard finished, index == self.items.count/2 else { return } self.isActive = false - self.backgroundView.removeFromSuperview() + self.optionsView.removeFromSuperview() self.optionsView.subviews.forEach { $0.removeFromSuperview() } if let selectedItem = self.selectedItem { - self.delegate?.selectedOption(self, index: selectedItem) + self.delegate?.emojiSelector(self, didSelectedIndex: selectedItem) } else { - self.delegate?.cancelledAction(self) + self.delegate?.emojiSelectorDidCancelledAction(self) } } } @@ -194,20 +192,3 @@ public final class EmojiSelectorView: UIButton { return (option + 1) * config.spacing + config.size * option } } - - -extension EmojiSelectorView.Config { - - func rect(items: Int, originalPos: CGPoint, trait: UITraitCollection) -> CGRect { - var originalPos = CGPoint(x: originalPos.x, y: originalPos.y - heightForSize - 10) - let option = CGFloat(items) - let width = (option + 1) * spacing + self.size * option - - if trait.horizontalSizeClass == .compact && trait.verticalSizeClass == .regular { - originalPos.x = (UIScreen.main.bounds.width - width) / 2 - } - - return CGRect(origin: originalPos, size: CGSize(width: width, height: heightForSize)) - } - -} diff --git a/Pod/Classes/EmojiSelectorViewDelegate.swift b/Pod/Classes/EmojiSelectorViewDelegate.swift index acc0670..458f19c 100644 --- a/Pod/Classes/EmojiSelectorViewDelegate.swift +++ b/Pod/Classes/EmojiSelectorViewDelegate.swift @@ -15,10 +15,17 @@ public protocol EmojiSelectorViewDelegate: class { /// - Parameters: /// - sender: The `EmojiSelectorView` which is sending the action. /// - index: Index of the selected option. - func selectedOption(_ sender: EmojiSelectorView, index: Int) + func emojiSelector(_ sender: EmojiSelectorView, didSelectedIndex index: Int) + /// The user is moving through the options. + /// - Parameters: + /// - sender: The `EmojiSelectorView` which is sending the action. + /// - index: Index of the selected option. + func emojiSelector(_ sender: EmojiSelectorView, didChangeFocusTo index: Int?) + /// The user cancelled the option selection. /// /// - Parameter sender: The `EmojiSelectorView` which is sending the action. - func cancelledAction(_ sender: EmojiSelectorView) + func emojiSelectorDidCancelledAction(_ sender: EmojiSelectorView) + } diff --git a/Pod/Classes/Extensions/EmojiSelectorView.Config+rect.swift b/Pod/Classes/Extensions/EmojiSelectorView.Config+rect.swift new file mode 100644 index 0000000..3ac67a0 --- /dev/null +++ b/Pod/Classes/Extensions/EmojiSelectorView.Config+rect.swift @@ -0,0 +1,24 @@ +// +// EmojiSelectorView.Config+rect.swift +// EmojiSelectorView +// +// Created by Jorge Ovalle on 30/10/20. +// + +import Foundation + +extension EmojiSelectorView.Config { + + func rect(items: Int, originalPos: CGPoint, trait: UITraitCollection) -> CGRect { + var originalPos = CGPoint(x: originalPos.x, y: originalPos.y - heightForSize - 10) + let option = CGFloat(items) + let width = (option + 1) * spacing + self.size * option + + if trait.horizontalSizeClass == .compact && trait.verticalSizeClass == .regular { + originalPos.x = (UIScreen.main.bounds.width - width) / 2 + } + + return CGRect(origin: originalPos, size: CGSize(width: width, height: heightForSize)) + } + +} From 071b461d0a4e9f51618dbdc209b107fca15b118c Mon Sep 17 00:00:00 2001 From: Jorge Ovalle Date: Fri, 30 Oct 2020 23:56:18 -0600 Subject: [PATCH 12/15] Add support for iOS 13 and DataSet protocol --- EmojiSelectorView.podspec | 2 +- .../project.pbxproj | 154 +++--- .../SampleViewController.swift | 36 +- Example/Podfile | 2 +- Example/Podfile.lock | 4 +- Example/Pods/Manifest.lock | 4 +- Example/Pods/Pods.xcodeproj/project.pbxproj | 522 +++++++++--------- Pod/Classes/EmojiSelectorView.swift | 38 +- Pod/Classes/EmojiSelectorViewConfig.swift | 4 - Pod/Classes/EmojiSelectorViewDelegate.swift | 19 + Pod/Classes/EmojiSelectorViewOption.swift | 17 +- 11 files changed, 429 insertions(+), 373 deletions(-) diff --git a/EmojiSelectorView.podspec b/EmojiSelectorView.podspec index b606126..b9ee474 100644 --- a/EmojiSelectorView.podspec +++ b/EmojiSelectorView.podspec @@ -11,7 +11,7 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/lojals/EmojiSelectorView.git", :tag => s.version.to_s } s.social_media_url = 'https://github.com/lojals' - s.ios.deployment_target = '10.0' + s.ios.deployment_target = '13.0' s.pod_target_xcconfig = { 'SWIFT_VERSION' => '5.0' } s.swift_version = '5.0' diff --git a/Example/EmojiSelectorView.xcodeproj/project.pbxproj b/Example/EmojiSelectorView.xcodeproj/project.pbxproj index 6209a7a..4bb3504 100644 --- a/Example/EmojiSelectorView.xcodeproj/project.pbxproj +++ b/Example/EmojiSelectorView.xcodeproj/project.pbxproj @@ -14,24 +14,24 @@ 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 6CDA14413D15FF293F32AE0A /* Pods_EmojiSelectorView_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 351E55CD4A2FDEA989D65319 /* Pods_EmojiSelectorView_Tests.framework */; }; - 7A23AE561C8551F0003A8694 /* img_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE441C8551F0003A8694 /* img_1.png */; }; - 7A23AE571C8551F0003A8694 /* img_1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE451C8551F0003A8694 /* img_1@2x.png */; }; - 7A23AE581C8551F0003A8694 /* img_1@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE461C8551F0003A8694 /* img_1@3x.png */; }; - 7A23AE591C8551F0003A8694 /* img_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE471C8551F0003A8694 /* img_2.png */; }; - 7A23AE5A1C8551F0003A8694 /* img_2@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE481C8551F0003A8694 /* img_2@2x.png */; }; - 7A23AE5B1C8551F0003A8694 /* img_2@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE491C8551F0003A8694 /* img_2@3x.png */; }; - 7A23AE5C1C8551F0003A8694 /* img_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE4A1C8551F0003A8694 /* img_3.png */; }; - 7A23AE5D1C8551F0003A8694 /* img_3@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE4B1C8551F0003A8694 /* img_3@2x.png */; }; - 7A23AE5E1C8551F0003A8694 /* img_3@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE4C1C8551F0003A8694 /* img_3@3x.png */; }; - 7A23AE5F1C8551F0003A8694 /* img_4.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE4D1C8551F0003A8694 /* img_4.png */; }; - 7A23AE601C8551F0003A8694 /* img_4@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE4E1C8551F0003A8694 /* img_4@2x.png */; }; - 7A23AE611C8551F0003A8694 /* img_4@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE4F1C8551F0003A8694 /* img_4@3x.png */; }; - 7A23AE621C8551F0003A8694 /* img_5.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE501C8551F0003A8694 /* img_5.png */; }; - 7A23AE631C8551F0003A8694 /* img_5@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE511C8551F0003A8694 /* img_5@2x.png */; }; - 7A23AE641C8551F0003A8694 /* img_5@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE521C8551F0003A8694 /* img_5@3x.png */; }; - 7A23AE651C8551F0003A8694 /* img_6.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE531C8551F0003A8694 /* img_6.png */; }; - 7A23AE661C8551F0003A8694 /* img_6@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE541C8551F0003A8694 /* img_6@2x.png */; }; - 7A23AE671C8551F0003A8694 /* img_6@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7A23AE551C8551F0003A8694 /* img_6@3x.png */; }; + 7ACF52B0254D31A900B00C8D /* img_1.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF529E254D31A900B00C8D /* img_1.png */; }; + 7ACF52B1254D31A900B00C8D /* img_1@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF529F254D31A900B00C8D /* img_1@3x.png */; }; + 7ACF52B2254D31A900B00C8D /* img_3@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF52A0254D31A900B00C8D /* img_3@2x.png */; }; + 7ACF52B3254D31A900B00C8D /* img_2.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF52A1254D31A900B00C8D /* img_2.png */; }; + 7ACF52B4254D31A900B00C8D /* img_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF52A2254D31A900B00C8D /* img_3.png */; }; + 7ACF52B5254D31A900B00C8D /* img_6.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF52A3254D31A900B00C8D /* img_6.png */; }; + 7ACF52B6254D31A900B00C8D /* img_3@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF52A4254D31A900B00C8D /* img_3@3x.png */; }; + 7ACF52B7254D31A900B00C8D /* img_4.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF52A5254D31A900B00C8D /* img_4.png */; }; + 7ACF52B8254D31A900B00C8D /* img_1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF52A6254D31A900B00C8D /* img_1@2x.png */; }; + 7ACF52B9254D31A900B00C8D /* img_5.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF52A7254D31A900B00C8D /* img_5.png */; }; + 7ACF52BA254D31A900B00C8D /* img_5@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF52A8254D31A900B00C8D /* img_5@2x.png */; }; + 7ACF52BB254D31A900B00C8D /* img_5@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF52A9254D31A900B00C8D /* img_5@3x.png */; }; + 7ACF52BC254D31A900B00C8D /* img_2@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF52AA254D31A900B00C8D /* img_2@2x.png */; }; + 7ACF52BD254D31A900B00C8D /* img_2@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF52AB254D31A900B00C8D /* img_2@3x.png */; }; + 7ACF52BE254D31A900B00C8D /* img_6@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF52AC254D31A900B00C8D /* img_6@3x.png */; }; + 7ACF52BF254D31A900B00C8D /* img_4@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF52AD254D31A900B00C8D /* img_4@2x.png */; }; + 7ACF52C0254D31A900B00C8D /* img_4@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF52AE254D31A900B00C8D /* img_4@3x.png */; }; + 7ACF52C1254D31A900B00C8D /* img_6@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ACF52AF254D31A900B00C8D /* img_6@2x.png */; }; A8F4813110821649BBB25B0D /* Pods_EmojiSelectorView_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95EEA5B4A599E390747AC670 /* Pods_EmojiSelectorView_Example.framework */; }; /* End PBXBuildFile section */ @@ -61,24 +61,24 @@ 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 61D2E54C81E5775A6A4D887E /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; - 7A23AE441C8551F0003A8694 /* img_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = img_1.png; sourceTree = ""; }; - 7A23AE451C8551F0003A8694 /* img_1@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_1@2x.png"; sourceTree = ""; }; - 7A23AE461C8551F0003A8694 /* img_1@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_1@3x.png"; sourceTree = ""; }; - 7A23AE471C8551F0003A8694 /* img_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = img_2.png; sourceTree = ""; }; - 7A23AE481C8551F0003A8694 /* img_2@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_2@2x.png"; sourceTree = ""; }; - 7A23AE491C8551F0003A8694 /* img_2@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_2@3x.png"; sourceTree = ""; }; - 7A23AE4A1C8551F0003A8694 /* img_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = img_3.png; sourceTree = ""; }; - 7A23AE4B1C8551F0003A8694 /* img_3@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_3@2x.png"; sourceTree = ""; }; - 7A23AE4C1C8551F0003A8694 /* img_3@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_3@3x.png"; sourceTree = ""; }; - 7A23AE4D1C8551F0003A8694 /* img_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = img_4.png; sourceTree = ""; }; - 7A23AE4E1C8551F0003A8694 /* img_4@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_4@2x.png"; sourceTree = ""; }; - 7A23AE4F1C8551F0003A8694 /* img_4@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_4@3x.png"; sourceTree = ""; }; - 7A23AE501C8551F0003A8694 /* img_5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = img_5.png; sourceTree = ""; }; - 7A23AE511C8551F0003A8694 /* img_5@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_5@2x.png"; sourceTree = ""; }; - 7A23AE521C8551F0003A8694 /* img_5@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_5@3x.png"; sourceTree = ""; }; - 7A23AE531C8551F0003A8694 /* img_6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = img_6.png; sourceTree = ""; }; - 7A23AE541C8551F0003A8694 /* img_6@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_6@2x.png"; sourceTree = ""; }; - 7A23AE551C8551F0003A8694 /* img_6@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_6@3x.png"; sourceTree = ""; }; + 7ACF529E254D31A900B00C8D /* img_1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = img_1.png; sourceTree = ""; }; + 7ACF529F254D31A900B00C8D /* img_1@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_1@3x.png"; sourceTree = ""; }; + 7ACF52A0254D31A900B00C8D /* img_3@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_3@2x.png"; sourceTree = ""; }; + 7ACF52A1254D31A900B00C8D /* img_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = img_2.png; sourceTree = ""; }; + 7ACF52A2254D31A900B00C8D /* img_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = img_3.png; sourceTree = ""; }; + 7ACF52A3254D31A900B00C8D /* img_6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = img_6.png; sourceTree = ""; }; + 7ACF52A4254D31A900B00C8D /* img_3@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_3@3x.png"; sourceTree = ""; }; + 7ACF52A5254D31A900B00C8D /* img_4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = img_4.png; sourceTree = ""; }; + 7ACF52A6254D31A900B00C8D /* img_1@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_1@2x.png"; sourceTree = ""; }; + 7ACF52A7254D31A900B00C8D /* img_5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = img_5.png; sourceTree = ""; }; + 7ACF52A8254D31A900B00C8D /* img_5@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_5@2x.png"; sourceTree = ""; }; + 7ACF52A9254D31A900B00C8D /* img_5@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_5@3x.png"; sourceTree = ""; }; + 7ACF52AA254D31A900B00C8D /* img_2@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_2@2x.png"; sourceTree = ""; }; + 7ACF52AB254D31A900B00C8D /* img_2@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_2@3x.png"; sourceTree = ""; }; + 7ACF52AC254D31A900B00C8D /* img_6@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_6@3x.png"; sourceTree = ""; }; + 7ACF52AD254D31A900B00C8D /* img_4@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_4@2x.png"; sourceTree = ""; }; + 7ACF52AE254D31A900B00C8D /* img_4@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_4@3x.png"; sourceTree = ""; }; + 7ACF52AF254D31A900B00C8D /* img_6@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "img_6@2x.png"; sourceTree = ""; }; 896201CC5F9E13F3BEEB67AA /* Pods-EmojiSelectorView_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EmojiSelectorView_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-EmojiSelectorView_Example/Pods-EmojiSelectorView_Example.release.xcconfig"; sourceTree = ""; }; 95EEA5B4A599E390747AC670 /* Pods_EmojiSelectorView_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_EmojiSelectorView_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C270B48A211A0387A65C0BFD /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; @@ -129,7 +129,7 @@ 607FACD21AFB9204008FA782 /* Example for EmojiSelectorView */ = { isa = PBXGroup; children = ( - 7A23AE431C8551F0003A8694 /* Assets */, + 7ACF529D254D31A900B00C8D /* Assets */, 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 607FACD71AFB9204008FA782 /* SampleViewController.swift */, 607FACD91AFB9204008FA782 /* Main.storyboard */, @@ -176,27 +176,27 @@ name = "Podspec Metadata"; sourceTree = ""; }; - 7A23AE431C8551F0003A8694 /* Assets */ = { + 7ACF529D254D31A900B00C8D /* Assets */ = { isa = PBXGroup; children = ( - 7A23AE441C8551F0003A8694 /* img_1.png */, - 7A23AE451C8551F0003A8694 /* img_1@2x.png */, - 7A23AE461C8551F0003A8694 /* img_1@3x.png */, - 7A23AE471C8551F0003A8694 /* img_2.png */, - 7A23AE481C8551F0003A8694 /* img_2@2x.png */, - 7A23AE491C8551F0003A8694 /* img_2@3x.png */, - 7A23AE4A1C8551F0003A8694 /* img_3.png */, - 7A23AE4B1C8551F0003A8694 /* img_3@2x.png */, - 7A23AE4C1C8551F0003A8694 /* img_3@3x.png */, - 7A23AE4D1C8551F0003A8694 /* img_4.png */, - 7A23AE4E1C8551F0003A8694 /* img_4@2x.png */, - 7A23AE4F1C8551F0003A8694 /* img_4@3x.png */, - 7A23AE501C8551F0003A8694 /* img_5.png */, - 7A23AE511C8551F0003A8694 /* img_5@2x.png */, - 7A23AE521C8551F0003A8694 /* img_5@3x.png */, - 7A23AE531C8551F0003A8694 /* img_6.png */, - 7A23AE541C8551F0003A8694 /* img_6@2x.png */, - 7A23AE551C8551F0003A8694 /* img_6@3x.png */, + 7ACF529E254D31A900B00C8D /* img_1.png */, + 7ACF529F254D31A900B00C8D /* img_1@3x.png */, + 7ACF52A0254D31A900B00C8D /* img_3@2x.png */, + 7ACF52A1254D31A900B00C8D /* img_2.png */, + 7ACF52A2254D31A900B00C8D /* img_3.png */, + 7ACF52A3254D31A900B00C8D /* img_6.png */, + 7ACF52A4254D31A900B00C8D /* img_3@3x.png */, + 7ACF52A5254D31A900B00C8D /* img_4.png */, + 7ACF52A6254D31A900B00C8D /* img_1@2x.png */, + 7ACF52A7254D31A900B00C8D /* img_5.png */, + 7ACF52A8254D31A900B00C8D /* img_5@2x.png */, + 7ACF52A9254D31A900B00C8D /* img_5@3x.png */, + 7ACF52AA254D31A900B00C8D /* img_2@2x.png */, + 7ACF52AB254D31A900B00C8D /* img_2@3x.png */, + 7ACF52AC254D31A900B00C8D /* img_6@3x.png */, + 7ACF52AD254D31A900B00C8D /* img_4@2x.png */, + 7ACF52AE254D31A900B00C8D /* img_4@3x.png */, + 7ACF52AF254D31A900B00C8D /* img_6@2x.png */, ); path = Assets; sourceTree = ""; @@ -310,26 +310,26 @@ buildActionMask = 2147483647; files = ( 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, - 7A23AE671C8551F0003A8694 /* img_6@3x.png in Resources */, - 7A23AE601C8551F0003A8694 /* img_4@2x.png in Resources */, - 7A23AE611C8551F0003A8694 /* img_4@3x.png in Resources */, - 7A23AE561C8551F0003A8694 /* img_1.png in Resources */, - 7A23AE5B1C8551F0003A8694 /* img_2@3x.png in Resources */, - 7A23AE5D1C8551F0003A8694 /* img_3@2x.png in Resources */, + 7ACF52B0254D31A900B00C8D /* img_1.png in Resources */, + 7ACF52C0254D31A900B00C8D /* img_4@3x.png in Resources */, + 7ACF52BB254D31A900B00C8D /* img_5@3x.png in Resources */, + 7ACF52B2254D31A900B00C8D /* img_3@2x.png in Resources */, + 7ACF52BE254D31A900B00C8D /* img_6@3x.png in Resources */, + 7ACF52B4254D31A900B00C8D /* img_3.png in Resources */, + 7ACF52C1254D31A900B00C8D /* img_6@2x.png in Resources */, 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, - 7A23AE5E1C8551F0003A8694 /* img_3@3x.png in Resources */, - 7A23AE631C8551F0003A8694 /* img_5@2x.png in Resources */, - 7A23AE581C8551F0003A8694 /* img_1@3x.png in Resources */, - 7A23AE5F1C8551F0003A8694 /* img_4.png in Resources */, - 7A23AE661C8551F0003A8694 /* img_6@2x.png in Resources */, - 7A23AE641C8551F0003A8694 /* img_5@3x.png in Resources */, - 7A23AE591C8551F0003A8694 /* img_2.png in Resources */, - 7A23AE651C8551F0003A8694 /* img_6.png in Resources */, - 7A23AE571C8551F0003A8694 /* img_1@2x.png in Resources */, + 7ACF52B3254D31A900B00C8D /* img_2.png in Resources */, + 7ACF52BC254D31A900B00C8D /* img_2@2x.png in Resources */, + 7ACF52BD254D31A900B00C8D /* img_2@3x.png in Resources */, + 7ACF52B8254D31A900B00C8D /* img_1@2x.png in Resources */, + 7ACF52B1254D31A900B00C8D /* img_1@3x.png in Resources */, + 7ACF52B6254D31A900B00C8D /* img_3@3x.png in Resources */, 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, - 7A23AE621C8551F0003A8694 /* img_5.png in Resources */, - 7A23AE5A1C8551F0003A8694 /* img_2@2x.png in Resources */, - 7A23AE5C1C8551F0003A8694 /* img_3.png in Resources */, + 7ACF52BF254D31A900B00C8D /* img_4@2x.png in Resources */, + 7ACF52B7254D31A900B00C8D /* img_4.png in Resources */, + 7ACF52B5254D31A900B00C8D /* img_6.png in Resources */, + 7ACF52BA254D31A900B00C8D /* img_5@2x.png in Resources */, + 7ACF52B9254D31A900B00C8D /* img_5.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -514,7 +514,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -564,7 +564,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; @@ -578,6 +578,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = EmojiSelectorView/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; @@ -593,6 +594,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = EmojiSelectorView/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; diff --git a/Example/EmojiSelectorView/SampleViewController.swift b/Example/EmojiSelectorView/SampleViewController.swift index c18c5f7..e63803d 100644 --- a/Example/EmojiSelectorView/SampleViewController.swift +++ b/Example/EmojiSelectorView/SampleViewController.swift @@ -13,20 +13,19 @@ final class SampleViewController: UIViewController { @IBOutlet weak var selectorView: EmojiSelectorView! @IBOutlet weak var informationLabel: UILabel! - // MARK: Properties definition let optionsDataset = [ - EmojiSelectorViewOption(image: "img_1", name: "dislike"), - EmojiSelectorViewOption(image: "img_2", name: "broken"), - EmojiSelectorViewOption(image: "img_3", name: "he he"), - EmojiSelectorViewOption(image: "img_4", name: "ooh"), - EmojiSelectorViewOption(image: "img_5", name: "meh!"), - EmojiSelectorViewOption(image: "img_6", name: "ahh!") + (imageName: "img_1", title: "Like"), + (imageName: "img_2", title: "Smile"), + (imageName: "img_3", title: "Heart"), + (imageName: "img_4", title: "Idea"), + (imageName: "img_5", title: "Slow"), + (imageName: "img_6", title: "Fast") ] override func viewDidLoad() { super.viewDidLoad() - selectorView.items = optionsDataset selectorView.delegate = self + selectorView.dataSource = self } } @@ -51,3 +50,24 @@ extension SampleViewController: EmojiSelectorViewDelegate { } } + +// MARK: EmojiSelectorViewDataSource +extension SampleViewController: EmojiSelectorViewDataSource { + + func numberOfOptions(in selector: EmojiSelectorView) -> Int { + optionsDataset.count + } + + func emojiSelector(_ selector: EmojiSelectorView, viewForIndex index: Int) -> UIView { + let option = optionsDataset[index].imageName + guard let image = UIImage(named: option) else { + return UIView() + } + return UIImageView(image: image) + } + + func emojiSelector(_ selector: EmojiSelectorView, nameForIndex index: Int) -> String { + optionsDataset[index].title + } + +} diff --git a/Example/Podfile b/Example/Podfile index 954a343..3285812 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -1,5 +1,5 @@ use_frameworks! -platform :ios, '12.0' +platform :ios, '13.0' target 'EmojiSelectorView_Example' do pod 'EmojiSelectorView', :path => '../' diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 91c1b68..4b5d7a4 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -9,8 +9,8 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - EmojiSelectorView: b658b7d87c27acdf5ffa4b6be828adf88b03109d + EmojiSelectorView: 54edeb0646f45013d6ff79e68290e54769c61ac8 -PODFILE CHECKSUM: 51e94af6b43e01a708f019db669b91c92e99f4e7 +PODFILE CHECKSUM: 928697acf9e5ca535d0967349d8d6904545adc18 COCOAPODS: 1.8.4 diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 91c1b68..4b5d7a4 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -9,8 +9,8 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - EmojiSelectorView: b658b7d87c27acdf5ffa4b6be828adf88b03109d + EmojiSelectorView: 54edeb0646f45013d6ff79e68290e54769c61ac8 -PODFILE CHECKSUM: 51e94af6b43e01a708f019db669b91c92e99f4e7 +PODFILE CHECKSUM: 928697acf9e5ca535d0967349d8d6904545adc18 COCOAPODS: 1.8.4 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index d8fdde4..59e3276 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,41 +7,41 @@ objects = { /* Begin PBXBuildFile section */ - 0E5A924C8B75FDA2292DACC4C7884481 /* EmojiSelectorView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0D1295DBEA16561C7799C7FCEEC17973 /* EmojiSelectorView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 10CC54B464850065E6DE1E53A7B87D46 /* EmojiSelectorView.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 23039DB12E2FEDA53DBC0E390044E3BB /* EmojiSelectorView.bundle */; }; - 2678F31335E857CBB94C3AEBED19F653 /* CGSize+init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BBF320B181C62265BE07F7F3F937F98 /* CGSize+init.swift */; }; + 1806FA78885927B8DCE0CE08CB3C91F3 /* EmojiSelectorViewConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0406831EA441661D97BE55D597C24DB9 /* EmojiSelectorViewConfig.swift */; }; 2F90788F589DCECAF4288E777CB32683 /* Pods-EmojiSelectorView_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 05A7AE4D4F1D7E4E8B3477AFF28546CE /* Pods-EmojiSelectorView_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 31270D34A4FC472F2D1DA5B7F2BE332A /* EmojiSelectorViewOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCFC282D68E8FA73FC68C363149CF175 /* EmojiSelectorViewOption.swift */; }; + 347435B8CD6C5DE596BEEC77B76B77D4 /* EmojiSelectorView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 506B38C7E14432F161992D8742A37AD8 /* EmojiSelectorView-dummy.m */; }; 3AE3E45A6AEEDD2D579130B6DF3ADDE8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; - 47B7850C21378E9E227222744DCFFFA7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; + 43EB5A601CF524245F654A5E7447E40D /* UIView+animation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8D27A3107B17523AA87E8C63FE5D495 /* UIView+animation.swift */; }; + 535400CC279EBE3CB538CCD3CFB924B9 /* UIView+contains.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB337ECC4A2221989E26F7BE836834BB /* UIView+contains.swift */; }; 54ADEDD2BD9240FFD32A4E9352B0F1FF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; + 6324E527CD9365644E495AF66F08E9B4 /* EmojiSelectorView.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 23039DB12E2FEDA53DBC0E390044E3BB /* EmojiSelectorView.bundle */; }; 6591071C43D9B87AFA228C85CDDEAD33 /* Pods-EmojiSelectorView_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A87C4E68A3D13428D55987315EB2A41 /* Pods-EmojiSelectorView_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7A34BDE5254B94C000067081 /* UIView+contains.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A34BDE4254B94C000067081 /* UIView+contains.swift */; }; - 7A34BDEF254BC9BA00067081 /* UIView+animation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A34BDEE254BC9BA00067081 /* UIView+animation.swift */; }; - 7A34BDFF254D005200067081 /* EmojiSelectorView.Config+rect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A34BDFE254D005200067081 /* EmojiSelectorView.Config+rect.swift */; }; - 848B385E9305205A802100B71061D9FD /* EmojiSelectorView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 79D52CE154951E5AB2EAC7E613500282 /* EmojiSelectorView-dummy.m */; }; - 85CB39A5AABE21C73030DB5FE1024250 /* CGRect+init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DF2911012A9A236C5F2B6D4EB1D4094 /* CGRect+init.swift */; }; + 6F611BD4D582E14D5CFA4A158DFEDCA5 /* EmojiSelectorViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F1778D903D53B5C4E5B56404D75B865 /* EmojiSelectorViewDelegate.swift */; }; + 7FBE450D32389259E778E42EDA28D4FF /* CGSize+init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E3BFC719A0E5349D1B417886BE8C0C1 /* CGSize+init.swift */; }; + 835CDD99BF2D1D2B70B5CEE77C265BE6 /* EmojiSelectorView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A130A7406851411EF276BCEA4BF74603 /* EmojiSelectorView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 934EB4B96C029D7A175A99E83A86A4B0 /* Pods-EmojiSelectorView_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 67C39957D3F4186F0D3CC7D4CC2C3F7C /* Pods-EmojiSelectorView_Example-dummy.m */; }; - BF6E731C71D2F6963367EBB90628C488 /* EmojiSelectorViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8107FB9C18556C3BEDB6C18FA985F8DE /* EmojiSelectorViewDelegate.swift */; }; - E786A40A908BDED9AF542CE49A7E1930 /* EmojiSelectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA4FDA624318CBDB154216BF9409A1DE /* EmojiSelectorView.swift */; }; - ED1F943FC0C71899F1DAF2C2C5FC0915 /* EmojiSelectorViewConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0BFC4C63056431C327840C9A2F5D946 /* EmojiSelectorViewConfig.swift */; }; + 9535F05FA147D752969BD8030047EAD5 /* EmojiSelectorView.Config+rect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67F3F0B78AFC7EC63B79564EE5D28982 /* EmojiSelectorView.Config+rect.swift */; }; + A12D07D733A8A82617F24091A2644435 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; + BE662EF929C8AB8E7949647825AAAEA7 /* EmojiSelectorViewOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D2D117D630A279FAA616B20ECA33EDC /* EmojiSelectorViewOption.swift */; }; + DF8B036F698B8368F5BAB58C5389CF3B /* CGRect+init.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF00FB1F9E33C4EE236407BFDFE25400 /* CGRect+init.swift */; }; + F37F1BF47391493AB0DCC964EE0AE3FF /* EmojiSelectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5CA8C96CB08B7154D9CCE56ED69364C /* EmojiSelectorView.swift */; }; F8B9F90FC1C5B94FECCB2A6D663BB68D /* Pods-EmojiSelectorView_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B9F963A73C8AEEBF4C4FCDCAA70B5609 /* Pods-EmojiSelectorView_Tests-dummy.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 5EBE00A3737FB6CF1C00A58811645C93 /* PBXContainerItemProxy */ = { + 290D0A20D8D4A412E8AB40C841C31882 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 1D332AEEDB5E74D9CD9FDDAE4A776D4A; - remoteInfo = EmojiSelectorView; + remoteGlobalIDString = D2C77D1FA998B98D6A884971D75417C3; + remoteInfo = "EmojiSelectorView-EmojiSelectorView"; }; - 8E5DB072889219987478C77219370A2C /* PBXContainerItemProxy */ = { + 5EBE00A3737FB6CF1C00A58811645C93 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = D2C77D1FA998B98D6A884971D75417C3; - remoteInfo = "EmojiSelectorView-EmojiSelectorView"; + remoteGlobalIDString = 1D332AEEDB5E74D9CD9FDDAE4A776D4A; + remoteInfo = EmojiSelectorView; }; CC653A5C372F2B279267AC5974477B39 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -53,72 +53,72 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 0406831EA441661D97BE55D597C24DB9 /* EmojiSelectorViewConfig.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorViewConfig.swift; path = Pod/Classes/EmojiSelectorViewConfig.swift; sourceTree = ""; }; 05A7AE4D4F1D7E4E8B3477AFF28546CE /* Pods-EmojiSelectorView_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-EmojiSelectorView_Tests-umbrella.h"; sourceTree = ""; }; - 0D1295DBEA16561C7799C7FCEEC17973 /* EmojiSelectorView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EmojiSelectorView-umbrella.h"; sourceTree = ""; }; 0F28FC89D2F94B12130119CEEE717279 /* Pods-EmojiSelectorView_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-EmojiSelectorView_Example.modulemap"; sourceTree = ""; }; 178D6D17455F143939B7F8B9503A7563 /* Pods-EmojiSelectorView_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-EmojiSelectorView_Tests-acknowledgements.plist"; sourceTree = ""; }; + 1B9BE80940CF223585D223117B61CD3C /* EmojiSelectorView.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = EmojiSelectorView.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 1F1CD5D0205314C26C4E094BDABB4675 /* ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist"; sourceTree = ""; }; + 1F3D6ED03872E50E63CB94D2F7F30019 /* EmojiSelectorView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = EmojiSelectorView.xcconfig; sourceTree = ""; }; 23039DB12E2FEDA53DBC0E390044E3BB /* EmojiSelectorView.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EmojiSelectorView.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 27A8597A8FD4EAE7F466E05F1E0756B5 /* Pods-EmojiSelectorView_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-EmojiSelectorView_Example-acknowledgements.markdown"; sourceTree = ""; }; + 2B974A932DB5242E1EE1D30EAC0DD402 /* EmojiSelectorView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = EmojiSelectorView.modulemap; sourceTree = ""; }; + 2D2D117D630A279FAA616B20ECA33EDC /* EmojiSelectorViewOption.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorViewOption.swift; path = Pod/Classes/EmojiSelectorViewOption.swift; sourceTree = ""; }; + 2F1778D903D53B5C4E5B56404D75B865 /* EmojiSelectorViewDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorViewDelegate.swift; path = Pod/Classes/EmojiSelectorViewDelegate.swift; sourceTree = ""; }; + 307A897011155D7FAA8449E24E758267 /* EmojiSelectorView-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "EmojiSelectorView-Info.plist"; sourceTree = ""; }; 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 3C12C0786146C5DB619F1593ADAC8503 /* Pods-EmojiSelectorView_Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-EmojiSelectorView_Tests-Info.plist"; sourceTree = ""; }; 4705277B7290207BE08E25D46100C6B0 /* Pods-EmojiSelectorView_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-EmojiSelectorView_Tests.modulemap"; sourceTree = ""; }; 49FB8B84CD444A429A9FEE0311CC0B71 /* Pods-EmojiSelectorView_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-EmojiSelectorView_Example.release.xcconfig"; sourceTree = ""; }; 4A87C4E68A3D13428D55987315EB2A41 /* Pods-EmojiSelectorView_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-EmojiSelectorView_Example-umbrella.h"; sourceTree = ""; }; 4B79032E21611A31F229ACE463517B7D /* Pods-EmojiSelectorView_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-EmojiSelectorView_Tests-acknowledgements.markdown"; sourceTree = ""; }; + 506B38C7E14432F161992D8742A37AD8 /* EmojiSelectorView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "EmojiSelectorView-dummy.m"; sourceTree = ""; }; 60C0B68990B832A303E45B3CA15BAAFC /* Pods_EmojiSelectorView_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_EmojiSelectorView_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 616E810DD582BEFFDEAEAD68682A9F49 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 67C39957D3F4186F0D3CC7D4CC2C3F7C /* Pods-EmojiSelectorView_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-EmojiSelectorView_Example-dummy.m"; sourceTree = ""; }; - 6A1C7320D8A0390C039C8291962C9A13 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - 79D52CE154951E5AB2EAC7E613500282 /* EmojiSelectorView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "EmojiSelectorView-dummy.m"; sourceTree = ""; }; - 7A34BDE4254B94C000067081 /* UIView+contains.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+contains.swift"; sourceTree = ""; }; - 7A34BDEE254BC9BA00067081 /* UIView+animation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+animation.swift"; sourceTree = ""; }; - 7A34BDFE254D005200067081 /* EmojiSelectorView.Config+rect.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EmojiSelectorView.Config+rect.swift"; sourceTree = ""; }; - 8107FB9C18556C3BEDB6C18FA985F8DE /* EmojiSelectorViewDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorViewDelegate.swift; path = Pod/Classes/EmojiSelectorViewDelegate.swift; sourceTree = ""; }; - 814C5846B5A784B1E2D7898C3F07F8D4 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + 67F3F0B78AFC7EC63B79564EE5D28982 /* EmojiSelectorView.Config+rect.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EmojiSelectorView.Config+rect.swift"; sourceTree = ""; }; 86DB893EE585CCE838C5BEAD0F5E5769 /* Pods-EmojiSelectorView_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-EmojiSelectorView_Example-Info.plist"; sourceTree = ""; }; - 8DF2911012A9A236C5F2B6D4EB1D4094 /* CGRect+init.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CGRect+init.swift"; sourceTree = ""; }; - 8ECF3E37912BA7D17A22BC37D6307C67 /* EmojiSelectorView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EmojiSelectorView-prefix.pch"; sourceTree = ""; }; - 99E97F92E2DC86664BCB23B0AAF2E1F8 /* EmojiSelectorView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = EmojiSelectorView.xcconfig; sourceTree = ""; }; - 9BBF320B181C62265BE07F7F3F937F98 /* CGSize+init.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CGSize+init.swift"; sourceTree = ""; }; 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9E3BFC719A0E5349D1B417886BE8C0C1 /* CGSize+init.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CGSize+init.swift"; sourceTree = ""; }; 9FDA233E6B0FD7074B933CACA89B6CDB /* EmojiSelectorView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = EmojiSelectorView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A130A7406851411EF276BCEA4BF74603 /* EmojiSelectorView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EmojiSelectorView-umbrella.h"; sourceTree = ""; }; A77ABFACBA800F1C03986B5486627153 /* Pods-EmojiSelectorView_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-EmojiSelectorView_Tests.release.xcconfig"; sourceTree = ""; }; - B0BFC4C63056431C327840C9A2F5D946 /* EmojiSelectorViewConfig.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorViewConfig.swift; path = Pod/Classes/EmojiSelectorViewConfig.swift; sourceTree = ""; }; + B06571A91CE08950C4622A3C2F7A10EB /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + B5CA8C96CB08B7154D9CCE56ED69364C /* EmojiSelectorView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorView.swift; path = Pod/Classes/EmojiSelectorView.swift; sourceTree = ""; }; B7A4B27CBCB48B1DB9BB6003B172F94E /* Pods-EmojiSelectorView_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-EmojiSelectorView_Example.debug.xcconfig"; sourceTree = ""; }; B82AD4B0313FB795114174A120851C84 /* Pods-EmojiSelectorView_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-EmojiSelectorView_Example-acknowledgements.plist"; sourceTree = ""; }; B9F963A73C8AEEBF4C4FCDCAA70B5609 /* Pods-EmojiSelectorView_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-EmojiSelectorView_Tests-dummy.m"; sourceTree = ""; }; BE3F9920AB73920FC16557EC8A0BAC4C /* Pods-EmojiSelectorView_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-EmojiSelectorView_Tests.debug.xcconfig"; sourceTree = ""; }; BF32EF9B2E401A1B8685090B9D3C6506 /* Pods-EmojiSelectorView_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-EmojiSelectorView_Tests-frameworks.sh"; sourceTree = ""; }; - C13FA60CE88593E696D660CA9F728DA1 /* EmojiSelectorView.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = EmojiSelectorView.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - CA4FDA624318CBDB154216BF9409A1DE /* EmojiSelectorView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorView.swift; path = Pod/Classes/EmojiSelectorView.swift; sourceTree = ""; }; - D6370B9F98F542CAF50F51E753CB0076 /* EmojiSelectorView-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "EmojiSelectorView-Info.plist"; sourceTree = ""; }; + C8D27A3107B17523AA87E8C63FE5D495 /* UIView+animation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+animation.swift"; sourceTree = ""; }; + CB337ECC4A2221989E26F7BE836834BB /* UIView+contains.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+contains.swift"; sourceTree = ""; }; + D22BD036D3E76EAAF6910839023B8B6A /* EmojiSelectorView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "EmojiSelectorView-prefix.pch"; sourceTree = ""; }; + DF00FB1F9E33C4EE236407BFDFE25400 /* CGRect+init.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CGRect+init.swift"; sourceTree = ""; }; E11623859D4956E382B841D7924BC804 /* Pods_EmojiSelectorView_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_EmojiSelectorView_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E3BB0F35D9AE2C9D389E266D80E6B9F1 /* EmojiSelectorView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = EmojiSelectorView.modulemap; sourceTree = ""; }; - E9334105D5825404F166C525766B41F7 /* ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist"; sourceTree = ""; }; F25F78A6CC16DDCADDDBE6D074FB2CE7 /* Pods-EmojiSelectorView_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-EmojiSelectorView_Example-frameworks.sh"; sourceTree = ""; }; - FCFC282D68E8FA73FC68C363149CF175 /* EmojiSelectorViewOption.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EmojiSelectorViewOption.swift; path = Pod/Classes/EmojiSelectorViewOption.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 3910323FCB106E417D39B3EDCD0ED86A /* Frameworks */ = { + 9BF379F85F9B2855A2935638B520E283 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 47B7850C21378E9E227222744DCFFFA7 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - C202BB2377A27408ED9B0223D5F5CA2B /* Frameworks */ = { + B0F403C8091496FB7DD6CB38ABF5FC09 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 54ADEDD2BD9240FFD32A4E9352B0F1FF /* Foundation.framework in Frameworks */, + A12D07D733A8A82617F24091A2644435 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - D5A4FBF1ECB6A7CF3157BA5EBCCAFCE0 /* Frameworks */ = { + C202BB2377A27408ED9B0223D5F5CA2B /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 54ADEDD2BD9240FFD32A4E9352B0F1FF /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -133,6 +133,21 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 11D1541ECBD2356D407B504C24E2E527 /* EmojiSelectorView */ = { + isa = PBXGroup; + children = ( + B5CA8C96CB08B7154D9CCE56ED69364C /* EmojiSelectorView.swift */, + 0406831EA441661D97BE55D597C24DB9 /* EmojiSelectorViewConfig.swift */, + 2F1778D903D53B5C4E5B56404D75B865 /* EmojiSelectorViewDelegate.swift */, + 2D2D117D630A279FAA616B20ECA33EDC /* EmojiSelectorViewOption.swift */, + 20D7C036FD46743A50923B1639AB341C /* Extensions */, + 33D6841A6A6E5DCAC5227E8AE596D547 /* Pod */, + F04CE4DDF61D8AF7E84DC3B6F157FE86 /* Support Files */, + ); + name = EmojiSelectorView; + path = ../..; + sourceTree = ""; + }; 1BBC52D84BB93B87CBBAB8914569B363 /* Targets Support Files */ = { isa = PBXGroup; children = ( @@ -142,6 +157,19 @@ name = "Targets Support Files"; sourceTree = ""; }; + 20D7C036FD46743A50923B1639AB341C /* Extensions */ = { + isa = PBXGroup; + children = ( + DF00FB1F9E33C4EE236407BFDFE25400 /* CGRect+init.swift */, + 9E3BFC719A0E5349D1B417886BE8C0C1 /* CGSize+init.swift */, + 67F3F0B78AFC7EC63B79564EE5D28982 /* EmojiSelectorView.Config+rect.swift */, + C8D27A3107B17523AA87E8C63FE5D495 /* UIView+animation.swift */, + CB337ECC4A2221989E26F7BE836834BB /* UIView+contains.swift */, + ); + name = Extensions; + path = Pod/Classes/Extensions; + sourceTree = ""; + }; 24F8D88352705323A0D095F0EE142837 /* Pods-EmojiSelectorView_Tests */ = { isa = PBXGroup; children = ( @@ -159,67 +187,24 @@ path = "Target Support Files/Pods-EmojiSelectorView_Tests"; sourceTree = ""; }; - 453D180F3B03E75A0E5F67F909889BB9 /* Extensions */ = { - isa = PBXGroup; - children = ( - 7A34BDEE254BC9BA00067081 /* UIView+animation.swift */, - 8DF2911012A9A236C5F2B6D4EB1D4094 /* CGRect+init.swift */, - 9BBF320B181C62265BE07F7F3F937F98 /* CGSize+init.swift */, - 7A34BDE4254B94C000067081 /* UIView+contains.swift */, - 7A34BDFE254D005200067081 /* EmojiSelectorView.Config+rect.swift */, - ); - name = Extensions; - path = Pod/Classes/Extensions; - sourceTree = ""; - }; - 51A48CF9A39605D233BC3FC9BD729F44 /* Support Files */ = { + 33D6841A6A6E5DCAC5227E8AE596D547 /* Pod */ = { isa = PBXGroup; children = ( - E3BB0F35D9AE2C9D389E266D80E6B9F1 /* EmojiSelectorView.modulemap */, - 99E97F92E2DC86664BCB23B0AAF2E1F8 /* EmojiSelectorView.xcconfig */, - 79D52CE154951E5AB2EAC7E613500282 /* EmojiSelectorView-dummy.m */, - D6370B9F98F542CAF50F51E753CB0076 /* EmojiSelectorView-Info.plist */, - 8ECF3E37912BA7D17A22BC37D6307C67 /* EmojiSelectorView-prefix.pch */, - 0D1295DBEA16561C7799C7FCEEC17973 /* EmojiSelectorView-umbrella.h */, - E9334105D5825404F166C525766B41F7 /* ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist */, + 1B9BE80940CF223585D223117B61CD3C /* EmojiSelectorView.podspec */, + 616E810DD582BEFFDEAEAD68682A9F49 /* LICENSE */, + B06571A91CE08950C4622A3C2F7A10EB /* README.md */, ); - name = "Support Files"; - path = "Example/Pods/Target Support Files/EmojiSelectorView"; + name = Pod; sourceTree = ""; }; - 7BED6EB02697BE894A24D9BB13AC32A2 /* Development Pods */ = { + 34217A924EA2372C67838FA7CC94F381 /* Development Pods */ = { isa = PBXGroup; children = ( - 96B4955CB4870AB14C2B45C68227C542 /* EmojiSelectorView */, + 11D1541ECBD2356D407B504C24E2E527 /* EmojiSelectorView */, ); name = "Development Pods"; sourceTree = ""; }; - 96B4955CB4870AB14C2B45C68227C542 /* EmojiSelectorView */ = { - isa = PBXGroup; - children = ( - CA4FDA624318CBDB154216BF9409A1DE /* EmojiSelectorView.swift */, - B0BFC4C63056431C327840C9A2F5D946 /* EmojiSelectorViewConfig.swift */, - 8107FB9C18556C3BEDB6C18FA985F8DE /* EmojiSelectorViewDelegate.swift */, - FCFC282D68E8FA73FC68C363149CF175 /* EmojiSelectorViewOption.swift */, - 453D180F3B03E75A0E5F67F909889BB9 /* Extensions */, - AC322BA465FF8C3E8FC283D8F8C954F7 /* Pod */, - 51A48CF9A39605D233BC3FC9BD729F44 /* Support Files */, - ); - name = EmojiSelectorView; - path = ../..; - sourceTree = ""; - }; - AC322BA465FF8C3E8FC283D8F8C954F7 /* Pod */ = { - isa = PBXGroup; - children = ( - C13FA60CE88593E696D660CA9F728DA1 /* EmojiSelectorView.podspec */, - 6A1C7320D8A0390C039C8291962C9A13 /* LICENSE */, - 814C5846B5A784B1E2D7898C3F07F8D4 /* README.md */, - ); - name = Pod; - sourceTree = ""; - }; C0834CEBB1379A84116EF29F93051C60 /* iOS */ = { isa = PBXGroup; children = ( @@ -232,7 +217,7 @@ isa = PBXGroup; children = ( 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, - 7BED6EB02697BE894A24D9BB13AC32A2 /* Development Pods */, + 34217A924EA2372C67838FA7CC94F381 /* Development Pods */, D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */, E688808E4450D6EB82B93BA82636058B /* Products */, 1BBC52D84BB93B87CBBAB8914569B363 /* Targets Support Files */, @@ -258,6 +243,21 @@ name = Products; sourceTree = ""; }; + F04CE4DDF61D8AF7E84DC3B6F157FE86 /* Support Files */ = { + isa = PBXGroup; + children = ( + 2B974A932DB5242E1EE1D30EAC0DD402 /* EmojiSelectorView.modulemap */, + 1F3D6ED03872E50E63CB94D2F7F30019 /* EmojiSelectorView.xcconfig */, + 506B38C7E14432F161992D8742A37AD8 /* EmojiSelectorView-dummy.m */, + 307A897011155D7FAA8449E24E758267 /* EmojiSelectorView-Info.plist */, + D22BD036D3E76EAAF6910839023B8B6A /* EmojiSelectorView-prefix.pch */, + A130A7406851411EF276BCEA4BF74603 /* EmojiSelectorView-umbrella.h */, + 1F1CD5D0205314C26C4E094BDABB4675 /* ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist */, + ); + name = "Support Files"; + path = "Example/Pods/Target Support Files/EmojiSelectorView"; + sourceTree = ""; + }; F74E0C7C8A72A4AF81AC4AF5E91326F1 /* Pods-EmojiSelectorView_Example */ = { isa = PBXGroup; children = ( @@ -294,11 +294,11 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 926B9D3D353F39D56C4AF4A6C2D09F64 /* Headers */ = { + 7A01E34EEC84CA187493956649519515 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 0E5A924C8B75FDA2292DACC4C7884481 /* EmojiSelectorView-umbrella.h in Headers */, + 835CDD99BF2D1D2B70B5CEE77C265BE6 /* EmojiSelectorView-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -307,17 +307,17 @@ /* Begin PBXNativeTarget section */ 1D332AEEDB5E74D9CD9FDDAE4A776D4A /* EmojiSelectorView */ = { isa = PBXNativeTarget; - buildConfigurationList = 8C6A3E7611A580EF635EA78488C40C1B /* Build configuration list for PBXNativeTarget "EmojiSelectorView" */; + buildConfigurationList = 72785FCD159DBB9CFE1431C89650FC7D /* Build configuration list for PBXNativeTarget "EmojiSelectorView" */; buildPhases = ( - 926B9D3D353F39D56C4AF4A6C2D09F64 /* Headers */, - 61018FCF4631287DFC7EF43220E84F8B /* Sources */, - 3910323FCB106E417D39B3EDCD0ED86A /* Frameworks */, - 1131CE4ADF8A7C4BFC2A78447C4AEEE9 /* Resources */, + 7A01E34EEC84CA187493956649519515 /* Headers */, + 8235DEC98F5B1734F3EE2A52EBE5BF7F /* Sources */, + B0F403C8091496FB7DD6CB38ABF5FC09 /* Frameworks */, + 8934745CE8C9AEB7846A4B7E3092733C /* Resources */, ); buildRules = ( ); dependencies = ( - 0FE3CE70019E9C9378081887AAF18E7B /* PBXTargetDependency */, + DB782AF5D5266B9E0304C5F984749E6D /* PBXTargetDependency */, ); name = EmojiSelectorView; productName = EmojiSelectorView; @@ -345,11 +345,11 @@ }; D2C77D1FA998B98D6A884971D75417C3 /* EmojiSelectorView-EmojiSelectorView */ = { isa = PBXNativeTarget; - buildConfigurationList = 67F65540C82ADA31348CD42DF5658FC5 /* Build configuration list for PBXNativeTarget "EmojiSelectorView-EmojiSelectorView" */; + buildConfigurationList = EC3D51DE3F1B915D212CA951DAD7BF96 /* Build configuration list for PBXNativeTarget "EmojiSelectorView-EmojiSelectorView" */; buildPhases = ( - 4A44A9EF9865B4C72F482C1BE6EDB5DA /* Sources */, - D5A4FBF1ECB6A7CF3157BA5EBCCAFCE0 /* Frameworks */, - 8AC8585A8E5BE1FD13E36A27285D1A33 /* Resources */, + E5406FE305462350FBDDAD16891A4A9F /* Sources */, + 9BF379F85F9B2855A2935638B520E283 /* Frameworks */, + 8414B58BBB7D6845E86A039DA5AC2AEC /* Resources */, ); buildRules = ( ); @@ -410,25 +410,25 @@ /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 1131CE4ADF8A7C4BFC2A78447C4AEEE9 /* Resources */ = { + 698408C0105B0CE789441D367EC8C7EB /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 10CC54B464850065E6DE1E53A7B87D46 /* EmojiSelectorView.bundle in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 698408C0105B0CE789441D367EC8C7EB /* Resources */ = { + 8414B58BBB7D6845E86A039DA5AC2AEC /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 8AC8585A8E5BE1FD13E36A27285D1A33 /* Resources */ = { + 8934745CE8C9AEB7846A4B7E3092733C /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 6324E527CD9365644E495AF66F08E9B4 /* EmojiSelectorView.bundle in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -458,45 +458,45 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 4A44A9EF9865B4C72F482C1BE6EDB5DA /* Sources */ = { + 8235DEC98F5B1734F3EE2A52EBE5BF7F /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + DF8B036F698B8368F5BAB58C5389CF3B /* CGRect+init.swift in Sources */, + 7FBE450D32389259E778E42EDA28D4FF /* CGSize+init.swift in Sources */, + 347435B8CD6C5DE596BEEC77B76B77D4 /* EmojiSelectorView-dummy.m in Sources */, + 9535F05FA147D752969BD8030047EAD5 /* EmojiSelectorView.Config+rect.swift in Sources */, + F37F1BF47391493AB0DCC964EE0AE3FF /* EmojiSelectorView.swift in Sources */, + 1806FA78885927B8DCE0CE08CB3C91F3 /* EmojiSelectorViewConfig.swift in Sources */, + 6F611BD4D582E14D5CFA4A158DFEDCA5 /* EmojiSelectorViewDelegate.swift in Sources */, + BE662EF929C8AB8E7949647825AAAEA7 /* EmojiSelectorViewOption.swift in Sources */, + 43EB5A601CF524245F654A5E7447E40D /* UIView+animation.swift in Sources */, + 535400CC279EBE3CB538CCD3CFB924B9 /* UIView+contains.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 61018FCF4631287DFC7EF43220E84F8B /* Sources */ = { + E5406FE305462350FBDDAD16891A4A9F /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 85CB39A5AABE21C73030DB5FE1024250 /* CGRect+init.swift in Sources */, - 2678F31335E857CBB94C3AEBED19F653 /* CGSize+init.swift in Sources */, - 7A34BDEF254BC9BA00067081 /* UIView+animation.swift in Sources */, - 848B385E9305205A802100B71061D9FD /* EmojiSelectorView-dummy.m in Sources */, - E786A40A908BDED9AF542CE49A7E1930 /* EmojiSelectorView.swift in Sources */, - ED1F943FC0C71899F1DAF2C2C5FC0915 /* EmojiSelectorViewConfig.swift in Sources */, - 7A34BDE5254B94C000067081 /* UIView+contains.swift in Sources */, - 7A34BDFF254D005200067081 /* EmojiSelectorView.Config+rect.swift in Sources */, - BF6E731C71D2F6963367EBB90628C488 /* EmojiSelectorViewDelegate.swift in Sources */, - 31270D34A4FC472F2D1DA5B7F2BE332A /* EmojiSelectorViewOption.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 0FE3CE70019E9C9378081887AAF18E7B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "EmojiSelectorView-EmojiSelectorView"; - target = D2C77D1FA998B98D6A884971D75417C3 /* EmojiSelectorView-EmojiSelectorView */; - targetProxy = 8E5DB072889219987478C77219370A2C /* PBXContainerItemProxy */; - }; 822A05A60AFDDCBD301B637FD6679928 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = EmojiSelectorView; target = 1D332AEEDB5E74D9CD9FDDAE4A776D4A /* EmojiSelectorView */; targetProxy = 5EBE00A3737FB6CF1C00A58811645C93 /* PBXContainerItemProxy */; }; + DB782AF5D5266B9E0304C5F984749E6D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "EmojiSelectorView-EmojiSelectorView"; + target = D2C77D1FA998B98D6A884971D75417C3 /* EmojiSelectorView-EmojiSelectorView */; + targetProxy = 290D0A20D8D4A412E8AB40C841C31882 /* PBXContainerItemProxy */; + }; E5382B373668DAF123A78389DE1E2789 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = EmojiSelectorView; @@ -506,73 +506,7 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 05D95D44630624BE0F2985939EABD188 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BE3F9920AB73920FC16557EC8A0BAC4C /* Pods-EmojiSelectorView_Tests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-EmojiSelectorView_Tests/Pods-EmojiSelectorView_Tests-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-EmojiSelectorView_Tests/Pods-EmojiSelectorView_Tests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 0AE9FA245B0CE64BE03A054B23DD50D6 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 99E97F92E2DC86664BCB23B0AAF2E1F8 /* EmojiSelectorView.xcconfig */; - buildSettings = { - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/EmojiSelectorView/EmojiSelectorView-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView.modulemap"; - PRODUCT_MODULE_NAME = EmojiSelectorView; - PRODUCT_NAME = EmojiSelectorView; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 131356BE54884448CA49C07BEDF4BB2A /* Debug */ = { + 1422B121EAEAEA11307496903FA623C6 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -606,16 +540,13 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; 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", + "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -624,22 +555,37 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; 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_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 5.0; SYMROOT = "${SRCROOT}/../build"; }; - name = Debug; + name = Release; }; - 143DA0452AC08E3D2FDFCC6060C58B3E /* Release */ = { + 2018A2A9F0C0DE9D578CF4AF67D499EB /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 49FB8B84CD444A429A9FEE0311CC0B71 /* Pods-EmojiSelectorView_Example.release.xcconfig */; + baseConfigurationReference = 1F3D6ED03872E50E63CB94D2F7F30019 /* EmojiSelectorView.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/EmojiSelectorView"; + IBSC_MODULE = EmojiSelectorView; + INFOPLIST_FILE = "Target Support Files/EmojiSelectorView/ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + PRODUCT_NAME = EmojiSelectorView; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + WRAPPER_EXTENSION = bundle; + }; + name = Release; + }; + 59345631CAC3718778C83E85CDBE3915 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = BE3F9920AB73920FC16557EC8A0BAC4C /* Pods-EmojiSelectorView_Tests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; @@ -652,12 +598,12 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-EmojiSelectorView_Example/Pods-EmojiSelectorView_Example-Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-EmojiSelectorView_Tests/Pods-EmojiSelectorView_Tests-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-EmojiSelectorView_Example/Pods-EmojiSelectorView_Example.modulemap"; + MODULEMAP_FILE = "Target Support Files/Pods-EmojiSelectorView_Tests/Pods-EmojiSelectorView_Tests.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -666,38 +612,20 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; - }; - 208B02A12B537D3A484E1B9F5E2575DD /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 99E97F92E2DC86664BCB23B0AAF2E1F8 /* EmojiSelectorView.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = "iPhone Developer"; - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/EmojiSelectorView"; - IBSC_MODULE = EmojiSelectorView; - INFOPLIST_FILE = "Target Support Files/EmojiSelectorView/ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - PRODUCT_NAME = EmojiSelectorView; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = bundle; - }; - name = Release; + name = Debug; }; - 2C52647EC5050D0F139927E60E7AA6B4 /* Debug */ = { + 80CFBEF44FBF5E23445CC4B1E9978D99 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 99E97F92E2DC86664BCB23B0AAF2E1F8 /* EmojiSelectorView.xcconfig */; + baseConfigurationReference = 1F3D6ED03872E50E63CB94D2F7F30019 /* EmojiSelectorView.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/EmojiSelectorView"; IBSC_MODULE = EmojiSelectorView; INFOPLIST_FILE = "Target Support Files/EmojiSelectorView/ResourceBundle-EmojiSelectorView-EmojiSelectorView-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; PRODUCT_NAME = EmojiSelectorView; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -706,7 +634,7 @@ }; name = Debug; }; - 6391B7EE692B166F862DEB6F94D78D16 /* Debug */ = { + 9538A79F54E916DBA98230D8364EB72B /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = B7A4B27CBCB48B1DB9BB6003B172F94E /* Pods-EmojiSelectorView_Example.debug.xcconfig */; buildSettings = { @@ -723,7 +651,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "Target Support Files/Pods-EmojiSelectorView_Example/Pods-EmojiSelectorView_Example-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-EmojiSelectorView_Example/Pods-EmojiSelectorView_Example.modulemap"; @@ -740,9 +668,9 @@ }; name = Debug; }; - 67F90FEA77FA1B005B8EB2178B5BED51 /* Debug */ = { + D31E93F4C917BD966D5A3FBB8A0D78FA /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 99E97F92E2DC86664BCB23B0AAF2E1F8 /* EmojiSelectorView.xcconfig */; + baseConfigurationReference = 1F3D6ED03872E50E63CB94D2F7F30019 /* EmojiSelectorView.xcconfig */; buildSettings = { CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; @@ -757,7 +685,7 @@ GCC_PREFIX_HEADER = "Target Support Files/EmojiSelectorView/EmojiSelectorView-prefix.pch"; INFOPLIST_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView.modulemap"; PRODUCT_MODULE_NAME = EmojiSelectorView; @@ -771,7 +699,42 @@ }; name = Debug; }; - CE55BBAAE3880954565C4DA957BA8905 /* Release */ = { + D48564B1D69AA39814BD18EF38ED2E8F /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 49FB8B84CD444A429A9FEE0311CC0B71 /* Pods-EmojiSelectorView_Example.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-EmojiSelectorView_Example/Pods-EmojiSelectorView_Example-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-EmojiSelectorView_Example/Pods-EmojiSelectorView_Example.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + E1F916217C883333F53FE5EB474C3D55 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = A77ABFACBA800F1C03986B5486627153 /* Pods-EmojiSelectorView_Tests.release.xcconfig */; buildSettings = { @@ -788,7 +751,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "Target Support Files/Pods-EmojiSelectorView_Tests/Pods-EmojiSelectorView_Tests-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-EmojiSelectorView_Tests/Pods-EmojiSelectorView_Tests.modulemap"; @@ -806,7 +769,7 @@ }; name = Release; }; - F090CD07A80273D5A73C8EA19224ADDB /* Release */ = { + ED7888FA6713EABBF66D26A8003AD1CA /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -840,13 +803,16 @@ 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; + 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_RELEASE=1", + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -855,15 +821,49 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - MTL_ENABLE_DEBUG_INFO = NO; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; SYMROOT = "${SRCROOT}/../build"; }; + name = Debug; + }; + F79BC9B07559710EFBDE2F829862712A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1F3D6ED03872E50E63CB94D2F7F30019 /* EmojiSelectorView.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/EmojiSelectorView/EmojiSelectorView-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/EmojiSelectorView/EmojiSelectorView.modulemap"; + PRODUCT_MODULE_NAME = EmojiSelectorView; + PRODUCT_NAME = EmojiSelectorView; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; name = Release; }; /* End XCBuildConfiguration section */ @@ -872,8 +872,8 @@ 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 131356BE54884448CA49C07BEDF4BB2A /* Debug */, - F090CD07A80273D5A73C8EA19224ADDB /* Release */, + ED7888FA6713EABBF66D26A8003AD1CA /* Debug */, + 1422B121EAEAEA11307496903FA623C6 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -881,35 +881,35 @@ 59A67A81BA477538907215B9A26E59F5 /* Build configuration list for PBXNativeTarget "Pods-EmojiSelectorView_Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - 6391B7EE692B166F862DEB6F94D78D16 /* Debug */, - 143DA0452AC08E3D2FDFCC6060C58B3E /* Release */, + 9538A79F54E916DBA98230D8364EB72B /* Debug */, + D48564B1D69AA39814BD18EF38ED2E8F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 67F65540C82ADA31348CD42DF5658FC5 /* Build configuration list for PBXNativeTarget "EmojiSelectorView-EmojiSelectorView" */ = { + 72785FCD159DBB9CFE1431C89650FC7D /* Build configuration list for PBXNativeTarget "EmojiSelectorView" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2C52647EC5050D0F139927E60E7AA6B4 /* Debug */, - 208B02A12B537D3A484E1B9F5E2575DD /* Release */, + D31E93F4C917BD966D5A3FBB8A0D78FA /* Debug */, + F79BC9B07559710EFBDE2F829862712A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 8C6A3E7611A580EF635EA78488C40C1B /* Build configuration list for PBXNativeTarget "EmojiSelectorView" */ = { + A2927E4F43907AB7B95B1E8719811A3F /* Build configuration list for PBXNativeTarget "Pods-EmojiSelectorView_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 67F90FEA77FA1B005B8EB2178B5BED51 /* Debug */, - 0AE9FA245B0CE64BE03A054B23DD50D6 /* Release */, + 59345631CAC3718778C83E85CDBE3915 /* Debug */, + E1F916217C883333F53FE5EB474C3D55 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A2927E4F43907AB7B95B1E8719811A3F /* Build configuration list for PBXNativeTarget "Pods-EmojiSelectorView_Tests" */ = { + EC3D51DE3F1B915D212CA951DAD7BF96 /* Build configuration list for PBXNativeTarget "EmojiSelectorView-EmojiSelectorView" */ = { isa = XCConfigurationList; buildConfigurations = ( - 05D95D44630624BE0F2985939EABD188 /* Debug */, - CE55BBAAE3880954565C4DA957BA8905 /* Release */, + 80CFBEF44FBF5E23445CC4B1E9978D99 /* Debug */, + 2018A2A9F0C0DE9D578CF4AF67D499EB /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Pod/Classes/EmojiSelectorView.swift b/Pod/Classes/EmojiSelectorView.swift index 33f6a62..4d50f81 100644 --- a/Pod/Classes/EmojiSelectorView.swift +++ b/Pod/Classes/EmojiSelectorView.swift @@ -13,8 +13,7 @@ public final class EmojiSelectorView: UIButton { private let sizeBeforeOpen: CGFloat = 10 public weak var delegate: EmojiSelectorViewDelegate? - - public var items: [EmojiSelectorViewOption] + public weak var dataSource: EmojiSelectorViewDataSource? private var isActive: Bool = false @@ -38,7 +37,7 @@ public final class EmojiSelectorView: UIButton { private let config: EmojiSelectorView.Config private var rootView: UIView? { - return UIApplication.shared.keyWindow?.rootViewController?.view + UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.view } // MARK: - View lifecycle @@ -48,9 +47,8 @@ public final class EmojiSelectorView: UIButton { /// - Parameters: /// - frame: Frame of the button will open the selector /// - config: The custom configuration for the UI components. - public init(frame: CGRect, items: [EmojiSelectorViewOption]) { + public override init(frame: CGRect) { self.config = .default - self.items = items super.init(frame: frame) addGestureRecognizer(UILongPressGestureRecognizer(target: self, @@ -60,7 +58,6 @@ public final class EmojiSelectorView: UIButton { required public init?(coder aDecoder: NSCoder) { self.config = .default - self.items = [] super.init(coder: aDecoder) addGestureRecognizer(UILongPressGestureRecognizer(target: self, @@ -84,16 +81,22 @@ public final class EmojiSelectorView: UIButton { } private func expand() { + guard let dataSource = dataSource else { + return + } + selectedItem = nil isActive = true + let itemsCount = dataSource.numberOfOptions(in: self) + let originPoint = rootView?.convert(frame.origin, to: nil) ?? .zero - optionsView.frame = config.rect(items: items.count, + optionsView.frame = config.rect(items: itemsCount, originalPos: originPoint, trait: UIScreen.main.traitCollection) let config = self.config - let sizeBtn = CGSize(width: xPosition(for: items.count), height: config.heightForSize) + let sizeBtn = CGSize(width: xPosition(for: itemsCount), height: config.heightForSize) rootView?.addSubview(optionsView) @@ -101,11 +104,11 @@ public final class EmojiSelectorView: UIButton { self.optionsView.alpha = 1 } - for index in 0.. Int + + /// Asks the data source for the view of the specific item. + func emojiSelector(_ selector: EmojiSelectorView, viewForIndex index: Int) -> UIView + + /// Asks the data source for the name of the specific item. + func emojiSelector(_ selector: EmojiSelectorView, nameForIndex index: Int) -> String +} diff --git a/Pod/Classes/EmojiSelectorViewOption.swift b/Pod/Classes/EmojiSelectorViewOption.swift index c096e83..8e986fe 100644 --- a/Pod/Classes/EmojiSelectorViewOption.swift +++ b/Pod/Classes/EmojiSelectorViewOption.swift @@ -5,17 +5,20 @@ // Created by Jorge R Ovalle Z on 4/6/18. // -import Foundation +import UIKit /// A type that represents the option of a selector. -public struct EmojiSelectorViewOption { +public class EmojiSelectorViewOption { /// The image will be used for the option represented. /// (This image should be added to the bundle). - let image: String + let image: UIImage /// The name of the option represented. let name: String + + /// Whether use or not a systemName (SF Symbols) + let nameType: ImageType /// Creates an instance of `JOEmojiableOption`. /// @@ -23,8 +26,14 @@ public struct EmojiSelectorViewOption { /// - image: The image will be used for the option represented. /// (This image should be added to the bundle). /// - name: The name of the option represented. - public init(image: String, name: String) { + public init(image: UIImage, name: String, nameType: ImageType = .name) { self.image = image self.name = name + self.nameType = nameType + } + + public enum ImageType { + case name + case systemName } } From f9c2ace99b5e0c086fc54ad0ba9167e807db45e5 Mon Sep 17 00:00:00 2001 From: Jorge Ovalle Date: Sat, 31 Oct 2020 13:51:42 -0600 Subject: [PATCH 13/15] Reduce complexity on logic both for sample and core --- .../Base.lproj/Main.storyboard | 22 ++++-- .../SampleViewController.swift | 26 +++++++ Example/Pods/Pods.xcodeproj/project.pbxproj | 4 -- Pod/Classes/EmojiSelectorView.swift | 71 ++++++++----------- Pod/Classes/EmojiSelectorViewConfig.swift | 6 +- Pod/Classes/EmojiSelectorViewOption.swift | 39 ---------- README.md | 3 - 7 files changed, 79 insertions(+), 92 deletions(-) delete mode 100644 Pod/Classes/EmojiSelectorViewOption.swift diff --git a/Example/EmojiSelectorView/Base.lproj/Main.storyboard b/Example/EmojiSelectorView/Base.lproj/Main.storyboard index a5e23ce..8984ad1 100644 --- a/Example/EmojiSelectorView/Base.lproj/Main.storyboard +++ b/Example/EmojiSelectorView/Base.lproj/Main.storyboard @@ -21,14 +21,23 @@ -