-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// | ||
// GridTableViewCell.swift | ||
// Hagrid | ||
// | ||
// Created by Ondrej Rafaj on 01/06/2018. | ||
// Copyright © 2018 LiveUI. All rights reserved. | ||
// | ||
|
||
#if os(iOS) || os(tvOS) | ||
@_exported import Foundation | ||
@_exported import UIKit | ||
@_exported import SnapKit | ||
|
||
|
||
/// Grid view enabled table view cell | ||
class GridTableViewCell: UITableViewCell { | ||
|
||
/// Grid view | ||
open let gridView = GridView() | ||
|
||
@available(*, unavailable, message: "This method is unavailable", renamed: "gridView") | ||
override var contentView: UIView { | ||
get { return super.contentView } | ||
} | ||
|
||
// MARK: Initialization | ||
|
||
/// Initializer | ||
override init(style: UITableViewCellStyle, reuseIdentifier: String?) { | ||
super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
|
||
super.contentView.addSubview(gridView) | ||
gridView.snp.makeConstraints { make in | ||
make.edges.equalToSuperview() | ||
} | ||
} | ||
|
||
@available(*, unavailable, message: "This method is unavailable") | ||
required init?(coder aDecoder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters