Skip to content

Commit

Permalink
Merge pull request hyperoslo#101 from aronse/feature/fix-reset-assets…
Browse files Browse the repository at this point in the history
…-collectionview

fix reloadAssets still showing pictures as selected in collection view
  • Loading branch information
zenangst committed Feb 15, 2016
2 parents 8fabb2f + 38aa96b commit abfec59
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Source/ImagePickerController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public class ImagePickerController: UIViewController {
object: nil)

NSNotificationCenter.defaultCenter().addObserver(self,
selector: "adjustButtonTitle:",
selector: "didReloadAssets:",
name: ImageStack.Notifications.stackDidReload,
object: nil)

Expand All @@ -168,6 +168,12 @@ public class ImagePickerController: UIViewController {
object: nil)
}

func didReloadAssets(notification: NSNotification) {
adjustButtonTitle(notification)
galleryView.collectionView.reloadData()
galleryView.collectionView.setContentOffset(CGPointZero, animated: false)
}

func volumeChanged(notification: NSNotification) {
guard let slider = volumeView.subviews.filter({ $0 is UISlider }).first as? UISlider,
let userInfo = notification.userInfo,
Expand Down

0 comments on commit abfec59

Please sign in to comment.