Skip to content

Commit

Permalink
:sparkles; Add interface for simple reload
Browse files Browse the repository at this point in the history
  • Loading branch information
bannzai committed Sep 20, 2018
1 parent 0d880a6 commit 2dbc781
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Conv/Conv/UICollectionViewExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ public extension UICollectionView {
}
})
}

public func reload() {
if convForOverwrite == nil {
reloadData()
return
}

shiftConv()
reloadData()
}
}

fileprivate struct UICollectionViewAssociatedObjectHandle {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class ProfileViewController: UIViewController {
.enumerated()
.map { ImageModel(index: $0.0, imageName: $0.1) }
)
collectionView.update()
collectionView.reload()
}

func setup(me: User, images: [ImageModel]) {
Expand Down

0 comments on commit 2dbc781

Please sign in to comment.