From 01e93cc4e3e119a2f8802f00859ee3ba25158d68 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Tue, 27 Mar 2018 11:12:50 +0300 Subject: [PATCH] Move VoidBlock from LeadKitAdditions. closes https://github.com/TouchInstinct/LeadKit/issues/104 --- LeadKit.xcodeproj/project.pbxproj | 10 ++++++++++ Sources/Functions/VoidBlock.swift | 26 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 Sources/Functions/VoidBlock.swift diff --git a/LeadKit.xcodeproj/project.pbxproj b/LeadKit.xcodeproj/project.pbxproj index 5af56a6a..f304d796 100644 --- a/LeadKit.xcodeproj/project.pbxproj +++ b/LeadKit.xcodeproj/project.pbxproj @@ -276,6 +276,10 @@ 671463CF1EB34B1E00EAB194 /* TestView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 671463B71EB34B1E00EAB194 /* TestView.xib */; }; 67186B311EB248F100CFAFFB /* LeadKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67186B281EB248F100CFAFFB /* LeadKit.framework */; }; 67186B3F1EB24A1900CFAFFB /* LeadKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 67186B201EB247A200CFAFFB /* LeadKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 671AD25C206A343300EAF887 /* VoidBlock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671AD25B206A343300EAF887 /* VoidBlock.swift */; }; + 671AD25D206A343300EAF887 /* VoidBlock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671AD25B206A343300EAF887 /* VoidBlock.swift */; }; + 671AD25E206A343300EAF887 /* VoidBlock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671AD25B206A343300EAF887 /* VoidBlock.swift */; }; + 671AD25F206A343300EAF887 /* VoidBlock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671AD25B206A343300EAF887 /* VoidBlock.swift */; }; 673564F12068C2AD00F0CBED /* NumberFormattingService+DefaultImplementation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 673564F02068C2AD00F0CBED /* NumberFormattingService+DefaultImplementation.swift */; }; 673564F22068C2AD00F0CBED /* NumberFormattingService+DefaultImplementation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 673564F02068C2AD00F0CBED /* NumberFormattingService+DefaultImplementation.swift */; }; 673564F32068C2AD00F0CBED /* NumberFormattingService+DefaultImplementation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 673564F02068C2AD00F0CBED /* NumberFormattingService+DefaultImplementation.swift */; }; @@ -642,6 +646,7 @@ 67186B301EB248F100CFAFFB /* LeadKit iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "LeadKit iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 67186B411EB24AA000CFAFFB /* iOS.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = iOS.playground; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; 67186C1A1EB24B7800CFAFFB /* Info-iOS.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info-iOS.plist"; sourceTree = ""; }; + 671AD25B206A343300EAF887 /* VoidBlock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoidBlock.swift; sourceTree = ""; }; 673564F02068C2AD00F0CBED /* NumberFormattingService+DefaultImplementation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NumberFormattingService+DefaultImplementation.swift"; sourceTree = ""; }; 673564F52068C68D00F0CBED /* NumberFormat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumberFormat.swift; sourceTree = ""; }; 673CF40A2063AB7C00C329F6 /* GeneralDataLoadingViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeneralDataLoadingViewModel.swift; sourceTree = ""; }; @@ -1087,6 +1092,7 @@ children = ( A676AE4C1F9810C1001F9214 /* Any+Cast.swift */, 671462211EB3396E00EAB194 /* Any+TypeName.swift */, + 671AD25B206A343300EAF887 /* VoidBlock.swift */, ); path = Functions; sourceTree = ""; @@ -2454,6 +2460,7 @@ A6D10EAB1F8A9278003E69DD /* Comparable+Extensions.swift in Sources */, 671463801EB3396E00EAB194 /* PaddingDrawingOperation.swift in Sources */, 671463281EB3396E00EAB194 /* BaseViewModel.swift in Sources */, + 671AD25C206A343300EAF887 /* VoidBlock.swift in Sources */, A6E0DDDF1F8A696F002CA74E /* SeparatorCell.swift in Sources */, 671462AC1EB3396E00EAB194 /* Observable+DeferredJust.swift in Sources */, 671463001EB3396E00EAB194 /* UIView+LoadFromNib.swift in Sources */, @@ -2649,6 +2656,7 @@ 6714638E1EB3396E00EAB194 /* SolidFillDrawingOperation.swift in Sources */, 6774529420625D170024EEEF /* GeneralDataLoadingModel.swift in Sources */, 67FDC2611FA310EA00C76A77 /* RequestError.swift in Sources */, + 671AD25E206A343300EAF887 /* VoidBlock.swift in Sources */, 671462521EB3396E00EAB194 /* StaticCursor.swift in Sources */, 6714629E1EB3396E00EAB194 /* CursorType+Slice.swift in Sources */, 6714636A1EB3396E00EAB194 /* ConfigurableView.swift in Sources */, @@ -2721,6 +2729,7 @@ A676AE581F981131001F9214 /* ObservableMappable.swift in Sources */, 671463731EB3396E00EAB194 /* ApiRequestParameters.swift in Sources */, 671462EF1EB3396E00EAB194 /* UIImage+Extensions.swift in Sources */, + 671AD25F206A343300EAF887 /* VoidBlock.swift in Sources */, 6774526A206249360024EEEF /* UITableView+PaginationWrappable.swift in Sources */, 6714636F1EB3396E00EAB194 /* XibNameProtocol.swift in Sources */, EFBE57DE1EC361620040E00A /* UIView+Layout.swift in Sources */, @@ -2832,6 +2841,7 @@ 671463851EB3396E00EAB194 /* ResizeDrawingOperation.swift in Sources */, 673564F22068C2AD00F0CBED /* NumberFormattingService+DefaultImplementation.swift in Sources */, 671462D11EB3396E00EAB194 /* UIScrollView+Support.swift in Sources */, + 671AD25D206A343300EAF887 /* VoidBlock.swift in Sources */, 6774528E20625C9E0024EEEF /* GeneralDataLoadingState.swift in Sources */, 671463911EB3396E00EAB194 /* TemplateDrawingOperation.swift in Sources */, 67EB7FEC2061667900BDD9FB /* DefaultTotalCountCursorListingResult.swift in Sources */, diff --git a/Sources/Functions/VoidBlock.swift b/Sources/Functions/VoidBlock.swift new file mode 100644 index 00000000..f064c486 --- /dev/null +++ b/Sources/Functions/VoidBlock.swift @@ -0,0 +1,26 @@ +// +// Copyright (c) 2018 Touch Instinct +// +// 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 Foundation + +/// Closure that takes no arguments and return Void. +public typealias VoidBlock = () -> Void