mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-06-12 00:14:44 +08:00
34 lines
1.0 KiB
Swift
34 lines
1.0 KiB
Swift
//
|
|
// IssueStatusEventSectionController.swift
|
|
// Freetime
|
|
//
|
|
// Created by Ryan Nystrom on 6/7/17.
|
|
// Copyright © 2017 Ryan Nystrom. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
import IGListKit
|
|
|
|
final class IssueStatusEventSectionController: ListGenericSectionController<IssueStatusEventModel> {
|
|
|
|
override init() {
|
|
super.init()
|
|
inset = Styles.Sizes.listInsetTight
|
|
}
|
|
|
|
override func sizeForItem(at index: Int) -> CGSize {
|
|
guard let width = collectionContext?.containerSize.width else { fatalError("Collection context must be set") }
|
|
return CGSize(width: width, height: Styles.Sizes.labelEventHeight)
|
|
}
|
|
|
|
override func cellForItem(at index: Int) -> UICollectionViewCell {
|
|
guard let cell = collectionContext?.dequeueReusableCell(of: IssueStatusEventCell.self, for: self, at: index) as? IssueStatusEventCell,
|
|
let object = self.object
|
|
else { fatalError("Cell incorrect type or object does not exist") }
|
|
cell.configure(object)
|
|
return cell
|
|
}
|
|
|
|
}
|
|
|