Skip to content

Commit

Permalink
Add initializer in CollectoinView with frame and layout
Browse files Browse the repository at this point in the history
Solve issue: netcosports#45
  • Loading branch information
netcosportsanatoly committed Apr 25, 2019
1 parent 1cab74b commit 7329607
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sources/Core/CollectionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ open class CollectionView<T: ReusableSource>: UICollectionView, AccessorView whe
public typealias Source = T
public let source = T()

public required init() {
super.init(frame: .zero, collectionViewLayout: CollectionViewSource.defaultLayout)
public required override init(frame: CGRect = .zero, collectionViewLayout layout: UICollectionViewLayout? = nil) {
let layout = layout ?? CollectionViewSource.defaultLayout
super.init(frame: frame, collectionViewLayout: layout)
source.containerView = self
}

Expand Down

0 comments on commit 7329607

Please sign in to comment.