diff --git a/ButtonClickStyle.podspec b/ButtonClickStyle.podspec index 3464434..e1826b6 100644 --- a/ButtonClickStyle.podspec +++ b/ButtonClickStyle.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'ButtonClickStyle' - s.version = '1.0.5' + s.version = '1.1.0' s.summary = 'This is a customizable designable button view. Inside layer you can style button, create your own subviews. Choose 9 click animation styles' # This description is used to generate tags and improve search results. diff --git a/Example/ButtonClickStyle.xcodeproj/project.pbxproj b/Example/ButtonClickStyle.xcodeproj/project.pbxproj index e506139..aaca286 100644 --- a/Example/ButtonClickStyle.xcodeproj/project.pbxproj +++ b/Example/ButtonClickStyle.xcodeproj/project.pbxproj @@ -11,7 +11,6 @@ 4A14CBDB2803437C00DA8A68 /* ButtonClickStyleShort.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A14CBC52803437C00DA8A68 /* ButtonClickStyleShort.swift */; }; 4A14CBDC2803437C00DA8A68 /* ButtonClickStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A14CBC62803437C00DA8A68 /* ButtonClickStyle.swift */; }; 4A14CBDD2803437C00DA8A68 /* ButtonClickStyleBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A14CBC72803437C00DA8A68 /* ButtonClickStyleBase.swift */; }; - 4A14CBDE2803437C00DA8A68 /* ButtonClickStyleEmoji.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A14CBC82803437C00DA8A68 /* ButtonClickStyleEmoji.swift */; }; 4A14CBDF2803437C00DA8A68 /* ButtonClickStyleGestureRecognizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A14CBC92803437C00DA8A68 /* ButtonClickStyleGestureRecognizer.swift */; }; 4A14CBE02803437C00DA8A68 /* ButtonClickState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A14CBCB2803437C00DA8A68 /* ButtonClickState.swift */; }; 4A14CBE12803437C00DA8A68 /* ButtonClick.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A14CBCC2803437C00DA8A68 /* ButtonClick.swift */; }; @@ -28,17 +27,13 @@ 4A14CBEC2803437C00DA8A68 /* UIView+AnimationFlash.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A14CBD82803437C00DA8A68 /* UIView+AnimationFlash.swift */; }; 4A14CBED2803437C00DA8A68 /* UIView+AnimationPress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A14CBD92803437C00DA8A68 /* UIView+AnimationPress.swift */; }; 4A14CBEE2803437C00DA8A68 /* ButtonClickStyleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A14CBDA2803437C00DA8A68 /* ButtonClickStyleView.swift */; }; + 4A231B7A280A82250073284C /* ButtonClickStyleEmoji.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A231B79280A82250073284C /* ButtonClickStyleEmoji.swift */; }; 4A4545C52806C7570041D039 /* ButtonTableListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4545C32806C7570041D039 /* ButtonTableListViewController.swift */; }; 4A4545C62806C7570041D039 /* ButtonTableListViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4A4545C42806C7570041D039 /* ButtonTableListViewController.storyboard */; }; - 4A62F3722803115C00534ABA /* DesignableLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A62F30D2803115C00534ABA /* DesignableLabel.swift */; }; - 4A62F3732803115C00534ABA /* DesignableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A62F30E2803115C00534ABA /* DesignableView.swift */; }; - 4A62F3742803115C00534ABA /* DispatchQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A62F30F2803115C00534ABA /* DispatchQueue.swift */; }; + 4A62F3722803115C00534ABA /* ButtonClickStyleDesignLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A62F30D2803115C00534ABA /* ButtonClickStyleDesignLabel.swift */; }; + 4A62F3732803115C00534ABA /* ButtonClickStyleDesignView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A62F30E2803115C00534ABA /* ButtonClickStyleDesignView.swift */; }; 4A62F3752803115C00534ABA /* StoryboardController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A62F3112803115C00534ABA /* StoryboardController.swift */; }; 4A62F3762803115C00534ABA /* XibView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A62F3122803115C00534ABA /* XibView.swift */; }; - 4A62F3772803115C00534ABA /* Proxima Nova Semibold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 4A62F3142803115C00534ABA /* Proxima Nova Semibold.otf */; }; - 4A62F3782803115C00534ABA /* Proxima Nova Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 4A62F3152803115C00534ABA /* Proxima Nova Bold.otf */; }; - 4A62F3792803115C00534ABA /* ScreenDevice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A62F3162803115C00534ABA /* ScreenDevice.swift */; }; - 4A62F37A2803115C00534ABA /* UIView+Positions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A62F3172803115C00534ABA /* UIView+Positions.swift */; }; 4A62F37B2803115C00534ABA /* FirefoxButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A62F31B2803115C00534ABA /* FirefoxButtonView.swift */; }; 4A62F37C2803115C00534ABA /* FirefoxButtonView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4A62F31C2803115C00534ABA /* FirefoxButtonView.xib */; }; 4A62F37D2803115C00534ABA /* BuyNowButtonView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4A62F31E2803115C00534ABA /* BuyNowButtonView.xib */; }; @@ -84,7 +79,6 @@ 4A85B5A32803D59800DFD435 /* UIView+AnimationGlare.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5A22803D59800DFD435 /* UIView+AnimationGlare.swift */; }; 4A85B5A82803EBA400DFD435 /* ButtonListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5A62803EBA400DFD435 /* ButtonListCell.swift */; }; 4A85B5A92803EBA400DFD435 /* ButtonListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4A85B5A72803EBA400DFD435 /* ButtonListCell.xib */; }; - 4A85B5CF2803EBFE00DFD435 /* TextAdapterField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5AB2803EBFD00DFD435 /* TextAdapterField.swift */; }; 4A85B5D02803EBFE00DFD435 /* TableAdapterView+AddGradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5AD2803EBFD00DFD435 /* TableAdapterView+AddGradient.swift */; }; 4A85B5D12803EBFE00DFD435 /* TableAdapterView+Delegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5AE2803EBFD00DFD435 /* TableAdapterView+Delegate.swift */; }; 4A85B5D22803EBFE00DFD435 /* TableAdapterView+CallbackTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5AF2803EBFD00DFD435 /* TableAdapterView+CallbackTypes.swift */; }; @@ -96,18 +90,9 @@ 4A85B5D82803EBFE00DFD435 /* TableAdapterCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5B62803EBFD00DFD435 /* TableAdapterCell.swift */; }; 4A85B5D92803EBFE00DFD435 /* TitleTextCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4A85B5B82803EBFD00DFD435 /* TitleTextCell.xib */; }; 4A85B5DA2803EBFE00DFD435 /* TitleTextCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5B92803EBFD00DFD435 /* TitleTextCell.swift */; }; - 4A85B5DB2803EBFE00DFD435 /* MainCollectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5BB2803EBFD00DFD435 /* MainCollectionCell.swift */; }; - 4A85B5DC2803EBFE00DFD435 /* MainCollectionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4A85B5BC2803EBFD00DFD435 /* MainCollectionCell.xib */; }; 4A85B5DD2803EBFE00DFD435 /* TableAdapterView+DataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5BD2803EBFD00DFD435 /* TableAdapterView+DataSource.swift */; }; 4A85B5DE2803EBFE00DFD435 /* TableAdapterView+ScrollDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5BE2803EBFD00DFD435 /* TableAdapterView+ScrollDelegate.swift */; }; 4A85B5DF2803EBFE00DFD435 /* TableAdapterView+AddRefresh.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5BF2803EBFD00DFD435 /* TableAdapterView+AddRefresh.swift */; }; - 4A85B5E22803EBFE00DFD435 /* UICollectionViewLeftAlignedLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5C72803EBFD00DFD435 /* UICollectionViewLeftAlignedLayout.swift */; }; - 4A85B5E32803EBFE00DFD435 /* UICollectionViewCenteredFlowLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5C82803EBFE00DFD435 /* UICollectionViewCenteredFlowLayout.swift */; }; - 4A85B5E42803EBFE00DFD435 /* CollectionAdapterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5C92803EBFE00DFD435 /* CollectionAdapterView.swift */; }; - 4A85B5E52803EBFE00DFD435 /* CollectionAdapterItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5CB2803EBFE00DFD435 /* CollectionAdapterItem.swift */; }; - 4A85B5E62803EBFE00DFD435 /* CollectionAdapterCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5CC2803EBFE00DFD435 /* CollectionAdapterCell.swift */; }; - 4A85B5E72803EBFE00DFD435 /* CollectionAdapterCellData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5CD2803EBFE00DFD435 /* CollectionAdapterCellData.swift */; }; - 4A85B5E82803EBFE00DFD435 /* CollectionAdapterTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85B5CE2803EBFE00DFD435 /* CollectionAdapterTypes.swift */; }; 4ADE26E42803837C00634B6C /* ExampleButtonsViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4ADE26E22803837C00634B6C /* ExampleButtonsViewController.storyboard */; }; 4ADE26E52803837C00634B6C /* ExampleButtonsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ADE26E32803837C00634B6C /* ExampleButtonsViewController.swift */; }; 4ADE26E7280383DC00634B6C /* ButtonClickStyle+Buttons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ADE26E6280383DC00634B6C /* ButtonClickStyle+Buttons.swift */; }; @@ -126,7 +111,6 @@ 4A14CBC52803437C00DA8A68 /* ButtonClickStyleShort.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonClickStyleShort.swift; sourceTree = ""; }; 4A14CBC62803437C00DA8A68 /* ButtonClickStyle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonClickStyle.swift; sourceTree = ""; }; 4A14CBC72803437C00DA8A68 /* ButtonClickStyleBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonClickStyleBase.swift; sourceTree = ""; }; - 4A14CBC82803437C00DA8A68 /* ButtonClickStyleEmoji.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonClickStyleEmoji.swift; sourceTree = ""; }; 4A14CBC92803437C00DA8A68 /* ButtonClickStyleGestureRecognizer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonClickStyleGestureRecognizer.swift; sourceTree = ""; }; 4A14CBCB2803437C00DA8A68 /* ButtonClickState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonClickState.swift; sourceTree = ""; }; 4A14CBCC2803437C00DA8A68 /* ButtonClick.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonClick.swift; sourceTree = ""; }; @@ -143,17 +127,13 @@ 4A14CBD82803437C00DA8A68 /* UIView+AnimationFlash.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+AnimationFlash.swift"; sourceTree = ""; }; 4A14CBD92803437C00DA8A68 /* UIView+AnimationPress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+AnimationPress.swift"; sourceTree = ""; }; 4A14CBDA2803437C00DA8A68 /* ButtonClickStyleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonClickStyleView.swift; sourceTree = ""; }; + 4A231B79280A82250073284C /* ButtonClickStyleEmoji.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonClickStyleEmoji.swift; sourceTree = ""; }; 4A4545C32806C7570041D039 /* ButtonTableListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonTableListViewController.swift; sourceTree = ""; }; 4A4545C42806C7570041D039 /* ButtonTableListViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = ButtonTableListViewController.storyboard; sourceTree = ""; }; - 4A62F30D2803115C00534ABA /* DesignableLabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DesignableLabel.swift; sourceTree = ""; }; - 4A62F30E2803115C00534ABA /* DesignableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DesignableView.swift; sourceTree = ""; }; - 4A62F30F2803115C00534ABA /* DispatchQueue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DispatchQueue.swift; sourceTree = ""; }; + 4A62F30D2803115C00534ABA /* ButtonClickStyleDesignLabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonClickStyleDesignLabel.swift; sourceTree = ""; }; + 4A62F30E2803115C00534ABA /* ButtonClickStyleDesignView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonClickStyleDesignView.swift; sourceTree = ""; }; 4A62F3112803115C00534ABA /* StoryboardController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardController.swift; sourceTree = ""; }; 4A62F3122803115C00534ABA /* XibView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XibView.swift; sourceTree = ""; }; - 4A62F3142803115C00534ABA /* Proxima Nova Semibold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Proxima Nova Semibold.otf"; sourceTree = ""; }; - 4A62F3152803115C00534ABA /* Proxima Nova Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Proxima Nova Bold.otf"; sourceTree = ""; }; - 4A62F3162803115C00534ABA /* ScreenDevice.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScreenDevice.swift; sourceTree = ""; }; - 4A62F3172803115C00534ABA /* UIView+Positions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Positions.swift"; sourceTree = ""; }; 4A62F31B2803115C00534ABA /* FirefoxButtonView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FirefoxButtonView.swift; sourceTree = ""; }; 4A62F31C2803115C00534ABA /* FirefoxButtonView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FirefoxButtonView.xib; sourceTree = ""; }; 4A62F31E2803115C00534ABA /* BuyNowButtonView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BuyNowButtonView.xib; sourceTree = ""; }; @@ -199,7 +179,6 @@ 4A85B5A22803D59800DFD435 /* UIView+AnimationGlare.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+AnimationGlare.swift"; sourceTree = ""; }; 4A85B5A62803EBA400DFD435 /* ButtonListCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonListCell.swift; sourceTree = ""; }; 4A85B5A72803EBA400DFD435 /* ButtonListCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ButtonListCell.xib; sourceTree = ""; }; - 4A85B5AB2803EBFD00DFD435 /* TextAdapterField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextAdapterField.swift; sourceTree = ""; }; 4A85B5AD2803EBFD00DFD435 /* TableAdapterView+AddGradient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "TableAdapterView+AddGradient.swift"; sourceTree = ""; }; 4A85B5AE2803EBFD00DFD435 /* TableAdapterView+Delegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "TableAdapterView+Delegate.swift"; sourceTree = ""; }; 4A85B5AF2803EBFD00DFD435 /* TableAdapterView+CallbackTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "TableAdapterView+CallbackTypes.swift"; sourceTree = ""; }; @@ -211,24 +190,15 @@ 4A85B5B62803EBFD00DFD435 /* TableAdapterCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableAdapterCell.swift; sourceTree = ""; }; 4A85B5B82803EBFD00DFD435 /* TitleTextCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TitleTextCell.xib; sourceTree = ""; }; 4A85B5B92803EBFD00DFD435 /* TitleTextCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TitleTextCell.swift; sourceTree = ""; }; - 4A85B5BB2803EBFD00DFD435 /* MainCollectionCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainCollectionCell.swift; sourceTree = ""; }; - 4A85B5BC2803EBFD00DFD435 /* MainCollectionCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainCollectionCell.xib; sourceTree = ""; }; 4A85B5BD2803EBFD00DFD435 /* TableAdapterView+DataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "TableAdapterView+DataSource.swift"; sourceTree = ""; }; 4A85B5BE2803EBFD00DFD435 /* TableAdapterView+ScrollDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "TableAdapterView+ScrollDelegate.swift"; sourceTree = ""; }; 4A85B5BF2803EBFD00DFD435 /* TableAdapterView+AddRefresh.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "TableAdapterView+AddRefresh.swift"; sourceTree = ""; }; - 4A85B5C72803EBFD00DFD435 /* UICollectionViewLeftAlignedLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UICollectionViewLeftAlignedLayout.swift; sourceTree = ""; }; - 4A85B5C82803EBFE00DFD435 /* UICollectionViewCenteredFlowLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UICollectionViewCenteredFlowLayout.swift; sourceTree = ""; }; - 4A85B5C92803EBFE00DFD435 /* CollectionAdapterView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionAdapterView.swift; sourceTree = ""; }; - 4A85B5CB2803EBFE00DFD435 /* CollectionAdapterItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionAdapterItem.swift; sourceTree = ""; }; - 4A85B5CC2803EBFE00DFD435 /* CollectionAdapterCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionAdapterCell.swift; sourceTree = ""; }; - 4A85B5CD2803EBFE00DFD435 /* CollectionAdapterCellData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionAdapterCellData.swift; sourceTree = ""; }; - 4A85B5CE2803EBFE00DFD435 /* CollectionAdapterTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionAdapterTypes.swift; sourceTree = ""; }; 4ADE26E22803837C00634B6C /* ExampleButtonsViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = ExampleButtonsViewController.storyboard; sourceTree = ""; }; 4ADE26E32803837C00634B6C /* ExampleButtonsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleButtonsViewController.swift; sourceTree = ""; }; 4ADE26E6280383DC00634B6C /* ButtonClickStyle+Buttons.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ButtonClickStyle+Buttons.swift"; sourceTree = ""; }; 4F15AAFA673DA24A3C49A947 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 585C1A339472B772504181DB /* Pods_ButtonClickStyle_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ButtonClickStyle_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 607FACD01AFB9204008FA782 /* ButtonClickStyle_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ButtonClickStyle_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 607FACD01AFB9204008FA782 /* ButtonClickStyle.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ButtonClickStyle.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 = ""; }; @@ -265,7 +235,7 @@ isa = PBXGroup; children = ( 4A14CBCF2803437C00DA8A68 /* Animations */, - 4A62F30B2803115C00534ABA /* Utils */, + 4A62F30C2803115C00534ABA /* UIDesignable */, 4A14CBC42803437C00DA8A68 /* Style */, 4A14CBCE2803437C00DA8A68 /* ButtonClickStyleAddViewsAnimation.swift */, 4A14CBDA2803437C00DA8A68 /* ButtonClickStyleView.swift */, @@ -281,8 +251,8 @@ children = ( 4A14CBC52803437C00DA8A68 /* ButtonClickStyleShort.swift */, 4A14CBC62803437C00DA8A68 /* ButtonClickStyle.swift */, + 4A231B79280A82250073284C /* ButtonClickStyleEmoji.swift */, 4A14CBC72803437C00DA8A68 /* ButtonClickStyleBase.swift */, - 4A14CBC82803437C00DA8A68 /* ButtonClickStyleEmoji.swift */, 4A14CBC92803437C00DA8A68 /* ButtonClickStyleGestureRecognizer.swift */, ); path = Style; @@ -292,7 +262,6 @@ isa = PBXGroup; children = ( 4A14CBD02803437C00DA8A68 /* UIView+AnimationAlpha.swift */, - 4A85B5A22803D59800DFD435 /* UIView+AnimationGlare.swift */, 4A14CBD12803437C00DA8A68 /* UIView+AnimationShadow.swift */, 4A14CBD22803437C00DA8A68 /* UIView+AnimationPulsate.swift */, 4A14CBD32803437C00DA8A68 /* UIView+AnimationAndroidPulse.swift */, @@ -302,6 +271,7 @@ 4A14CBD72803437C00DA8A68 /* UIView+AnimationSnake.swift */, 4A14CBD82803437C00DA8A68 /* UIView+AnimationFlash.swift */, 4A14CBD92803437C00DA8A68 /* UIView+AnimationPress.swift */, + 4A85B5A22803D59800DFD435 /* UIView+AnimationGlare.swift */, ); path = Animations; sourceTree = ""; @@ -315,26 +285,13 @@ path = ButtonTableList; sourceTree = ""; }; - 4A62F30B2803115C00534ABA /* Utils */ = { - isa = PBXGroup; - children = ( - 4A62F3102803115C00534ABA /* LoadNib */, - 4A62F30C2803115C00534ABA /* Designable */, - 4A62F30F2803115C00534ABA /* DispatchQueue.swift */, - 4A62F3132803115C00534ABA /* Font */, - 4A62F3162803115C00534ABA /* ScreenDevice.swift */, - 4A62F3172803115C00534ABA /* UIView+Positions.swift */, - ); - path = Utils; - sourceTree = ""; - }; - 4A62F30C2803115C00534ABA /* Designable */ = { + 4A62F30C2803115C00534ABA /* UIDesignable */ = { isa = PBXGroup; children = ( - 4A62F30D2803115C00534ABA /* DesignableLabel.swift */, - 4A62F30E2803115C00534ABA /* DesignableView.swift */, + 4A62F30D2803115C00534ABA /* ButtonClickStyleDesignLabel.swift */, + 4A62F30E2803115C00534ABA /* ButtonClickStyleDesignView.swift */, ); - path = Designable; + path = UIDesignable; sourceTree = ""; }; 4A62F3102803115C00534ABA /* LoadNib */ = { @@ -342,24 +299,17 @@ children = ( 4A62F3112803115C00534ABA /* StoryboardController.swift */, 4A62F3122803115C00534ABA /* XibView.swift */, + 4A62F3472803115C00534ABA /* BtnView.swift */, ); path = LoadNib; sourceTree = ""; }; - 4A62F3132803115C00534ABA /* Font */ = { - isa = PBXGroup; - children = ( - 4A62F3142803115C00534ABA /* Proxima Nova Semibold.otf */, - 4A62F3152803115C00534ABA /* Proxima Nova Bold.otf */, - ); - path = Font; - sourceTree = ""; - }; 4A62F3182803115C00534ABA /* UI */ = { isa = PBXGroup; children = ( + 4A62F3482803115C00534ABA /* ScreenIPhone */, + 4A8FF183280A40A200144254 /* ScreenIPad */, 4A62F3192803115C00534ABA /* Button */, - 4A62F3482803115C00534ABA /* Screen */, 4A62F3552803115C00534ABA /* View */, 4A85B5A42803EBA400DFD435 /* Cell */, ); @@ -369,22 +319,20 @@ 4A62F3192803115C00534ABA /* Button */ = { isa = PBXGroup; children = ( - 4ADE26E6280383DC00634B6C /* ButtonClickStyle+Buttons.swift */, - 4A62F3472803115C00534ABA /* BtnView.swift */, - 4A62F31A2803115C00534ABA /* Firefox */, - 4A62F31D2803115C00534ABA /* BuyNow */, + 4A62F3382803115C00534ABA /* JustPink */, 4A62F3202803115C00534ABA /* Blue */, + 4A62F31D2803115C00534ABA /* BuyNow */, + 4A62F33B2803115C00534ABA /* Download */, 4A62F3232803115C00534ABA /* Delete */, - 4A62F3262803115C00534ABA /* TestDemoBlur */, - 4A62F3292803115C00534ABA /* Google */, - 4A62F32C2803115C00534ABA /* TestDemoSquares */, - 4A62F32F2803115C00534ABA /* GradientBlue */, 4A62F3322803115C00534ABA /* Search */, 4A62F3352803115C00534ABA /* Subscribe */, - 4A62F3382803115C00534ABA /* JustPink */, - 4A62F33B2803115C00534ABA /* Download */, - 4A62F33E2803115C00534ABA /* BorderGreenDark */, + 4A62F31A2803115C00534ABA /* Firefox */, + 4A62F3292803115C00534ABA /* Google */, + 4A62F32F2803115C00534ABA /* GradientBlue */, 4A62F3412803115C00534ABA /* Neomorphism */, + 4A62F33E2803115C00534ABA /* BorderGreenDark */, + 4A62F32C2803115C00534ABA /* TestDemoSquares */, + 4A62F3262803115C00534ABA /* TestDemoBlur */, 4A62F3442803115C00534ABA /* TestDemoGradient */, ); path = Button; @@ -411,8 +359,8 @@ 4A62F3202803115C00534ABA /* Blue */ = { isa = PBXGroup; children = ( - 4A62F3212803115C00534ABA /* BlueButtonView.xib */, 4A62F3222803115C00534ABA /* BlueButtonView.swift */, + 4A62F3212803115C00534ABA /* BlueButtonView.xib */, ); path = Blue; sourceTree = ""; @@ -420,8 +368,8 @@ 4A62F3232803115C00534ABA /* Delete */ = { isa = PBXGroup; children = ( - 4A62F3242803115C00534ABA /* DeleteButtonView.xib */, 4A62F3252803115C00534ABA /* DeleteButtonView.swift */, + 4A62F3242803115C00534ABA /* DeleteButtonView.xib */, ); path = Delete; sourceTree = ""; @@ -429,8 +377,8 @@ 4A62F3262803115C00534ABA /* TestDemoBlur */ = { isa = PBXGroup; children = ( - 4A62F3272803115C00534ABA /* TestDemoBlurButtonView.xib */, 4A62F3282803115C00534ABA /* TestDemoBlurButtonView.swift */, + 4A62F3272803115C00534ABA /* TestDemoBlurButtonView.xib */, ); path = TestDemoBlur; sourceTree = ""; @@ -438,8 +386,8 @@ 4A62F3292803115C00534ABA /* Google */ = { isa = PBXGroup; children = ( - 4A62F32A2803115C00534ABA /* GoogleButtonView.xib */, 4A62F32B2803115C00534ABA /* GoogleButtonView.swift */, + 4A62F32A2803115C00534ABA /* GoogleButtonView.xib */, ); path = Google; sourceTree = ""; @@ -447,8 +395,8 @@ 4A62F32C2803115C00534ABA /* TestDemoSquares */ = { isa = PBXGroup; children = ( - 4A62F32D2803115C00534ABA /* TestDemoSquaresButtonView.xib */, 4A62F32E2803115C00534ABA /* TestDemoSquaresButtonView.swift */, + 4A62F32D2803115C00534ABA /* TestDemoSquaresButtonView.xib */, ); path = TestDemoSquares; sourceTree = ""; @@ -465,8 +413,8 @@ 4A62F3322803115C00534ABA /* Search */ = { isa = PBXGroup; children = ( - 4A62F3332803115C00534ABA /* SearchButtonView.xib */, 4A62F3342803115C00534ABA /* SearchButtonView.swift */, + 4A62F3332803115C00534ABA /* SearchButtonView.xib */, ); path = Search; sourceTree = ""; @@ -474,8 +422,8 @@ 4A62F3352803115C00534ABA /* Subscribe */ = { isa = PBXGroup; children = ( - 4A62F3362803115C00534ABA /* SubscribeButtonView.xib */, 4A62F3372803115C00534ABA /* SubscribeButtonView.swift */, + 4A62F3362803115C00534ABA /* SubscribeButtonView.xib */, ); path = Subscribe; sourceTree = ""; @@ -525,19 +473,13 @@ path = TestDemoGradient; sourceTree = ""; }; - 4A62F3482803115C00534ABA /* Screen */ = { + 4A62F3482803115C00534ABA /* ScreenIPhone */ = { isa = PBXGroup; children = ( - 607FACD71AFB9204008FA782 /* ViewController.swift */, - 607FACD91AFB9204008FA782 /* Main.storyboard */, - 4A62F34C2803115C00534ABA /* Test */, - 4A62F34F2803115C00534ABA /* TestDemo */, - 4ADE26E12803837C00634B6C /* ExampleButtons */, - 4A62F3522803115C00534ABA /* ExampleClickStyleAnimations */, - 4A4545C22806C7570041D039 /* ButtonTableList */, 4A62F3492803115C00534ABA /* ButtonList */, + 4A4545C22806C7570041D039 /* ButtonTableList */, ); - path = Screen; + path = ScreenIPhone; sourceTree = ""; }; 4A62F3492803115C00534ABA /* ButtonList */ = { @@ -610,26 +552,16 @@ path = ButtonListCell; sourceTree = ""; }; - 4A85B5AA2803EBFD00DFD435 /* AdapterView */ = { - isa = PBXGroup; - children = ( - 4A85B5AB2803EBFD00DFD435 /* TextAdapterField.swift */, - 4A85B5AC2803EBFD00DFD435 /* TableAdapterView */, - 4A85B5C02803EBFD00DFD435 /* CollectionAdapterView */, - ); - path = AdapterView; - sourceTree = ""; - }; 4A85B5AC2803EBFD00DFD435 /* TableAdapterView */ = { isa = PBXGroup; children = ( + 4A85B5B32803EBFD00DFD435 /* Cell */, 4A85B5AD2803EBFD00DFD435 /* TableAdapterView+AddGradient.swift */, 4A85B5AE2803EBFD00DFD435 /* TableAdapterView+Delegate.swift */, 4A85B5AF2803EBFD00DFD435 /* TableAdapterView+CallbackTypes.swift */, 4A85B5B02803EBFD00DFD435 /* TableAdapterView+Set.swift */, 4A85B5B12803EBFD00DFD435 /* TableAdapterView.swift */, 4A85B5B22803EBFD00DFD435 /* TableAdapterView+UpdateRows.swift */, - 4A85B5B32803EBFD00DFD435 /* Cell */, 4A85B5BD2803EBFD00DFD435 /* TableAdapterView+DataSource.swift */, 4A85B5BE2803EBFD00DFD435 /* TableAdapterView+ScrollDelegate.swift */, 4A85B5BF2803EBFD00DFD435 /* TableAdapterView+AddRefresh.swift */, @@ -640,11 +572,10 @@ 4A85B5B32803EBFD00DFD435 /* Cell */ = { isa = PBXGroup; children = ( + 4A85B5B72803EBFD00DFD435 /* TitleTextCell */, 4A85B5B42803EBFD00DFD435 /* TableAdapterCellData.swift */, 4A85B5B52803EBFD00DFD435 /* TableAdapterItem.swift */, 4A85B5B62803EBFD00DFD435 /* TableAdapterCell.swift */, - 4A85B5B72803EBFD00DFD435 /* TitleTextCell */, - 4A85B5BA2803EBFD00DFD435 /* СustomizableCollectionView */, ); path = Cell; sourceTree = ""; @@ -658,43 +589,24 @@ path = TitleTextCell; sourceTree = ""; }; - 4A85B5BA2803EBFD00DFD435 /* СustomizableCollectionView */ = { + 4A8FF182280A3F7800144254 /* Utils */ = { isa = PBXGroup; children = ( - 4A85B5BB2803EBFD00DFD435 /* MainCollectionCell.swift */, - 4A85B5BC2803EBFD00DFD435 /* MainCollectionCell.xib */, - ); - path = "СustomizableCollectionView"; - sourceTree = ""; - }; - 4A85B5C02803EBFD00DFD435 /* CollectionAdapterView */ = { - isa = PBXGroup; - children = ( - 4A85B5C62803EBFD00DFD435 /* Layout */, - 4A85B5C92803EBFE00DFD435 /* CollectionAdapterView.swift */, - 4A85B5CA2803EBFE00DFD435 /* Cell */, - 4A85B5CE2803EBFE00DFD435 /* CollectionAdapterTypes.swift */, - ); - path = CollectionAdapterView; - sourceTree = ""; - }; - 4A85B5C62803EBFD00DFD435 /* Layout */ = { - isa = PBXGroup; - children = ( - 4A85B5C72803EBFD00DFD435 /* UICollectionViewLeftAlignedLayout.swift */, - 4A85B5C82803EBFE00DFD435 /* UICollectionViewCenteredFlowLayout.swift */, + 4A62F3102803115C00534ABA /* LoadNib */, + 4A85B5AC2803EBFD00DFD435 /* TableAdapterView */, ); - path = Layout; + path = Utils; sourceTree = ""; }; - 4A85B5CA2803EBFE00DFD435 /* Cell */ = { + 4A8FF183280A40A200144254 /* ScreenIPad */ = { isa = PBXGroup; children = ( - 4A85B5CB2803EBFE00DFD435 /* CollectionAdapterItem.swift */, - 4A85B5CC2803EBFE00DFD435 /* CollectionAdapterCell.swift */, - 4A85B5CD2803EBFE00DFD435 /* CollectionAdapterCellData.swift */, + 4A62F34C2803115C00534ABA /* Test */, + 4A62F34F2803115C00534ABA /* TestDemo */, + 4ADE26E12803837C00634B6C /* ExampleButtons */, + 4A62F3522803115C00534ABA /* ExampleClickStyleAnimations */, ); - path = Cell; + path = ScreenIPad; sourceTree = ""; }; 4ADE26E12803837C00634B6C /* ExampleButtons */ = { @@ -721,7 +633,7 @@ 607FACD11AFB9204008FA782 /* Products */ = { isa = PBXGroup; children = ( - 607FACD01AFB9204008FA782 /* ButtonClickStyle_Example.app */, + 607FACD01AFB9204008FA782 /* ButtonClickStyle.app */, ); name = Products; sourceTree = ""; @@ -729,12 +641,15 @@ 607FACD21AFB9204008FA782 /* ButtonClickStyle */ = { isa = PBXGroup; children = ( - 4A85B5AA2803EBFD00DFD435 /* AdapterView */, + 4A8FF182280A3F7800144254 /* Utils */, 4A62F3182803115C00534ABA /* UI */, + 4ADE26E6280383DC00634B6C /* ButtonClickStyle+Buttons.swift */, 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 4A62F3B82803122700534ABA /* SceneDelegate.swift */, - 607FACDC1AFB9204008FA782 /* Images.xcassets */, + 607FACD71AFB9204008FA782 /* ViewController.swift */, + 607FACD91AFB9204008FA782 /* Main.storyboard */, 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, + 607FACDC1AFB9204008FA782 /* Images.xcassets */, 607FACD31AFB9204008FA782 /* Supporting Files */, ); path = ButtonClickStyle; @@ -781,9 +696,9 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 607FACCF1AFB9204008FA782 /* ButtonClickStyle_Example */ = { + 607FACCF1AFB9204008FA782 /* ButtonClickStyle */ = { isa = PBXNativeTarget; - buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ButtonClickStyle_Example" */; + buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ButtonClickStyle" */; buildPhases = ( 22E04CD9862E1282C47CDE47 /* [CP] Check Pods Manifest.lock */, 607FACCC1AFB9204008FA782 /* Sources */, @@ -795,9 +710,9 @@ ); dependencies = ( ); - name = ButtonClickStyle_Example; + name = ButtonClickStyle; productName = ButtonClickStyle; - productReference = 607FACD01AFB9204008FA782 /* ButtonClickStyle_Example.app */; + productReference = 607FACD01AFB9204008FA782 /* ButtonClickStyle.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -831,7 +746,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 607FACCF1AFB9204008FA782 /* ButtonClickStyle_Example */, + 607FACCF1AFB9204008FA782 /* ButtonClickStyle */, ); }; /* End PBXProject section */ @@ -854,16 +769,13 @@ 4A62F3902803115C00534ABA /* JustPinkButtonView.xib in Resources */, 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 4A62F39E2803115C00534ABA /* TestDemoViewController.storyboard in Resources */, - 4A62F3772803115C00534ABA /* Proxima Nova Semibold.otf in Resources */, 4A62F39D2803115C00534ABA /* TestViewController.storyboard in Resources */, 4A62F3872803115C00534ABA /* TestDemoSquaresButtonView.xib in Resources */, 4A62F3892803115C00534ABA /* GradientBlueBasicButtonView.xib in Resources */, 4A62F37C2803115C00534ABA /* FirefoxButtonView.xib in Resources */, - 4A62F3782803115C00534ABA /* Proxima Nova Bold.otf in Resources */, 4A62F3922803115C00534ABA /* DownloadButtonView.xib in Resources */, 4A62F3962803115C00534ABA /* NeomorphismButtonView.xib in Resources */, 4A62F3852803115C00534ABA /* GoogleButtonView.xib in Resources */, - 4A85B5DC2803EBFE00DFD435 /* MainCollectionCell.xib in Resources */, 4A62F3832803115C00534ABA /* TestDemoBlurButtonView.xib in Resources */, 4ADE26E42803837C00634B6C /* ExampleButtonsViewController.storyboard in Resources */, 4A62F37D2803115C00534ABA /* BuyNowButtonView.xib in Resources */, @@ -933,7 +845,7 @@ 4A85B5D12803EBFE00DFD435 /* TableAdapterView+Delegate.swift in Sources */, 4A62F38A2803115C00534ABA /* GradientBlueBasicButtonView.swift in Sources */, 4A85B5D62803EBFE00DFD435 /* TableAdapterCellData.swift in Sources */, - 4A62F3732803115C00534ABA /* DesignableView.swift in Sources */, + 4A62F3732803115C00534ABA /* ButtonClickStyleDesignView.swift in Sources */, 4A85B5D82803EBFE00DFD435 /* TableAdapterCell.swift in Sources */, 4A85B5A32803D59800DFD435 /* UIView+AnimationGlare.swift in Sources */, 4A62F3A22803115C00534ABA /* ButtonLayerExampleView.swift in Sources */, @@ -942,24 +854,19 @@ 4A62F3822803115C00534ABA /* DeleteButtonView.swift in Sources */, 4A14CBEA2803437C00DA8A68 /* UIView+AnimationColorFlat.swift in Sources */, 4A14CBEC2803437C00DA8A68 /* UIView+AnimationFlash.swift in Sources */, - 4A85B5E52803EBFE00DFD435 /* CollectionAdapterItem.swift in Sources */, 4A4545C52806C7570041D039 /* ButtonTableListViewController.swift in Sources */, 4A14CBE42803437C00DA8A68 /* UIView+AnimationAlpha.swift in Sources */, 4A62F37E2803115C00534ABA /* BuyNowButtonView.swift in Sources */, 4A14CBE02803437C00DA8A68 /* ButtonClickState.swift in Sources */, - 4A62F37A2803115C00534ABA /* UIView+Positions.swift in Sources */, 4A62F39B2803115C00534ABA /* ButtonListViewController.swift in Sources */, 4ADE26E7280383DC00634B6C /* ButtonClickStyle+Buttons.swift in Sources */, - 4A14CBDE2803437C00DA8A68 /* ButtonClickStyleEmoji.swift in Sources */, 4A62F3992803115C00534ABA /* BtnView.swift in Sources */, - 4A85B5E32803EBFE00DFD435 /* UICollectionViewCenteredFlowLayout.swift in Sources */, 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 4A85B5DF2803EBFE00DFD435 /* TableAdapterView+AddRefresh.swift in Sources */, 4A85B5A82803EBA400DFD435 /* ButtonListCell.swift in Sources */, - 4A85B5E72803EBFE00DFD435 /* CollectionAdapterCellData.swift in Sources */, 4A85B5D02803EBFE00DFD435 /* TableAdapterView+AddGradient.swift in Sources */, 4A62F3752803115C00534ABA /* StoryboardController.swift in Sources */, - 4A62F3722803115C00534ABA /* DesignableLabel.swift in Sources */, + 4A62F3722803115C00534ABA /* ButtonClickStyleDesignLabel.swift in Sources */, 4A14CBDD2803437C00DA8A68 /* ButtonClickStyleBase.swift in Sources */, 4A62F38F2803115C00534ABA /* JustPinkButtonView.swift in Sources */, 4A85B5D52803EBFE00DFD435 /* TableAdapterView+UpdateRows.swift in Sources */, @@ -968,23 +875,18 @@ 4A14CBE82803437C00DA8A68 /* UIView+AnimationColor.swift in Sources */, 4A14CBE52803437C00DA8A68 /* UIView+AnimationShadow.swift in Sources */, 4A14CBE32803437C00DA8A68 /* ButtonClickStyleAddViewsAnimation.swift in Sources */, - 4A85B5DB2803EBFE00DFD435 /* MainCollectionCell.swift in Sources */, 4A62F38E2803115C00534ABA /* SubscribeButtonView.swift in Sources */, 4A85B5D22803EBFE00DFD435 /* TableAdapterView+CallbackTypes.swift in Sources */, 4A85B5DD2803EBFE00DFD435 /* TableAdapterView+DataSource.swift in Sources */, 4A14CBDC2803437C00DA8A68 /* ButtonClickStyle.swift in Sources */, 4A85B5D72803EBFE00DFD435 /* TableAdapterItem.swift in Sources */, - 4A85B5CF2803EBFE00DFD435 /* TextAdapterField.swift in Sources */, 4A14CBEB2803437C00DA8A68 /* UIView+AnimationSnake.swift in Sources */, - 4A85B5E42803EBFE00DFD435 /* CollectionAdapterView.swift in Sources */, 4A14CBE92803437C00DA8A68 /* UIView+AnimationPulse.swift in Sources */, 4A62F39C2803115C00534ABA /* TestViewController.swift in Sources */, 4A62F38C2803115C00534ABA /* SearchButtonView.swift in Sources */, 4A62F37B2803115C00534ABA /* FirefoxButtonView.swift in Sources */, 4A62F3882803115C00534ABA /* TestDemoSquaresButtonView.swift in Sources */, 4A14CBE22803437C00DA8A68 /* ButtonClicClosure.swift in Sources */, - 4A62F3792803115C00534ABA /* ScreenDevice.swift in Sources */, - 4A85B5E62803EBFE00DFD435 /* CollectionAdapterCell.swift in Sources */, 4A62F3B92803122700534ABA /* SceneDelegate.swift in Sources */, 4A85B5DA2803EBFE00DFD435 /* TitleTextCell.swift in Sources */, 4A62F3982803115C00534ABA /* TestDemoGradientButtonView.swift in Sources */, @@ -993,13 +895,11 @@ 4A85B5DE2803EBFE00DFD435 /* TableAdapterView+ScrollDelegate.swift in Sources */, 4A14CBDB2803437C00DA8A68 /* ButtonClickStyleShort.swift in Sources */, 4A85B5D42803EBFE00DFD435 /* TableAdapterView.swift in Sources */, - 4A62F3742803115C00534ABA /* DispatchQueue.swift in Sources */, 4A14CBE12803437C00DA8A68 /* ButtonClick.swift in Sources */, 4A62F39F2803115C00534ABA /* TestDemoViewController.swift in Sources */, 4A62F3802803115C00534ABA /* BlueButtonView.swift in Sources */, - 4A85B5E22803EBFE00DFD435 /* UICollectionViewLeftAlignedLayout.swift in Sources */, 4A62F3842803115C00534ABA /* TestDemoBlurButtonView.swift in Sources */, - 4A85B5E82803EBFE00DFD435 /* CollectionAdapterTypes.swift in Sources */, + 4A231B7A280A82250073284C /* ButtonClickStyleEmoji.swift in Sources */, 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 4A62F3952803115C00534ABA /* NeomorphismButtonView.swift in Sources */, ); @@ -1144,7 +1044,7 @@ DEVELOPMENT_TEAM = Y7546NLJW9; INFOPLIST_FILE = ButtonClickStyle/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 1.0.5; + MARKETING_VERSION = 1.1.0; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = mrusta.ButtonClickStyle; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1165,7 +1065,7 @@ DEVELOPMENT_TEAM = Y7546NLJW9; INFOPLIST_FILE = ButtonClickStyle/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 1.0.5; + MARKETING_VERSION = 1.1.0; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = mrusta.ButtonClickStyle; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1188,7 +1088,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ButtonClickStyle_Example" */ = { + 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ButtonClickStyle" */ = { isa = XCConfigurationList; buildConfigurations = ( 607FACF01AFB9204008FA782 /* Debug */, diff --git a/Example/ButtonClickStyle.xcodeproj/xcshareddata/xcschemes/ButtonClickStyle-Example.xcscheme b/Example/ButtonClickStyle.xcodeproj/xcshareddata/xcschemes/ButtonClickStyle.xcscheme similarity index 89% rename from Example/ButtonClickStyle.xcodeproj/xcshareddata/xcschemes/ButtonClickStyle-Example.xcscheme rename to Example/ButtonClickStyle.xcodeproj/xcshareddata/xcschemes/ButtonClickStyle.xcscheme index 16e7bca..a84f927 100644 --- a/Example/ButtonClickStyle.xcodeproj/xcshareddata/xcschemes/ButtonClickStyle-Example.xcscheme +++ b/Example/ButtonClickStyle.xcodeproj/xcshareddata/xcschemes/ButtonClickStyle.xcscheme @@ -15,8 +15,8 @@ @@ -45,8 +45,8 @@ @@ -78,8 +78,8 @@ @@ -95,8 +95,8 @@ diff --git a/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/Cell/CollectionAdapterCell.swift b/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/Cell/CollectionAdapterCell.swift deleted file mode 100644 index 9d5f4d6..0000000 --- a/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/Cell/CollectionAdapterCell.swift +++ /dev/null @@ -1,92 +0,0 @@ -// -// ColletionAdapterCell.swift -// PatternsSwift -// -// Created by mrustaa on 01/05/2020. -// Copyright © 2020 mrustaa. All rights reserved. -// - -import UIKit - -class CollectionAdapterCell: UICollectionViewCell { - - open var didScrollCallback: (() -> ())? = nil - - @IBInspectable var hideAnimation: Bool = false - var selectedView: UIView? - - public var cellData: CollectionAdapterCellData? - - open func fill(data: Any?) { - - } - - override init(frame: CGRect) { - super.init(frame: frame) - setupCommonProperties() - } - - required init?(coder: NSCoder) { - super.init(coder: coder) - setupCommonProperties() - } - - private func setupCommonProperties() { - - } - - let selAlpha: CGFloat = 0.2 - - override var isSelected: Bool { - set { - super.isSelected = newValue - if hideAnimation { - if newValue { - alpha = 0.5 - UIView.animate(withDuration: 0.45, animations: { - self.alpha = 1 - }) - } else { - self.alpha = 1 - } - } else { - guard let selectedView = selectedView else { return } - if newValue { - selectedView.alpha = selAlpha - UIView.animate(withDuration: 0.45, animations: { - selectedView.alpha = 0.0 - }) - } else { - selectedView.alpha = 0.0 - } - } - } - get { - return super.isSelected - } - } - - override var isHighlighted: Bool { - set { - super.isHighlighted = newValue - if hideAnimation { - UIView.animate(withDuration: newValue ? 0.1 : 0.45, animations: { - self.alpha = (newValue ? 0.0 : 1.0) - }) - } else { - guard let selectedView = selectedView else { return } - if newValue { - UIView.animate(withDuration: 0.1, animations: { - selectedView.alpha = self.selAlpha - }) - } else { - UIView.animate(withDuration: 0.45, animations: { - selectedView.alpha = 0.0 - }) - } - } - } - get { super.isHighlighted } - } - -} diff --git a/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/Cell/CollectionAdapterCellData.swift b/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/Cell/CollectionAdapterCellData.swift deleted file mode 100644 index 87334bc..0000000 --- a/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/Cell/CollectionAdapterCellData.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// ColletionAdapterCellData.swift -// PatternsSwift -// -// Created by mrustaa on 01/05/2020. -// Copyright © 2020 mrustaa. All rights reserved. -// - -import UIKit - -class CollectionAdapterCellData: NSObject { - - open func size() -> CGSize { - return .zero - } -} diff --git a/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/Cell/CollectionAdapterItem.swift b/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/Cell/CollectionAdapterItem.swift deleted file mode 100644 index 31be03b..0000000 --- a/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/Cell/CollectionAdapterItem.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// ColletionAdapterItem.swift -// PatternsSwift -// -// Created by mrustaa on 01/05/2020. -// Copyright © 2020 mrustaa. All rights reserved. -// - -import UIKit - -class CollectionAdapterItem: NSObject { - - public let cellClass: AnyClass - public let cellData: CollectionAdapterCellData? - - public var cellReuseIdentifier: String { - return String(describing: cellClass) - } - - init(cellClass: AnyClass, cellData: CollectionAdapterCellData? = nil) { - self.cellClass = cellClass - self.cellData = cellData - } - - public func size() -> CGSize { - return cellData?.size() ?? .zero - } - -} diff --git a/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/CollectionAdapterTypes.swift b/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/CollectionAdapterTypes.swift deleted file mode 100644 index 497a214..0000000 --- a/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/CollectionAdapterTypes.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// CollectionAdapterTypes.swift -// PatternsSwift -// -// Created by mrustaa on 01/05/2020. -// Copyright © 2020 mrustaa. All rights reserved. -// - -import UIKit - -typealias CollectionAdapterCountCallback = () -> Int -typealias CollectionAdapterCellIndexCallback = (_ index: Int) -> UICollectionViewCell -typealias CollectionAdapterSizeIndexCallback = (_ index: Int) -> CGSize -typealias CollectionAdapterSelectIndexCallback = (_ index: Int) -> () -typealias CollectionAdapterWillEndDraggingCallback = (_ velocity: CGPoint, _ targetContentOffset: UnsafeMutablePointer) -> () diff --git a/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/CollectionAdapterView.swift b/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/CollectionAdapterView.swift deleted file mode 100644 index 5074417..0000000 --- a/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/CollectionAdapterView.swift +++ /dev/null @@ -1,131 +0,0 @@ -// -// CollectionAdapterView.swift -// PatternsSwift -// -// Created by mrustaa on 01/05/2020. -// Copyright © 2020 mrustaa. All rights reserved. -// - -import UIKit - -class CollectionAdapterView: UICollectionView { - - var countCallback: CollectionAdapterCountCallback? - var cellIndexCallback: CollectionAdapterCellIndexCallback? - var sizeIndexCallback: CollectionAdapterSizeIndexCallback? - var selectIndexCallback: CollectionAdapterSelectIndexCallback? - var didScrollCallback: TableAdapterDidScrollCallback? - var willEndDraggingCallback: CollectionAdapterWillEndDraggingCallback? - - - var items: [CollectionAdapterItem] = [] - - required init?(coder: NSCoder) { - super.init(coder: coder) - update() - } - - override init(frame: CGRect, collectionViewLayout layout: UICollectionViewLayout) { - super.init(frame: frame, collectionViewLayout: layout) - update() - } - - func update() { - delegate = self - dataSource = self - } - - - public func set(items: [CollectionAdapterItem]) { - items.forEach { - registerNibIfNeeded(for: $0) - } - self.items = items - reloadData() - } - - public func registerNibIfNeeded(for item: CollectionAdapterItem) { - let nib = UINib(nibName: item.cellReuseIdentifier, bundle: nil) - register(nib, forCellWithReuseIdentifier: item.cellReuseIdentifier) - } - - public func clear() { - items = [] - reloadData() - } - - private func cellAt(_ indexPath: IndexPath) -> CollectionAdapterCell? { - let item = items[indexPath.row] - let cellIdentifier = item.cellReuseIdentifier - let cell = dequeueReusableCell(withReuseIdentifier: cellIdentifier, for: indexPath) as? CollectionAdapterCell - cell?.cellData = item.cellData - return cell - } - - public func cell(index: Int, - completion: @escaping(T)->() ) { - guard let cell = cellForItem(at: .init(row: index, section: 0)) as? T else { - return - } - completion(cell) - } - -} - -extension CollectionAdapterView: UICollectionViewDelegate { - - func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { - selectIndexCallback?(indexPath.row) - } -} - -extension CollectionAdapterView: UICollectionViewDataSource { - - func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - if !items.isEmpty { - return items.count - } - if let countCallback = countCallback { - return countCallback() - } - return 0 - } - - func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { - if !items.isEmpty { - let item = items[indexPath.row] - let cell = cellAt(indexPath) - cell?.fill(data: item.cellData) - return cell ?? UICollectionViewCell() - } - if let cellIndexCallback = cellIndexCallback { - return cellIndexCallback(indexPath.row) - } - return UICollectionViewCell() - } -} - -extension CollectionAdapterView: UICollectionViewDelegateFlowLayout { - - public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { - if !items.isEmpty { - let item = items[indexPath.row] - return item.size() - } - if let sizeIndexCallback = sizeIndexCallback { - return sizeIndexCallback(indexPath.row) - } - return .zero - } -} - -extension CollectionAdapterView: UIScrollViewDelegate { - public func scrollViewDidScroll(_ scrollView: UIScrollView) { - didScrollCallback?() - } - - public func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer) { - willEndDraggingCallback?(velocity, targetContentOffset) - } -} - diff --git a/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/Layout/UICollectionViewCenteredFlowLayout.swift b/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/Layout/UICollectionViewCenteredFlowLayout.swift deleted file mode 100644 index 43cfed6..0000000 --- a/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/Layout/UICollectionViewCenteredFlowLayout.swift +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2017 Cœur -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of -// this software and associated documentation files (the "Software"), to deal in -// the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -import UIKit - -/** - * Simple UICollectionViewFlowLayout that centers the cells rather than justify them - * - * Based on https://github.com/Coeur/UICollectionViewLeftAlignedLayout - */ -open class UICollectionViewCenteredFlowLayout: UICollectionViewFlowLayout { - open override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? { - guard let layoutAttributesForElements = super.layoutAttributesForElements(in: rect) else { - return nil - } - guard let collectionView = collectionView else { - return layoutAttributesForElements - } - // we group copies of the elements from the same row/column - var representedElements: [UICollectionViewLayoutAttributes] = [] - var cells: [[UICollectionViewLayoutAttributes]] = [[]] - var previousFrame: CGRect? - if scrollDirection == .vertical { - for layoutAttributes in layoutAttributesForElements { - guard layoutAttributes.representedElementKind == nil else { - representedElements.append(layoutAttributes) - continue - } - // copying is required to avoid "UICollectionViewFlowLayout cache mismatched frame" - let currentItemAttributes = layoutAttributes.copy() as! UICollectionViewLayoutAttributes - // if the current frame, once stretched to the full row doesn't intersect the previous frame then they are on different rows - if previousFrame != nil && !currentItemAttributes.frame.intersects(CGRect(x: -.greatestFiniteMagnitude, y: previousFrame!.origin.y, width: .infinity, height: previousFrame!.size.height)) { - cells.append([]) - } - cells[cells.endIndex - 1].append(currentItemAttributes) - previousFrame = currentItemAttributes.frame - } - // we reposition all elements - return representedElements + cells.flatMap { group -> [UICollectionViewLayoutAttributes] in - guard let section = group.first?.indexPath.section else { - return group - } - let evaluatedSectionInset = evaluatedSectionInsetForSection(at: section) - let evaluatedMinimumInteritemSpacing = evaluatedMinimumInteritemSpacingForSection(at: section) - var origin = (collectionView.bounds.width + evaluatedSectionInset.left - evaluatedSectionInset.right - group.reduce(0, { $0 + $1.frame.size.width }) - CGFloat(group.count - 1) * evaluatedMinimumInteritemSpacing) / 2 - // we reposition each element of a group - return group.map { - $0.frame.origin.x = origin - origin += $0.frame.size.width + evaluatedMinimumInteritemSpacing - return $0 - } - } - } else { - for layoutAttributes in layoutAttributesForElements { - guard layoutAttributes.representedElementKind == nil else { - representedElements.append(layoutAttributes) - continue - } - // copying is required to avoid "UICollectionViewFlowLayout cache mismatched frame" - let currentItemAttributes = layoutAttributes.copy() as! UICollectionViewLayoutAttributes - // if the current frame, once stretched to the full column doesn't intersect the previous frame then they are on different columns - if previousFrame != nil && !currentItemAttributes.frame.intersects(CGRect(x: previousFrame!.origin.x, y: -.greatestFiniteMagnitude, width: previousFrame!.size.width, height: .infinity)) { - cells.append([]) - } - cells[cells.endIndex - 1].append(currentItemAttributes) - previousFrame = currentItemAttributes.frame - } - // we reposition all elements - return representedElements + cells.flatMap { group -> [UICollectionViewLayoutAttributes] in - guard let section = group.first?.indexPath.section else { - return group - } - let evaluatedSectionInset = evaluatedSectionInsetForSection(at: section) - let evaluatedMinimumInteritemSpacing = evaluatedMinimumInteritemSpacingForSection(at: section) - var origin = (collectionView.bounds.height + evaluatedSectionInset.top - evaluatedSectionInset.bottom - group.reduce(0, { $0 + $1.frame.size.height }) - CGFloat(group.count - 1) * evaluatedMinimumInteritemSpacing) / 2 - // we reposition each element of a group - return group.map { - $0.frame.origin.y = origin - origin += $0.frame.size.height + evaluatedMinimumInteritemSpacing - return $0 - } - } - } - } -} - -extension UICollectionViewFlowLayout { - internal func evaluatedSectionInsetForSection(at section: Int) -> UIEdgeInsets { - return (collectionView?.delegate as? UICollectionViewDelegateFlowLayout)?.collectionView?(collectionView!, layout: self, insetForSectionAt: section) ?? sectionInset - } - internal func evaluatedMinimumInteritemSpacingForSection(at section: Int) -> CGFloat { - return (collectionView?.delegate as? UICollectionViewDelegateFlowLayout)?.collectionView?(collectionView!, layout: self, minimumInteritemSpacingForSectionAt: section) ?? minimumInteritemSpacing - } -} diff --git a/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/Layout/UICollectionViewLeftAlignedLayout.swift b/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/Layout/UICollectionViewLeftAlignedLayout.swift deleted file mode 100644 index fe9b2bc..0000000 --- a/Example/ButtonClickStyle/AdapterView/CollectionAdapterView/Layout/UICollectionViewLeftAlignedLayout.swift +++ /dev/null @@ -1,98 +0,0 @@ -// -// UICollectionViewLeftAlignedLayout.swift -// SwiftDemo -// -// Created by fanpyi on 22/2/16. -// Copyright © 2016 fanpyi. All rights reserved. -// based on http://stackoverflow.com/questions/13017257/how-do-you-determine-spacing-between-cells-in-uicollectionview-flowlayout https://github.com/mokagio/UICollectionViewLeftAlignedLayout - -import UIKit -extension UICollectionViewLayoutAttributes { - func leftAlignFrameWithSectionInset(_ sectionInset:UIEdgeInsets){ - var frame = self.frame - frame.origin.x = sectionInset.left - self.frame = frame - } -} - -public class UICollectionViewLeftAlignedLayout: UICollectionViewFlowLayout { - - public override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? { - - var attributesCopy: [UICollectionViewLayoutAttributes] = [] - if let attributes = super.layoutAttributesForElements(in: rect) { - attributes.forEach({ attributesCopy.append($0.copy() as! UICollectionViewLayoutAttributes) }) - } - - for attributes in attributesCopy { - if attributes.representedElementKind == nil { - let indexpath = attributes.indexPath - if let attr = layoutAttributesForItem(at: indexpath) { - attributes.frame = attr.frame - } - } - } - return attributesCopy - } - - public override func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? { - - if let currentItemAttributes = super.layoutAttributesForItem(at: indexPath as IndexPath)?.copy() as? UICollectionViewLayoutAttributes { - let sectionInset = self.evaluatedSectionInsetForItem(at: indexPath.section) - let isFirstItemInSection = indexPath.item == 0 - let layoutWidth = self.collectionView!.frame.width - sectionInset.left - sectionInset.right - - if (isFirstItemInSection) { - currentItemAttributes.leftAlignFrameWithSectionInset(sectionInset) - return currentItemAttributes - } - - let previousIndexPath = IndexPath.init(row: indexPath.item - 1, section: indexPath.section) - - let previousFrame = layoutAttributesForItem(at: previousIndexPath)?.frame ?? CGRect.zero - let previousFrameRightPoint = previousFrame.origin.x + previousFrame.width - let currentFrame = currentItemAttributes.frame - let strecthedCurrentFrame = CGRect.init(x: sectionInset.left, - y: currentFrame.origin.y, - width: layoutWidth, - height: currentFrame.size.height) - // if the current frame, once left aligned to the left and stretched to the full collection view - // widht intersects the previous frame then they are on the same line - let isFirstItemInRow = !previousFrame.intersects(strecthedCurrentFrame) - - if (isFirstItemInRow) { - // make sure the first item on a line is left aligned - currentItemAttributes.leftAlignFrameWithSectionInset(sectionInset) - return currentItemAttributes - } - - var frame = currentItemAttributes.frame - frame.origin.x = previousFrameRightPoint + evaluatedMinimumInteritemSpacing(at: indexPath.section) - currentItemAttributes.frame = frame - return currentItemAttributes - - } - return nil - } - - func evaluatedMinimumInteritemSpacing(at sectionIndex:Int) -> CGFloat { - if let delegate = self.collectionView?.delegate as? UICollectionViewDelegateFlowLayout { - let inteitemSpacing = delegate.collectionView?(self.collectionView!, layout: self, minimumInteritemSpacingForSectionAt: sectionIndex) - if let inteitemSpacing = inteitemSpacing { - return inteitemSpacing - } - } - return self.minimumInteritemSpacing - - } - - func evaluatedSectionInsetForItem(at index: Int) ->UIEdgeInsets { - if let delegate = self.collectionView?.delegate as? UICollectionViewDelegateFlowLayout { - let insetForSection = delegate.collectionView?(self.collectionView!, layout: self, insetForSectionAt: index) - if let insetForSectionAt = insetForSection { - return insetForSectionAt - } - } - return self.sectionInset - } -} diff --git "a/Example/ButtonClickStyle/AdapterView/TableAdapterView/Cell/\320\241ustomizableCollectionView/MainCollectionCell.swift" "b/Example/ButtonClickStyle/AdapterView/TableAdapterView/Cell/\320\241ustomizableCollectionView/MainCollectionCell.swift" deleted file mode 100644 index 43c50b7..0000000 --- "a/Example/ButtonClickStyle/AdapterView/TableAdapterView/Cell/\320\241ustomizableCollectionView/MainCollectionCell.swift" +++ /dev/null @@ -1,141 +0,0 @@ -import UIKit - -// MARK: - Item - -class MainCollectionItem: TableAdapterItem { - - init(cellHeight: CGFloat, - items: [CollectionAdapterItem], - scrollDirection: UICollectionView.ScrollDirection = .horizontal, - isScrollEnabled: Bool = true, - minSpacingCell: CGFloat = 0, - minSpacingLines: CGFloat = 0, - sectionInsets: UIEdgeInsets = .init(top: 0, left: 0, bottom: 0, right: 0), - clickCallback: (() -> ())? = nil) { - - let cellData = MainCollectionCellData(cellHeight: cellHeight, - items: items, - scrollDirection: scrollDirection, - isScrollEnabled: isScrollEnabled, - minSpacingCell: minSpacingCell, - minSpacingLines: minSpacingLines, - sectionInsets: sectionInsets, - clickCallback: clickCallback) - - super.init(cellClass: MainCollectionCell.self, cellData: cellData) - } -} - -// MARK: - Data - -class MainCollectionCellData: TableAdapterCellData { - - // MARK: Properties - var height: CGFloat - var items: [CollectionAdapterItem] - var scrollDirection: UICollectionView.ScrollDirection - var isScrollEnabled: Bool = true - var minSpacingCell: CGFloat - var minSpacingLines: CGFloat - var sectionInsets: UIEdgeInsets - - // MARK: Inits - - init(cellHeight: CGFloat, - items: [CollectionAdapterItem], - scrollDirection: UICollectionView.ScrollDirection, - isScrollEnabled: Bool, - minSpacingCell: CGFloat, - minSpacingLines: CGFloat, - sectionInsets: UIEdgeInsets, - clickCallback: (() -> ())?) { - - self.height = cellHeight - self.items = items - self.scrollDirection = scrollDirection - self.isScrollEnabled = isScrollEnabled - self.minSpacingCell = minSpacingCell - self.minSpacingLines = minSpacingLines - self.sectionInsets = sectionInsets - - super.init() - self.cellClickCallback = clickCallback - } - - override public func cellHeight() -> CGFloat { - return height - } - - override public func canEditing() -> Bool { - return editing - } - - - override func equals(compareTo data: TableAdapterCellData) -> Bool { - guard let to = data as? MainCollectionCellData else { return false } - return ((self.height == to.height)) - } -} - -// MARK: - Cell - -class MainCollectionCell: TableAdapterCell { - - // MARK: Properties - - public var data: MainCollectionCellData? - - // MARK: Outlets - - @IBOutlet weak var collectionView: CollectionAdapterView! - - @IBOutlet override var selectedView: UIView? { didSet { } } - - // MARK: Initialize - - override func awakeFromNib() { - separator(hide: true) - } - - override func fill(data: TableAdapterCellData?) { - guard let data = data as? MainCollectionCellData else { return } - self.data = data - - self.hideAnimation = data.touchAnimationHide - separator(hide: !data.separatorVisible) - - updateCollection() - } - - func updateCollection() { - guard let data = data else { return } - - if let flowLayout = collectionView.collectionViewLayout as? UICollectionViewFlowLayout { - flowLayout.minimumInteritemSpacing = data.minSpacingCell - flowLayout.minimumLineSpacing = data.minSpacingLines - flowLayout.sectionInset = data.sectionInsets - flowLayout.scrollDirection = data.scrollDirection - } - - self.didScrollCallback = { - self.didScroll() - } - - collectionView.isScrollEnabled = data.isScrollEnabled - - collectionView.set(items: data.items) - collectionView.didScrollCallback = { - self.didScroll() - } - } - - func didScroll() { - for cell in self.collectionView.visibleCells { - if let cell = cell as? CollectionAdapterCell { - cell.didScrollCallback?() - } - } - } - -} - diff --git "a/Example/ButtonClickStyle/AdapterView/TableAdapterView/Cell/\320\241ustomizableCollectionView/MainCollectionCell.xib" "b/Example/ButtonClickStyle/AdapterView/TableAdapterView/Cell/\320\241ustomizableCollectionView/MainCollectionCell.xib" deleted file mode 100644 index 055bed2..0000000 --- "a/Example/ButtonClickStyle/AdapterView/TableAdapterView/Cell/\320\241ustomizableCollectionView/MainCollectionCell.xib" +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/ButtonClickStyle/AdapterView/TextAdapterField.swift b/Example/ButtonClickStyle/AdapterView/TextAdapterField.swift deleted file mode 100644 index 009a7b1..0000000 --- a/Example/ButtonClickStyle/AdapterView/TextAdapterField.swift +++ /dev/null @@ -1,98 +0,0 @@ -// -// TextAdapterField.swift -// PlusBank -// -// Created by Рустам Мотыгуллин on 27.07.2021. -// - -import UIKit - -open class TextAdapterField: UITextField { - - var onFocused = false - - // MARK: Callbacks - - public var editingBegin: (() -> ())? - public var editingEnd: (() -> ())? - public var onReturn: (() -> ())? - public var changeText: ((String) -> Bool)? - - - // MARK: - Init - - required public init?(coder: NSCoder) { - super.init(coder: coder) - update() - } - - public override init(frame: CGRect) { - super.init(frame: frame) - update() - } - - public func update() { - delegate = self - } - - public func uiDisable() { - isUserInteractionEnabled = false - } - - public func uiEnable() { - isUserInteractionEnabled = true - } - - public func open() { - keyboard(visible: true) - } - - public func close() { - keyboard(visible: false) - } - - public func keyboard(visible: Bool) { - if visible { - resignFirstResponder() - } else { - becomeFirstResponder() - } - } - -} - -extension TextAdapterField: UITextFieldDelegate { - - public func textFieldDidBeginEditing(_ textField: UITextField) { - onFocused = true - editingBegin?() - } - - public func textFieldDidEndEditing(_ textField: UITextField) { - onFocused = false - editingEnd?() - } - - public func textFieldShouldReturn(_ textField: UITextField) -> Bool { - onReturn?() - return true - } - - public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { - let newString = (((textField.text ?? .empty)) as NSString).replacingCharacters(in: range, with: string) - return changeText?(newString) ?? true - } -} - -//MARK: - Constants -extension String { - static let empty: String = "" - static let whitespace: String = " " - static let slash: String = "/" - static let newLine: String = "\n" - static let endLine: String = "\r\n" - static let colon: String = ":" - static let semicolon: String = ";" - static let equal: String = "=" - static let and: String = "&" -} diff --git a/Example/ButtonClickStyle/Base.lproj/LaunchScreen.xib b/Example/ButtonClickStyle/Base.lproj/LaunchScreen.xib index a0e8232..39423f6 100644 --- a/Example/ButtonClickStyle/Base.lproj/LaunchScreen.xib +++ b/Example/ButtonClickStyle/Base.lproj/LaunchScreen.xib @@ -1,12 +1,9 @@ - - - - + + - - + @@ -16,31 +13,35 @@ - + + + - + + - - - + + + - + + + + + + + diff --git a/Example/ButtonClickStyle/UI/Screen/Base.lproj/Main.storyboard b/Example/ButtonClickStyle/Base.lproj/Main.storyboard similarity index 61% rename from Example/ButtonClickStyle/UI/Screen/Base.lproj/Main.storyboard rename to Example/ButtonClickStyle/Base.lproj/Main.storyboard index 0ff4122..8e6eb93 100644 --- a/Example/ButtonClickStyle/UI/Screen/Base.lproj/Main.storyboard +++ b/Example/ButtonClickStyle/Base.lproj/Main.storyboard @@ -28,61 +28,76 @@ - + - - - - - - + @@ -90,30 +105,51 @@ - + + + - + + + - + + + - + + diff --git a/Example/ButtonClickStyle/ButtonClickStyle+Buttons.swift b/Example/ButtonClickStyle/ButtonClickStyle+Buttons.swift new file mode 100644 index 0000000..8af06f0 --- /dev/null +++ b/Example/ButtonClickStyle/ButtonClickStyle+Buttons.swift @@ -0,0 +1,199 @@ +// +// ButtonClickStyle+Buttons.swift +// ButtonClickStyle_Example +// +// Created by Рустам Мотыгуллин on 11.04.2022. +// Copyright © 2022 CocoaPods. All rights reserved. +// + +import UIKit + +extension ButtonClick { + + //MARK: - Style + + public enum Buttons: String, CaseIterable { + case JustPink + case NoShadow + case Blue + case BuyNow + case Download + case Delete + case Search + case Subscribe + case Firefox + case Google + case GrButton + case Neomorphism + case TestButton + case Green + case TestRandom + case Test3Squares + + + public func name() -> String { + switch self { + case .JustPink: return "JustPink" + case .NoShadow: return "No shadow" + case .Blue: return "Blue" + case .BuyNow: return "BuyNow" + case .Download: return "Download" + case .Delete: return "Delete" + case .Search: return "Search" + case .Subscribe: return "Subscribe" + case .Firefox: return "Firefox" + case .Google: return "Google" + case .GrButton: return "Gr Button" + case .Neomorphism: return "Neomorphism" + case .TestButton: return "Test Button" + case .Green: return "Green" + case .TestRandom: return "Test Random" + case .Test3Squares: return "Test 3 Squares" + } + } + + static func newBtnView(_ type: ButtonClick.Buttons) -> BtnView? { + var c: BtnView + switch type { + case .JustPink: c = JustPinkButtonView() + case .NoShadow: c = JustPinkButtonView() + case .Blue: c = BlueButtonView() + case .BuyNow: c = BuyNowButtonView() + case .Download: c = DownloadButtonView() + case .Delete: c = DeleteButtonView() + case .Search: c = SearchButtonView() + case .Subscribe: c = SubscribeButtonView() + case .Firefox: c = FirefoxButtonView() + case .Google: c = GoogleButtonView() + case .GrButton: c = GradientBlueBasicButtonView() + case .Neomorphism: c = NeomorphismButtonView() + case .TestButton: c = TestDemoGradientButtonView() + case .Green: c = BorderGreenDarkButtonView() + case .Test3Squares: c = TestDemoSquaresButtonView() + case .TestRandom: c = TestDemoBlurButtonView() + } + return c + } + + + static func newBtnView(_ indx: Int) -> BtnView? { + var c: BtnView + switch indx { + case 0: c = JustPinkButtonView() + case 1: c = JustPinkButtonView() + case 2: c = BlueButtonView() + case 3: c = BuyNowButtonView() + case 4: c = DownloadButtonView() + case 5: c = DeleteButtonView() + case 6: c = SearchButtonView() + case 7: c = SubscribeButtonView() + case 8: c = FirefoxButtonView() + case 9: c = GoogleButtonView() + case 10: c = GradientBlueBasicButtonView() + case 11: c = NeomorphismButtonView() + case 12: c = TestDemoGradientButtonView() + case 13: c = BorderGreenDarkButtonView() + case 14: c = TestDemoSquaresButtonView() + case 15: c = TestDemoBlurButtonView() + default: + c = JustPinkButtonView() + } + return c + } + + public func index() -> Int { + switch self { + case .JustPink: return 0 + case .NoShadow: return 1 + case .Blue: return 2 + case .BuyNow: return 3 + case .Download: return 4 + case .Delete: return 5 + case .Search: return 6 + case .Subscribe: return 7 + case .Firefox: return 8 + case .Google: return 9 + case .GrButton: return 10 + case .Neomorphism: return 11 + case .TestButton: return 12 + case .Green: return 13 + case .Test3Squares: return 14 + case .TestRandom: return 15 + } + } + + public func type(index: Int) -> Buttons { + switch index { + case 0: return .JustPink + case 1: return .NoShadow + case 2: return .Blue + case 3: return .BuyNow + case 4: return .Download + case 5: return .Delete + case 6: return .Search + case 7: return .Subscribe + case 8: return .Firefox + case 9: return .Google + case 10: return .GrButton + case 11: return .Neomorphism + case 12: return .TestButton + case 13: return .Green + case 14: return .Test3Squares + case 15: return .TestRandom + default: + return .JustPink + } + } + + public static var allNameIndx: [Int] = ButtonClick.Buttons.allCases.map { $0.index() } + public static var allNameFull: [String] = ButtonClick.Buttons.allCases.map { $0.name() } + public static var allName: [String] = ButtonClick.Buttons.allCases.map { $0.rawValue } + public static var allCases: [ButtonClick.Buttons] = [ + .JustPink, + .NoShadow, + .Blue, + .BuyNow, + .Download, + .Delete, + .Search, + .Subscribe, + .Firefox, + .Google, + .GrButton, + .Neomorphism, + .TestButton, + .Green, + .Test3Squares, + .TestRandom + ] + + public static var allCases3: [ButtonClick.Buttons] = [ + .JustPink, + .NoShadow, + .Blue, + .Test3Squares, + .TestRandom + ] + + public static var shortNames: [String] = ButtonClick.Buttons.allCases.map { $0.rawValue } +// public static var shortCases: [ButtonClick.Buttons] = [ +// .JustPink, +// .NoShadow, +// .Blue, +// .BuyNow, +// .Download, +// .Delete, +// .Search, +// .Subscribe, +// .Firefox, +// .Google, +// .GrButton, +// .Neomorphism, +// .TestButton, +// .Green, +// ] + } +} + + + diff --git a/Example/ButtonClickStyle/Images.xcassets/imgLaunchStart.imageset/Contents.json b/Example/ButtonClickStyle/Images.xcassets/imgLaunchStart.imageset/Contents.json new file mode 100644 index 0000000..fd1a118 --- /dev/null +++ b/Example/ButtonClickStyle/Images.xcassets/imgLaunchStart.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "imgLaunchStart.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Example/ButtonClickStyle/Images.xcassets/imgLaunchStart.imageset/imgLaunchStart.png b/Example/ButtonClickStyle/Images.xcassets/imgLaunchStart.imageset/imgLaunchStart.png new file mode 100644 index 0000000..ce985e0 Binary files /dev/null and b/Example/ButtonClickStyle/Images.xcassets/imgLaunchStart.imageset/imgLaunchStart.png differ diff --git a/Example/ButtonClickStyle/Info.plist b/Example/ButtonClickStyle/Info.plist index 0945b75..892319d 100644 --- a/Example/ButtonClickStyle/Info.plist +++ b/Example/ButtonClickStyle/Info.plist @@ -54,6 +54,7 @@ UISupportedInterfaceOrientations UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight diff --git a/Example/ButtonClickStyle/UI/Button/Blue/BlueButtonView.swift b/Example/ButtonClickStyle/UI/Button/Blue/BlueButtonView.swift index 884392f..a8e8c88 100644 --- a/Example/ButtonClickStyle/UI/Button/Blue/BlueButtonView.swift +++ b/Example/ButtonClickStyle/UI/Button/Blue/BlueButtonView.swift @@ -3,13 +3,20 @@ import UIKit class BlueButtonView: BtnView { - @IBOutlet var mainView: DesignableView! + @IBOutlet var mainView: ButtonClickStyleDesignView! @IBOutlet private weak var titleLabel: UILabel? + @IBOutlet var backColor: ButtonClickStyleDesignView! override func fill(state: ButtonClick.State?) { guard let state = state else { return } self.state = state + + if !state.addBackgrondColor { + backgroundColor = .clear + } + backColor.isHidden = !state.addBackgrondColor + if let _ = state.animationType { let fr: CGRect = .init(x: 28, y: 22, width: 146, height: 49) let viewAn = ButtonClickStyleView( @@ -30,7 +37,9 @@ class BlueButtonView: BtnView { self.animation?.removeFromSuperview() self.animation = viewAn - mainView.origin = .zero + + + var frr = mainView.frame;frr.origin = .zero;mainView.frame = frr } titleLabel?.text = state.titleText diff --git a/Example/ButtonClickStyle/UI/Button/Blue/BlueButtonView.xib b/Example/ButtonClickStyle/UI/Button/Blue/BlueButtonView.xib index c551f54..632ae9d 100644 --- a/Example/ButtonClickStyle/UI/Button/Blue/BlueButtonView.xib +++ b/Example/ButtonClickStyle/UI/Button/Blue/BlueButtonView.xib @@ -8,8 +8,9 @@ - + + @@ -19,7 +20,22 @@ - + + + + + + + + + + + + + + + + - + - + @@ -49,7 +47,7 @@ - + diff --git a/Example/ButtonClickStyle/UI/Button/ButtonClickStyle+Buttons.swift b/Example/ButtonClickStyle/UI/Button/ButtonClickStyle+Buttons.swift deleted file mode 100644 index 2bf9024..0000000 --- a/Example/ButtonClickStyle/UI/Button/ButtonClickStyle+Buttons.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// ButtonClickStyle+Buttons.swift -// ButtonClickStyle_Example -// -// Created by Рустам Мотыгуллин on 11.04.2022. -// Copyright © 2022 CocoaPods. All rights reserved. -// - -import UIKit - -extension ButtonClick { - - //MARK: - Style - - public enum Buttons: String, CaseIterable { - case JustPink - case NoShadow - case Blue - case BuyNow - case Download - case Delete - case Search - case Subscribe - case Firefox - case Google - case GrButton - case Neomorphism - case TestButton - case Green - case TestRandom - case Test3Squares - - public static var allName: [String] = ButtonClick.Buttons.allCases.map { $0.rawValue } - public static var allCases: [ButtonClick.Buttons] = [ - .JustPink, - .NoShadow, - .Blue, - .BuyNow, - .Download, - .Delete, - .Search, - .Subscribe, - .Firefox, - .Google, - .GrButton, - .Neomorphism, - .TestButton, - .Green, - .TestRandom, - .Test3Squares - ] - - public static var shortNames: [String] = ButtonClick.Buttons.allCases.map { $0.rawValue } - public static var shortCases: [ButtonClick.Buttons] = [ - .JustPink, - .NoShadow, - .Blue, - .BuyNow, - .Download, - .Delete, - .Search, - .Subscribe, - .Firefox, - .Google, - .GrButton, - .Neomorphism, - .TestButton, - .Green, - ] - } -} - - - diff --git a/Example/ButtonClickStyle/UI/Button/BuyNow/BuyNowButtonView.swift b/Example/ButtonClickStyle/UI/Button/BuyNow/BuyNowButtonView.swift index 127c964..dbdc97a 100644 --- a/Example/ButtonClickStyle/UI/Button/BuyNow/BuyNowButtonView.swift +++ b/Example/ButtonClickStyle/UI/Button/BuyNow/BuyNowButtonView.swift @@ -4,7 +4,7 @@ import UIKit class BuyNowButtonView: BtnView { @IBOutlet var mainView: UIView! - @IBOutlet var borderView: DesignableView! + @IBOutlet var borderView: ButtonClickStyleDesignView! @IBOutlet var textLabel: UILabel! override func fill(state: ButtonClick.State?) { @@ -41,7 +41,7 @@ class BuyNowButtonView: BtnView { self.animation?.removeFromSuperview() self.animation = viewAn - mainView.origin = .zero + var frr = mainView.frame;frr.origin = .zero;mainView.frame = frr } textLabel.text = state.titleText diff --git a/Example/ButtonClickStyle/UI/Button/BuyNow/BuyNowButtonView.xib b/Example/ButtonClickStyle/UI/Button/BuyNow/BuyNowButtonView.xib index 7e11c1d..3c0bc9c 100644 --- a/Example/ButtonClickStyle/UI/Button/BuyNow/BuyNowButtonView.xib +++ b/Example/ButtonClickStyle/UI/Button/BuyNow/BuyNowButtonView.xib @@ -8,7 +8,7 @@ - + @@ -20,10 +20,10 @@ - + - + @@ -41,7 +41,7 @@ - - + diff --git a/Example/ButtonClickStyle/UI/Button/Neomorphism/NeomorphismButtonView.swift b/Example/ButtonClickStyle/UI/Button/Neomorphism/NeomorphismButtonView.swift index fff6003..92587f6 100644 --- a/Example/ButtonClickStyle/UI/Button/Neomorphism/NeomorphismButtonView.swift +++ b/Example/ButtonClickStyle/UI/Button/Neomorphism/NeomorphismButtonView.swift @@ -3,14 +3,14 @@ import UIKit class NeomorphismButtonView: BtnView { @IBOutlet var mainView: UIView! - @IBOutlet var fillView: DesignableView! + @IBOutlet var fillView: ButtonClickStyleDesignView! @IBOutlet private weak var titleLabel: UILabel? @IBOutlet var backColor: UIView! // MARK: Initialize override func awakeFromNib() { } - @IBOutlet var cardView: DesignableView! + @IBOutlet var cardView: ButtonClickStyleDesignView! override func fill(state: ButtonClick.State?) { guard let state = state else { return } @@ -67,7 +67,7 @@ class NeomorphismButtonView: BtnView { self.animation?.removeFromSuperview() self.animation = viewAn - mainView.origin = .zero + var frr = mainView.frame;frr.origin = .zero;mainView.frame = frr } titleLabel?.text = state.titleText diff --git a/Example/ButtonClickStyle/UI/Button/Neomorphism/NeomorphismButtonView.xib b/Example/ButtonClickStyle/UI/Button/Neomorphism/NeomorphismButtonView.xib index bd3606b..bebb788 100644 --- a/Example/ButtonClickStyle/UI/Button/Neomorphism/NeomorphismButtonView.xib +++ b/Example/ButtonClickStyle/UI/Button/Neomorphism/NeomorphismButtonView.xib @@ -1,8 +1,6 @@ - - @@ -25,10 +23,10 @@ - + - + @@ -42,7 +40,7 @@ - + @@ -62,7 +60,7 @@ - + @@ -82,7 +80,7 @@ - + @@ -102,7 +100,7 @@ - + @@ -119,7 +117,7 @@ - + diff --git a/Example/ButtonClickStyle/UI/Button/Search/SearchButtonView.swift b/Example/ButtonClickStyle/UI/Button/Search/SearchButtonView.swift index 6cea860..5daff8e 100644 --- a/Example/ButtonClickStyle/UI/Button/Search/SearchButtonView.swift +++ b/Example/ButtonClickStyle/UI/Button/Search/SearchButtonView.swift @@ -30,7 +30,7 @@ class SearchButtonView: BtnView { self.animation?.removeFromSuperview() self.animation = viewAn - mainView.origin = .zero + var frr = mainView.frame;frr.origin = .zero;mainView.frame = frr } titleLabel?.text = state.titleText diff --git a/Example/ButtonClickStyle/UI/Button/Search/SearchButtonView.xib b/Example/ButtonClickStyle/UI/Button/Search/SearchButtonView.xib index e344026..98f2231 100644 --- a/Example/ButtonClickStyle/UI/Button/Search/SearchButtonView.xib +++ b/Example/ButtonClickStyle/UI/Button/Search/SearchButtonView.xib @@ -1,8 +1,6 @@ - - @@ -19,7 +17,7 @@ - + diff --git a/Example/ButtonClickStyle/UI/Button/Subscribe/SubscribeButtonView.swift b/Example/ButtonClickStyle/UI/Button/Subscribe/SubscribeButtonView.swift index c4d08a7..58cf043 100644 --- a/Example/ButtonClickStyle/UI/Button/Subscribe/SubscribeButtonView.swift +++ b/Example/ButtonClickStyle/UI/Button/Subscribe/SubscribeButtonView.swift @@ -6,16 +6,44 @@ class SubscribeButtonView: BtnView { @IBOutlet private weak var titleLabel: UILabel? @IBOutlet private weak var secondImageView: UIImageView? + + @IBOutlet var backColor: ButtonClickStyleDesignView! + @IBOutlet var shadowVieww: ButtonClickStyleDesignView! + @IBOutlet var cardView: UIView! + @IBOutlet var fillView: ButtonClickStyleDesignView! + override func fill(state: ButtonClick.State?) { guard let state = state else { return } self.state = state - if let _ = state.animationType { + if let type = state.animationType { + + var addViews: [UIView]? = [] + if type == ButtonClick._Style.press.rawValue { + addViews = [cardView, shadowVieww] + } else if type == ButtonClick._Style.androidClickable.rawValue || + type == ButtonClick._Style.androidClickableDark.rawValue { + addViews = nil + } else if type == ButtonClick._Style.color.rawValue { + addViews = nil + + } else { + addViews = [mainView] + } + + + if !state.addBackgrondColor { + backgroundColor = .clear + } + backColor.isHidden = !state.addBackgrondColor + + let fr: CGRect = .init(x: 15 , y: 20.5, width: 172, height: 52) let viewAn = ButtonClickStyleView( state: state, frame: fr, - radius: 26 + radius: 26, + addViews: addViews ) viewAn.insertSubview(mainView, at: 0) viewAn.updateSubviews() @@ -29,7 +57,7 @@ class SubscribeButtonView: BtnView { self.animation?.removeFromSuperview() self.animation = viewAn - mainView.origin = .zero + var frr = mainView.frame;frr.origin = .zero;mainView.frame = frr } titleLabel?.text = state.titleText // secondImageView?.image = state.secondImage diff --git a/Example/ButtonClickStyle/UI/Button/Subscribe/SubscribeButtonView.xib b/Example/ButtonClickStyle/UI/Button/Subscribe/SubscribeButtonView.xib index b030151..e860094 100644 --- a/Example/ButtonClickStyle/UI/Button/Subscribe/SubscribeButtonView.xib +++ b/Example/ButtonClickStyle/UI/Button/Subscribe/SubscribeButtonView.xib @@ -8,11 +8,15 @@ - + + + + - - + + + @@ -20,47 +24,122 @@ - + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + - + - - - - - + + + + + + + - + - - - - - - - - - - + @@ -68,8 +147,12 @@ + + + + diff --git a/Example/ButtonClickStyle/UI/Button/TestDemoBlur/TestDemoBlurButtonView.swift b/Example/ButtonClickStyle/UI/Button/TestDemoBlur/TestDemoBlurButtonView.swift index 8a48403..e280d32 100644 --- a/Example/ButtonClickStyle/UI/Button/TestDemoBlur/TestDemoBlurButtonView.swift +++ b/Example/ButtonClickStyle/UI/Button/TestDemoBlur/TestDemoBlurButtonView.swift @@ -6,12 +6,12 @@ import UIKit class TestDemoBlurButtonView: BtnView { - @IBOutlet var shadowwView: DesignableView! - @IBOutlet var mainView: DesignableView! - @IBOutlet var groupView: DesignableView! + @IBOutlet var shadowwView: ButtonClickStyleDesignView! + @IBOutlet var mainView: ButtonClickStyleDesignView! + @IBOutlet var groupView: ButtonClickStyleDesignView! @IBOutlet var mainH: NSLayoutConstraint! @IBOutlet var mainW: NSLayoutConstraint! - @IBOutlet var fillView: DesignableView! + @IBOutlet var fillView: ButtonClickStyleDesignView! @IBOutlet private weak var titleLabel: UILabel? override func fill(state: ButtonClick.State?) { @@ -75,7 +75,10 @@ class TestDemoBlurButtonView: BtnView { self.animation?.removeFromSuperview() self.animation = viewAn - mainView.origin = .zero + + var frr = mainView.frame + frr.origin = .zero + mainView.frame = frr } titleLabel?.text = state.titleText diff --git a/Example/ButtonClickStyle/UI/Button/TestDemoBlur/TestDemoBlurButtonView.xib b/Example/ButtonClickStyle/UI/Button/TestDemoBlur/TestDemoBlurButtonView.xib index 30f7481..188e2ab 100644 --- a/Example/ButtonClickStyle/UI/Button/TestDemoBlur/TestDemoBlurButtonView.xib +++ b/Example/ButtonClickStyle/UI/Button/TestDemoBlur/TestDemoBlurButtonView.xib @@ -7,7 +7,7 @@ - + @@ -23,13 +23,13 @@ - + - + - + @@ -59,7 +59,7 @@ - + diff --git a/Example/ButtonClickStyle/UI/Button/TestDemoGradient/TestDemoGradientButtonView.swift b/Example/ButtonClickStyle/UI/Button/TestDemoGradient/TestDemoGradientButtonView.swift index c000fe9..45d48a9 100644 --- a/Example/ButtonClickStyle/UI/Button/TestDemoGradient/TestDemoGradientButtonView.swift +++ b/Example/ButtonClickStyle/UI/Button/TestDemoGradient/TestDemoGradientButtonView.swift @@ -6,12 +6,12 @@ import UIKit class TestDemoGradientButtonView: BtnView { - @IBOutlet var shadowwView: DesignableView! - @IBOutlet var fillView: DesignableView! + @IBOutlet var shadowwView: ButtonClickStyleDesignView! + @IBOutlet var fillView: ButtonClickStyleDesignView! @IBOutlet var mainView: UIView! @IBOutlet private weak var titleLabel: UILabel? - @IBOutlet var backColor: DesignableView! + @IBOutlet var backColor: ButtonClickStyleDesignView! override func fill(state: ButtonClick.State?) { guard let state = state else { return } self.state = state @@ -52,7 +52,10 @@ class TestDemoGradientButtonView: BtnView { self.animation?.removeFromSuperview() self.animation = viewAn - mainView.origin = .zero + + var frr = mainView.frame + frr.origin = .zero + mainView.frame = frr } titleLabel?.text = state.titleText diff --git a/Example/ButtonClickStyle/UI/Button/TestDemoGradient/TestDemoGradientButtonView.xib b/Example/ButtonClickStyle/UI/Button/TestDemoGradient/TestDemoGradientButtonView.xib index e403555..45e50bd 100644 --- a/Example/ButtonClickStyle/UI/Button/TestDemoGradient/TestDemoGradientButtonView.xib +++ b/Example/ButtonClickStyle/UI/Button/TestDemoGradient/TestDemoGradientButtonView.xib @@ -1,8 +1,6 @@ - - @@ -22,7 +20,7 @@ - + @@ -34,10 +32,10 @@ - + - + @@ -61,7 +59,7 @@ - + diff --git a/Example/ButtonClickStyle/UI/Button/TestDemoSquares/TestDemoSquaresButtonView.swift b/Example/ButtonClickStyle/UI/Button/TestDemoSquares/TestDemoSquaresButtonView.swift index 69ef1cd..39df734 100644 --- a/Example/ButtonClickStyle/UI/Button/TestDemoSquares/TestDemoSquaresButtonView.swift +++ b/Example/ButtonClickStyle/UI/Button/TestDemoSquares/TestDemoSquaresButtonView.swift @@ -8,7 +8,7 @@ class TestDemoSquaresButtonView: BtnView { @IBOutlet var mainView: UIView! - @IBOutlet var firstView: DesignableView! + @IBOutlet var firstView: ButtonClickStyleDesignView! override func fill(state: ButtonClick.State?) { guard let state = state else { return } self.state = state @@ -42,7 +42,7 @@ class TestDemoSquaresButtonView: BtnView { self.animation?.removeFromSuperview() self.animation = viewAn - mainView.origin = .zero + var frr = mainView.frame;frr.origin = .zero;mainView.frame = frr } diff --git a/Example/ButtonClickStyle/UI/Button/TestDemoSquares/TestDemoSquaresButtonView.xib b/Example/ButtonClickStyle/UI/Button/TestDemoSquares/TestDemoSquaresButtonView.xib index 6696125..1ea4b93 100644 --- a/Example/ButtonClickStyle/UI/Button/TestDemoSquares/TestDemoSquaresButtonView.xib +++ b/Example/ButtonClickStyle/UI/Button/TestDemoSquares/TestDemoSquaresButtonView.xib @@ -9,7 +9,7 @@ - + @@ -24,7 +24,7 @@ - + @@ -34,7 +34,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -71,7 +71,6 @@ - diff --git a/Example/ButtonClickStyle/UI/Cell/ButtonListCell/ButtonListCell.swift b/Example/ButtonClickStyle/UI/Cell/ButtonListCell/ButtonListCell.swift index 1ffa4bb..7f0c520 100644 --- a/Example/ButtonClickStyle/UI/Cell/ButtonListCell/ButtonListCell.swift +++ b/Example/ButtonClickStyle/UI/Cell/ButtonListCell/ButtonListCell.swift @@ -115,33 +115,10 @@ class ButtonListCell: TableAdapterCell { labelsAdded.removeAll() - var child: BtnView? + let child: BtnView? = ButtonClick.Buttons.newBtnView(buttonType) - switch buttonType { // - case 0: child = JustPinkButtonView() - case 1: child = JustPinkButtonView() - case 2: child = BlueButtonView() - case 3: child = BuyNowButtonView() - case 4: child = DownloadButtonView() - case 5: child = DeleteButtonView() - case 6: child = SearchButtonView() - case 7: child = SubscribeButtonView() - case 8: child = FirefoxButtonView() - case 9: child = GoogleButtonView() - case 10: child = GradientBlueBasicButtonView() - case 11: child = NeomorphismButtonView() - case 12: child = TestDemoGradientButtonView() - case 13: child = TestDemoBlurButtonView() - case 14: child = TestDemoSquaresButtonView() - case 15: child = BorderGreenDarkButtonView() - default: break - } - - self.titleLabel?.text = ButtonClick.Buttons.shortNames[buttonType] // .name - self.subtitleLabel?.text = clickAnimType.base - self.label2?.text = clickAnimType.emoji.color - self.label3?.text = clickAnimType.emoji.repeats.isEmpty ? "" : "☑️" - self.label4?.text = clickAnimType.emoji.new //.isEmpty ? "" : "☑️" + self.subtitleLabel?.text = ButtonClick.Buttons.allNameFull[buttonType] // .name + self.titleLabel?.text = clickAnimType.base if let child = child { child.fill(state: state) diff --git a/Example/ButtonClickStyle/UI/Cell/ButtonListCell/ButtonListCell.xib b/Example/ButtonClickStyle/UI/Cell/ButtonListCell/ButtonListCell.xib index bd09445..e0ed22b 100644 --- a/Example/ButtonClickStyle/UI/Cell/ButtonListCell/ButtonListCell.xib +++ b/Example/ButtonClickStyle/UI/Cell/ButtonListCell/ButtonListCell.xib @@ -10,83 +10,48 @@ - + - + - - + + + + + + + + + + + + + + - + @@ -95,7 +60,11 @@ + + + + @@ -104,10 +73,8 @@ - - - + diff --git a/Example/ButtonClickStyle/UI/Screen/ExampleButtons/ExampleButtonsViewController.storyboard b/Example/ButtonClickStyle/UI/ScreenIPad/ExampleButtons/ExampleButtonsViewController.storyboard similarity index 99% rename from Example/ButtonClickStyle/UI/Screen/ExampleButtons/ExampleButtonsViewController.storyboard rename to Example/ButtonClickStyle/UI/ScreenIPad/ExampleButtons/ExampleButtonsViewController.storyboard index 170131f..9566432 100644 --- a/Example/ButtonClickStyle/UI/Screen/ExampleButtons/ExampleButtonsViewController.storyboard +++ b/Example/ButtonClickStyle/UI/ScreenIPad/ExampleButtons/ExampleButtonsViewController.storyboard @@ -12,7 +12,7 @@ - + @@ -136,7 +136,7 @@ - +