From 162aee003316116744caabd1e1e43c9679ace263 Mon Sep 17 00:00:00 2001 From: Max Sokolov Date: Tue, 18 Oct 2016 20:44:44 +0300 Subject: [PATCH] add any action --- Sources/TableRowAnyAction.swift | 30 ++++++++++++++++++++++++++++++ TableKit.xcodeproj/project.pbxproj | 4 ++++ 2 files changed, 34 insertions(+) create mode 100644 Sources/TableRowAnyAction.swift diff --git a/Sources/TableRowAnyAction.swift b/Sources/TableRowAnyAction.swift new file mode 100644 index 0000000..85515ec --- /dev/null +++ b/Sources/TableRowAnyAction.swift @@ -0,0 +1,30 @@ +// +// TableRowAnyAction.swift +// TableKit +// +// Created by Max Sokolov on 18/10/16. +// Copyright © 2016 Max Sokolov. All rights reserved. +// + +import UIKit + +open class TableRowAnyActionOptions { + + +} + +open class TableRowAnyAction { + + open var id: String? + open let type: TableRowActionType + + init(_ type: TableRowActionType, handler: @escaping () -> ()) { + + self.type = type + } + + func invoke(cell: UITableViewCell?, item: Any, path: IndexPath, userInfo: [AnyHashable: Any]?) -> Any? { + + return nil + } +} diff --git a/TableKit.xcodeproj/project.pbxproj b/TableKit.xcodeproj/project.pbxproj index c2ace6d..05181b0 100644 --- a/TableKit.xcodeproj/project.pbxproj +++ b/TableKit.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 50826A001DB694CF002AABB5 /* TableRowAnyAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 508269FF1DB694CF002AABB5 /* TableRowAnyAction.swift */; }; 50CF6E6B1D6704FE004746FF /* TableCellRegisterer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50CF6E6A1D6704FE004746FF /* TableCellRegisterer.swift */; }; 50E858581DB153F500A9AA55 /* TableKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E858571DB153F500A9AA55 /* TableKit.swift */; }; DA9EA7AF1D0EC2C90021F650 /* ConfigurableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA9EA7A61D0EC2C90021F650 /* ConfigurableCell.swift */; }; @@ -32,6 +33,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 508269FF1DB694CF002AABB5 /* TableRowAnyAction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableRowAnyAction.swift; sourceTree = ""; }; 50CF6E6A1D6704FE004746FF /* TableCellRegisterer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableCellRegisterer.swift; sourceTree = ""; }; 50E858571DB153F500A9AA55 /* TableKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableKit.swift; sourceTree = ""; }; DA9EA7561D0B679A0021F650 /* TableKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TableKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -94,6 +96,7 @@ DA9EA7AA1D0EC2C90021F650 /* TableDirector.swift */, 50CF6E6A1D6704FE004746FF /* TableCellRegisterer.swift */, DA9EA7AB1D0EC2C90021F650 /* TableRow.swift */, + 508269FF1DB694CF002AABB5 /* TableRowAnyAction.swift */, DA9EA7AC1D0EC2C90021F650 /* TableRowAction.swift */, DA9EA7AE1D0EC2C90021F650 /* TableSection.swift */, DA9EA7A91D0EC2C90021F650 /* TableCellAction.swift */, @@ -237,6 +240,7 @@ DA9EA7B01D0EC2C90021F650 /* TablePrototypeCellHeightCalculator.swift in Sources */, DA9EA7B51D0EC2C90021F650 /* TableRowAction.swift in Sources */, DA9EA7B21D0EC2C90021F650 /* TableCellAction.swift in Sources */, + 50826A001DB694CF002AABB5 /* TableRowAnyAction.swift in Sources */, DA9EA7B11D0EC2C90021F650 /* Operators.swift in Sources */, DA9EA7B41D0EC2C90021F650 /* TableRow.swift in Sources */, 50E858581DB153F500A9AA55 /* TableKit.swift in Sources */,