From b27bd9d0e24faca5f9dc5586aff6976ccf9aeb44 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Fri, 14 Sep 2018 12:22:07 +0300 Subject: [PATCH] code review notes --- .../TableKit/TableDirector/TableDirector+Extensions.swift | 2 ++ .../Protocols/NumberFormattingService/NSNumberConvertible.swift | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/Extensions/TableKit/TableDirector/TableDirector+Extensions.swift b/Sources/Extensions/TableKit/TableDirector/TableDirector+Extensions.swift index 0f810c79..8a828716 100644 --- a/Sources/Extensions/TableKit/TableDirector/TableDirector+Extensions.swift +++ b/Sources/Extensions/TableKit/TableDirector/TableDirector+Extensions.swift @@ -127,6 +127,7 @@ public extension TableDirector { at indexPath: IndexPath, with animation: UITableViewRowAnimation, manualBeginEndUpdates: Bool = false) { + sections[indexPath.section].insert(rows: rows, at: indexPath.row) let indexPaths: [IndexPath] = rows.indices.map { IndexPath(row: indexPath.row + $0, section: indexPath.section) @@ -152,6 +153,7 @@ public extension TableDirector { startingAt indexPath: IndexPath, with animation: UITableViewRowAnimation, manualBeginEndUpdates: Bool = false) { + var indexPaths = [IndexPath]() for index in indexPath.row ..< indexPath.row + rowsCount { indexPaths.append(IndexPath(row: index, section: indexPath.section)) diff --git a/Sources/Protocols/NumberFormattingService/NSNumberConvertible.swift b/Sources/Protocols/NumberFormattingService/NSNumberConvertible.swift index ee13c25b..50b4563c 100644 --- a/Sources/Protocols/NumberFormattingService/NSNumberConvertible.swift +++ b/Sources/Protocols/NumberFormattingService/NSNumberConvertible.swift @@ -25,7 +25,7 @@ import Foundation /// Protocol describes type that can be converted to NSNumber. public protocol NSNumberConvertible { - /// Convert value to NSNumber. + /// NSNumber representation of value. /// /// - Returns: A value, expressed as an NSNumber. func asNSNumber() -> NSNumber