code review notes

This commit is contained in:
Ivan Smolin 2018-09-14 12:22:07 +03:00
parent 30bec8e9c7
commit b27bd9d0e2
2 changed files with 3 additions and 1 deletions

View File

@ -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))

View File

@ -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