Merge pull request 'fix warnings' (#1) from fix/xcode_15 into master
Reviewed-on: #1
This commit is contained in:
commit
3fefa09c3a
|
|
@ -5,6 +5,9 @@ import PackageDescription
|
||||||
|
|
||||||
let package = Package(
|
let package = Package(
|
||||||
name: "TableKit",
|
name: "TableKit",
|
||||||
|
platforms: [
|
||||||
|
.iOS(.v12)
|
||||||
|
],
|
||||||
|
|
||||||
products: [
|
products: [
|
||||||
.library(
|
.library(
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
public protocol ExpandableCellViewModel: class {
|
public protocol ExpandableCellViewModel: AnyObject {
|
||||||
|
|
||||||
var expandableState: ExpandableState { get set }
|
var expandableState: ExpandableState { get set }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -414,35 +414,35 @@ open class TableDirector: NSObject, UITableViewDataSource, UITableViewDelegate {
|
||||||
extension TableDirector {
|
extension TableDirector {
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
open func append(section: TableSection) -> Self {
|
public func append(section: TableSection) -> Self {
|
||||||
|
|
||||||
append(sections: [section])
|
append(sections: [section])
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
open func append(sections: [TableSection]) -> Self {
|
public func append(sections: [TableSection]) -> Self {
|
||||||
|
|
||||||
self.sections.append(contentsOf: sections)
|
self.sections.append(contentsOf: sections)
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
open func append(rows: [Row]) -> Self {
|
public func append(rows: [Row]) -> Self {
|
||||||
|
|
||||||
append(section: TableSection(rows: rows))
|
append(section: TableSection(rows: rows))
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
open func insert(section: TableSection, atIndex index: Int) -> Self {
|
public func insert(section: TableSection, atIndex index: Int) -> Self {
|
||||||
|
|
||||||
sections.insert(section, at: index)
|
sections.insert(section, at: index)
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
open func replaceSection(at index: Int, with section: TableSection) -> Self {
|
public func replaceSection(at index: Int, with section: TableSection) -> Self {
|
||||||
|
|
||||||
if index < sections.count {
|
if index < sections.count {
|
||||||
sections[index] = section
|
sections[index] = section
|
||||||
|
|
@ -451,19 +451,19 @@ extension TableDirector {
|
||||||
}
|
}
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
open func delete(sectionAt index: Int) -> Self {
|
public func delete(sectionAt index: Int) -> Self {
|
||||||
|
|
||||||
sections.remove(at: index)
|
sections.remove(at: index)
|
||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
open func remove(sectionAt index: Int) -> Self {
|
public func remove(sectionAt index: Int) -> Self {
|
||||||
return delete(sectionAt: index)
|
return delete(sectionAt: index)
|
||||||
}
|
}
|
||||||
|
|
||||||
@discardableResult
|
@discardableResult
|
||||||
open func clear() -> Self {
|
public func clear() -> Self {
|
||||||
|
|
||||||
rowHeightCalculator?.invalidate()
|
rowHeightCalculator?.invalidate()
|
||||||
sections.removeAll()
|
sections.removeAll()
|
||||||
|
|
@ -474,7 +474,7 @@ extension TableDirector {
|
||||||
// MARK: - deprecated methods
|
// MARK: - deprecated methods
|
||||||
@available(*, deprecated, message: "Use 'delete(sectionAt:)' method instead")
|
@available(*, deprecated, message: "Use 'delete(sectionAt:)' method instead")
|
||||||
@discardableResult
|
@discardableResult
|
||||||
open func delete(index: Int) -> Self {
|
public func delete(index: Int) -> Self {
|
||||||
|
|
||||||
sections.remove(at: index)
|
sections.remove(at: index)
|
||||||
return self
|
return self
|
||||||
|
|
|
||||||
|
|
@ -37,14 +37,8 @@ public protocol RowConfigurable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public protocol RowActionable {
|
public protocol RowActionable {
|
||||||
|
|
||||||
@available(iOS 11, *)
|
|
||||||
var leadingContextualActions: [UIContextualAction] { get }
|
var leadingContextualActions: [UIContextualAction] { get }
|
||||||
|
|
||||||
@available(iOS 11, *)
|
|
||||||
var trailingContextualActions: [UIContextualAction] { get }
|
var trailingContextualActions: [UIContextualAction] { get }
|
||||||
|
|
||||||
@available(iOS 11, *)
|
|
||||||
var performsFirstActionWithFullSwipe: Bool { get }
|
var performsFirstActionWithFullSwipe: Bool { get }
|
||||||
|
|
||||||
@available(iOS, deprecated: 11, message: "Use leadingContextualActions, trailingContextualActions instead")
|
@available(iOS, deprecated: 11, message: "Use leadingContextualActions, trailingContextualActions instead")
|
||||||
|
|
|
||||||
|
|
@ -28,17 +28,14 @@ open class TableRow<CellType: ConfigurableCell>: Row where CellType: UITableView
|
||||||
@available(iOS, deprecated: 11, message: "Use leadingContextualActions, trailingContextualActions instead")
|
@available(iOS, deprecated: 11, message: "Use leadingContextualActions, trailingContextualActions instead")
|
||||||
open private(set) var editingActions: [UITableViewRowAction]?
|
open private(set) var editingActions: [UITableViewRowAction]?
|
||||||
|
|
||||||
@available(iOS 11, *)
|
|
||||||
open var leadingContextualActions: [UIContextualAction] {
|
open var leadingContextualActions: [UIContextualAction] {
|
||||||
[]
|
[]
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(iOS 11, *)
|
|
||||||
open var trailingContextualActions: [UIContextualAction] {
|
open var trailingContextualActions: [UIContextualAction] {
|
||||||
[]
|
[]
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(iOS 11, *)
|
|
||||||
open var performsFirstActionWithFullSwipe: Bool {
|
open var performsFirstActionWithFullSwipe: Bool {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
@ -78,7 +75,6 @@ open class TableRow<CellType: ConfigurableCell>: Row where CellType: UITableView
|
||||||
actions?.forEach { on($0) }
|
actions?.forEach { on($0) }
|
||||||
}
|
}
|
||||||
|
|
||||||
@available(iOS 11, *)
|
|
||||||
public init(item: CellType.CellData,
|
public init(item: CellType.CellData,
|
||||||
actions: [TableRowAction<CellType>]? = nil) {
|
actions: [TableRowAction<CellType>]? = nil) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,15 @@ Pod::Spec.new do |s|
|
||||||
s.name = 'TableKit'
|
s.name = 'TableKit'
|
||||||
s.module_name = 'TableKit'
|
s.module_name = 'TableKit'
|
||||||
|
|
||||||
s.version = '2.11.0'
|
s.version = '2.11.1'
|
||||||
|
|
||||||
s.homepage = 'https://github.com/maxsokolov/TableKit'
|
s.homepage = 'https://github.com/maxsokolov/TableKit'
|
||||||
s.summary = 'Type-safe declarative table views with Swift.'
|
s.summary = 'Type-safe declarative table views with Swift.'
|
||||||
|
|
||||||
s.author = { 'Max Sokolov' => 'i@maxsokolov.net' }
|
s.author = { 'Max Sokolov' => 'i@maxsokolov.net' }
|
||||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||||
s.platforms = { :ios => '8.0' }
|
s.platforms = { :ios => '12.0' }
|
||||||
s.ios.deployment_target = '8.0'
|
s.ios.deployment_target = '12.0'
|
||||||
|
|
||||||
s.source_files = 'Sources/*.swift'
|
s.source_files = 'Sources/*.swift'
|
||||||
s.source = { :git => 'https://github.com/maxsokolov/TableKit.git', :tag => s.version }
|
s.source = { :git => 'https://github.com/maxsokolov/TableKit.git', :tag => s.version }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue