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