Skip to content

Instantly share code, notes, and snippets.

View EricADockery's full-sized avatar
🦕

Eric Arlan Dockery EricADockery

🦕
  • Versailles, KY
View GitHub Profile
//
// FeaturedCollectionViewCell.swift
// iTunesFeatureBanner
//
// Created by Eric Dockery on 7/7/18.
// Copyright © 2018 Eric Dockery. All rights reserved.
//
import UIKit
//
// FeaturedView.swift
// iTunesFeatureBanner
//
// Created by Eric Dockery on 7/7/18.
// Copyright © 2018 Eric Dockery. All rights reserved.
//
import UIKit
//
// FeaturedViewPresenter.swift
// iTunesFeatureBanner
//
// Created by Eric Dockery on 7/7/18.
// Copyright © 2018 Eric Dockery. All rights reserved.
//
protocol FeaturedPresenting: class {
func scroll()
//
// TopMostCollectionViewCellPresenter.swift
// iTunesFeatureBanner
//
// Created by Eric Dockery on 7/7/18.
// Copyright © 2018 Eric Dockery. All rights reserved.
//
class TopMostCollectionViewCellPresenter {
//
// TopMostCollectionViewCell.swift
// iTunesFeatureBanner
//
// Created by Eric Dockery on 7/7/18.
// Copyright © 2018 Eric Dockery. All rights reserved.
//
import UIKit
//
// TopMostViewController.swift
// iTunesFeatureBanner
//
// Created by Eric Dockery on 7/7/18.
// Copyright © 2018 Eric Dockery. All rights reserved.
//
import UIKit
//
// TopMostPresenter.swift
// iTunesFeatureBanner
//
// Created by Eric Dockery on 7/7/18.
// Copyright © 2018 Eric Dockery. All rights reserved.
//
class TopMostPresenter {
class ViewController: UIViewController {
}
extension ViewController: UICollectionViewDelegate {
}
extension ViewController: UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
class ImageCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var gradientView: GradientView!
@IBOutlet weak var imageView: UIImageView!
}
class GradientView: UIView {
override func awakeFromNib() {
super.awakeFromNib()
let gradientLayer = CAGradientLayer()
gradientLayer.frame = CGRect(x: 0, y: 0, width: frame.width, height: frame.height)
gradientLayer.colors = [UIColor.white.cgColor,UIColor.red.withAlphaComponent(0.5).cgColor]
gradientLayer.startPoint = CGPoint(x: 0.0, y: 1.0)
gradientLayer.endPoint = CGPoint(x: 1.0, y: 1.0)