You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
748 B
39 lines
748 B
//
|
|
// Created by Marco Schmickler on 25.05.15.
|
|
// Copyright (c) 2015 Marco Schmickler. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import UIKit
|
|
import Haneke
|
|
|
|
class HeaderCell: UICollectionViewCell {
|
|
var item: MediaItem?
|
|
|
|
var label: UILabel!
|
|
|
|
required init?(coder aDecoder: NSCoder)
|
|
{
|
|
super.init(coder: aDecoder)
|
|
}
|
|
|
|
|
|
override init(frame: CGRect) {
|
|
|
|
super.init(frame: frame)
|
|
|
|
label = UILabel(frame: frame)
|
|
|
|
autolayout(["label": label],
|
|
constraints:
|
|
"H:|-5-[label]-5-|",
|
|
"V:|-5-[label]-5-|" )
|
|
}
|
|
|
|
func setItem(item: MediaItem) {
|
|
self.item = item
|
|
|
|
label.text = item.name
|
|
backgroundColor = UIColor.grayColor()
|
|
}
|
|
}
|