OSDN Git Service

NSIndexSet -> IndexSet
authormasakih <masakih@users.sourceforge.jp>
Mon, 13 Aug 2018 13:37:48 +0000 (22:37 +0900)
committermasakih <masakih@users.sourceforge.jp>
Mon, 13 Aug 2018 13:37:48 +0000 (22:37 +0900)
KCD/ScreenshotListViewController.swift

index 127f478..1a5bc1e 100644 (file)
@@ -147,7 +147,7 @@ final class ScreenshotListViewController: NSViewController {
                         let info = ScreenshotInformation(url: url)
                         
                         self.screenshotsController.insert(info, atArrangedObjectIndex: 0)
                         let info = ScreenshotInformation(url: url)
                         
                         self.screenshotsController.insert(info, atArrangedObjectIndex: 0)
-                        let set: Set<IndexPath> = [NSIndexPath(forItem: 0, inSection: 0) as IndexPath]
+                        let set: Set<IndexPath> = [IndexPath(item: 0, section: 0)]
                         self.collectionView.selectionIndexPaths = set
                         
                         self.collectionView.scrollToItems(at: set, scrollPosition: .nearestHorizontalEdge)
                         self.collectionView.selectionIndexPaths = set
                         
                         self.collectionView.scrollToItems(at: set, scrollPosition: .nearestHorizontalEdge)
@@ -221,7 +221,7 @@ final class ScreenshotListViewController: NSViewController {
                     
                     self.screenshots.screenshots = screenshots
                     
                     
                     self.screenshots.screenshots = screenshots
                     
-                    self.collectionView.selectionIndexPaths = [NSIndexPath(forItem: 0, inSection: 0) as IndexPath]
+                    self.collectionView.selectionIndexPaths = [IndexPath(item: 0, section: 0)]
                     
                     self.reloadHandler?()
                 }
                     
                     self.reloadHandler?()
                 }