Skip to content

Instantly share code, notes, and snippets.

@EricADockery
Created July 7, 2018 21:49
Show Gist options
  • Save EricADockery/071733fddca8d1c1c146ec278222bacc to your computer and use it in GitHub Desktop.
Save EricADockery/071733fddca8d1c1c146ec278222bacc to your computer and use it in GitHub Desktop.
//
// FeaturedCollectionViewCell.swift
// iTunesFeatureBanner
//
// Created by Eric Dockery on 7/7/18.
// Copyright © 2018 Eric Dockery. All rights reserved.
//
import UIKit
class FeaturedCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var heroImageView: UIImageView!
@IBOutlet weak var name: UILabel!
@IBOutlet weak var age: UILabel!
@IBOutlet weak var powerlevel: UILabel!
func build(with fighter: FighterData) {
heroImageView.image = UIImage(named: fighter.imageName)
name.text = fighter.name
age.text = "\(fighter.age)"
powerlevel.text = "\(fighter.powerLevel)"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment