diff --git a/NohanaImagePicker/AssetCell.swift b/NohanaImagePicker/AssetCell.swift index 957bd1e..0ed54d9 100644 --- a/NohanaImagePicker/AssetCell.swift +++ b/NohanaImagePicker/AssetCell.swift @@ -29,7 +29,7 @@ class AssetCell: UICollectionViewCell { } @IBAction func didPushPickButton(sender: UIButton) { - guard let asset = asset, nohanaImagePickerController = nohanaImagePickerController else { + guard let asset = asset else { return } if pickButton.selected { diff --git a/NohanaImagePicker/AssetDetailListViewController.swift b/NohanaImagePicker/AssetDetailListViewController.swift index 9cfba15..9d4cc45 100644 --- a/NohanaImagePicker/AssetDetailListViewController.swift +++ b/NohanaImagePicker/AssetDetailListViewController.swift @@ -81,8 +81,7 @@ class AssetDetailListViewController: AssetListViewController { // MARK: - UICollectionViewDelegate override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { - guard let cell = collectionView.dequeueReusableCellWithReuseIdentifier("AssetDetailCell", forIndexPath: indexPath) as? AssetDetailCell, - nohanaImagePickerController = nohanaImagePickerController + guard let cell = collectionView.dequeueReusableCellWithReuseIdentifier("AssetDetailCell", forIndexPath: indexPath) as? AssetDetailCell else { fatalError("failed to dequeueReusableCellWithIdentifier(\"AssetDetailCell\")") } diff --git a/NohanaImagePicker/AssetListViewController.swift b/NohanaImagePicker/AssetListViewController.swift index b1370fc..6c39e93 100644 --- a/NohanaImagePicker/AssetListViewController.swift +++ b/NohanaImagePicker/AssetListViewController.swift @@ -83,8 +83,7 @@ class AssetListViewController: UICollectionViewController { } override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { - guard let cell = collectionView.dequeueReusableCellWithReuseIdentifier("AssetCell", forIndexPath: indexPath) as? AssetCell, - nohanaImagePickerController = nohanaImagePickerController else { + guard let cell = collectionView.dequeueReusableCellWithReuseIdentifier("AssetCell", forIndexPath: indexPath) as? AssetCell else { fatalError("failed to dequeueReusableCellWithIdentifier(\"AssetCell\")") } cell.tag = indexPath.item diff --git a/NohanaImagePicker/MomentViewController.swift b/NohanaImagePicker/MomentViewController.swift index f46b2c6..c782912 100644 --- a/NohanaImagePicker/MomentViewController.swift +++ b/NohanaImagePicker/MomentViewController.swift @@ -53,8 +53,7 @@ class MomentViewController: AssetListViewController, ActivityIndicatable { // MARK: - UICollectionViewDelegate override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { - guard let cell = collectionView.dequeueReusableCellWithReuseIdentifier("AssetCell", forIndexPath: indexPath) as? AssetCell, - nohanaImagePickerController = nohanaImagePickerController else { + guard let cell = collectionView.dequeueReusableCellWithReuseIdentifier("AssetCell", forIndexPath: indexPath) as? AssetCell else { return UICollectionViewCell(frame: CGRectZero) }