mirror of
https://github.com/zhigang1992/GitHawk.git
synced 2026-06-02 06:30:26 +08:00
26 lines
785 B
Swift
26 lines
785 B
Swift
//
|
|
// SpinnerSectionController.swift
|
|
// Freetime
|
|
//
|
|
// Created by Ryan Nystrom on 6/30/17.
|
|
// Copyright © 2017 Ryan Nystrom. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
import IGListKit
|
|
|
|
final class SpinnerSectionController: ListSectionController {
|
|
|
|
override func sizeForItem(at index: Int) -> CGSize {
|
|
guard let width = collectionContext?.containerSize.width else { fatalError("Missing context") }
|
|
return CGSize(width: width, height: Styles.Sizes.tableCellHeight)
|
|
}
|
|
|
|
override func cellForItem(at index: Int) -> UICollectionViewCell {
|
|
guard let cell = collectionContext?.dequeueReusableCell(of: SpinnerCell.self, for: self, at: index) as? SpinnerCell
|
|
else { fatalError("Missing context or cell wrong type") }
|
|
return cell
|
|
}
|
|
|
|
}
|