more swifty class handling

This commit is contained in:
Ryan Nystrom
2017-06-29 21:49:20 -07:00
parent f9a6953c3e
commit dfd3ad4861
5 changed files with 21 additions and 24 deletions

View File

@@ -16,6 +16,10 @@ protocol SegmentedControlSectionControllerDelegate: class {
final class SegmentedControlSectionController: ListGenericSectionController<SegmentedControlModel>, SegmentedControlCellDelegate {
weak var delegate: SegmentedControlSectionControllerDelegate? = nil
init(delegate: SegmentedControlSectionControllerDelegate?) {
self.delegate = delegate
super.init()
}
override func sizeForItem(at index: Int) -> CGSize {
guard let context = collectionContext else { fatalError("Collection context must be set") }