addresses pr comments
MODIFY
Podcast/Comment.swift
Podcast/Comment.swift
import UIKit
-class Comment: NSObject {
+class Comment {
var episodeId: String
var creator: String
var text: String

MODIFY
Podcast/CommentsTableViewCell.swift
Podcast/CommentsTableViewCell.swift
@@ -15,7 +15,7 @@ protocol CommentsTableViewCellDelegate {
class CommentsTableViewCell: UITableViewCell {
let minimumHeight: CGFloat = 200
- let imageViewDimension: CGFloat = 30
+ let imageViewSize: CGSize = CGSize(width: 30, height: 30)
let marginSpacing: CGFloat = 18
let padding: CGFloat = 12
let leftInset: CGFloat = 60
@@ -36,7 +36,9 @@ class CommentsTableViewCell: UITableViewCell {
backgroundColor = UIColor.colorFromCode(0xfcfcfe)
frame.size.height = minimumHeight
- commenterImageView = UIImageView(frame: CGRect(x: marginSpacing, y: marginSpacing, width: imageViewDimension, height: imageViewDimension))
+ commenterImageView = UIImageView(frame: CGRect(origin: CGPoint.init(x: marginSpacing, y: marginSpacing), size: imageViewSize))
+ commenterImageView.layer.cornerRadius = imageViewSize.height/2
+ commenterImageView.clipsToBounds = true
addSubview(commenterImageView)
commenterNameLabel = UILabel(frame: CGRect(x: commenterImageView.frame.maxX + padding, y: marginSpacing, width: 0, height: 0))

MODIFY
Podcast/MiniPlayerView.swift
Podcast/MiniPlayerView.swift
@@ -45,7 +45,6 @@ class MiniPlayerView: UIView {
}
arrowButton = UIButton(frame: CGRect(x: marginSpacing, y: arrowYValue, width: arrowWidth, height: arrowHeight))
- arrowButton.addTarget(self, action: #selector(arrowButtonTapped), for: .touchUpInside)
arrowButton.setBackgroundImage(#imageLiteral(resourceName: "down_arrow_icon"), for: .normal)
addSubview(arrowButton)
@@ -59,6 +58,8 @@ class MiniPlayerView: UIView {
episodeTitleLabel.textAlignment = .left
episodeTitleLabel.lineBreakMode = .byWordWrapping
addSubview(episodeTitleLabel)
+
+ addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(viewTapped)))
}
func updateUIForPlayback(isPlaying: Bool) {
@@ -78,7 +79,7 @@ class MiniPlayerView: UIView {
playPauseButton.setBackgroundImage(#imageLiteral(resourceName: "mini_play_icon"), for: .normal)
}
- func arrowButtonTapped() {
+ func viewTapped() {
delegate?.miniPlayerViewDidTapExpandButton()
}

MODIFY
Podcast/PlayButton.swift
Podcast/PlayButton.swift
@@ -10,10 +10,6 @@ import UIKit
class PlayButton: UIButton {
- convenience init() {
- self.init(frame: .zero)
- }
-
override init(frame: CGRect) {
super.init(frame: frame)
setImage(#imageLiteral(resourceName: "play_feed_icon"), for: .normal)

addresses pr comments