Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes, improvements and Demo project #32

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5d067d8
fixed album image not being set on launch.
denysco Feb 23, 2018
63242a3
changed contentMode from scaleAspectFit scaleAspectFill to make image…
denysco Feb 23, 2018
475b92d
Fixed retain cycled delegate in PlayerSlider
Apr 5, 2018
56b2cb4
Fixed retain cycle inside PandoraPlayer prefetchItems method
Apr 5, 2018
f64030c
CenterCellCollectionViewLayout targetColumn now computed properly
Apr 5, 2018
48f9b7f
Merge pull request #1 from denysco/master
rivera-ernesto Dec 21, 2018
35adcc3
Merge pull request #2 from Adiletkozha/Ad_fix_branch
rivera-ernesto Dec 21, 2018
a125488
Add .gitignore
rivera-ernesto Dec 21, 2018
88d8ae3
Update podspec
rivera-ernesto Dec 21, 2018
3d507f7
Update to Swift 4.2
rivera-ernesto Dec 21, 2018
76aafbc
Fix deprecation warnings
rivera-ernesto Dec 21, 2018
3ebd55d
Add static_framework to podspec to fix Target has transitive dependen…
rivera-ernesto Dec 21, 2018
ec5c3cf
Fix deprecation warnings
rivera-ernesto Jan 9, 2019
f08e1b9
Update project
rivera-ernesto Jan 9, 2019
1e85fa9
Fix Storyboard’s module
rivera-ernesto Jan 9, 2019
50fd692
Bring close button on top of title label
rivera-ernesto Jan 9, 2019
8d2bfee
Make sure to load views first on configurePlayer() to prevent unwrap …
rivera-ernesto Jan 9, 2019
043d99c
Allow initializing player with no playback items
rivera-ernesto Jan 9, 2019
b88e282
Remove never used AppIcon asset
rivera-ernesto Jan 9, 2019
da615c3
Fix Xib file
rivera-ernesto Jan 9, 2019
9f25824
Fix project SWIFT_VERSION to 4.2
rivera-ernesto Jul 2, 2020
efe7741
Add demo project
rivera-ernesto Jul 2, 2020
f4ff979
Fix build warnings
rivera-ernesto Jul 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update to Swift 4.2
  • Loading branch information
rivera-ernesto committed Dec 21, 2018
commit 3d507f74a007526e468be9c5fd8aee743109edc6
2 changes: 1 addition & 1 deletion Player/Classes/Controllers/PandoraPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ open class PandoraPlayer: UIViewController {
navigationController?.navigationBar.shadowImage = UIImage()
navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)

navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: UIColor.white]
navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.white]
navigationController?.navigationBar.tintColor = UIColor.white
title = nowPlaying
}
Expand Down
8 changes: 4 additions & 4 deletions Player/Classes/Extensions/CommonExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ extension UILabel {
if layer.animation(forKey: animation) == nil {
let transition = CATransition()
transition.duration = duration
transition.type = kCATransitionFade
transition.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
transition.type = CATransitionType.fade
transition.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
layer.add(transition, forKey: animation)
}
self.text = text
Expand All @@ -60,8 +60,8 @@ extension CATransition {
static func fading(_ duration: TimeInterval) -> CATransition {
let transition = CATransition()
transition.duration = duration
transition.type = kCATransitionFade
transition.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
transition.type = CATransitionType.fade
transition.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
return transition
}
}
2 changes: 1 addition & 1 deletion Player/Classes/Views/PlayerControls/PlayerControls.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class PlayerControls: ViewWithXib {
let image = UIImage(named: Images.playLoading, in: Bundle(for: self.classForCoder), compatibleWith: nil)
playButton.setImage(image, for: .normal)

let activityIndicatorView = UIActivityIndicatorView(activityIndicatorStyle: .gray)
let activityIndicatorView = UIActivityIndicatorView(style: .gray)
activityIndicatorView.translatesAutoresizingMaskIntoConstraints = false

playButton.addSubview(activityIndicatorView)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class CenterCellCollectionViewFlowLayout: UICollectionViewFlowLayout {

var candidateAttributes : UICollectionViewLayoutAttributes?
for attributes in attributesForVisibleCells {
if attributes.representedElementCategory == UICollectionElementCategory.cell {
if attributes.representedElementCategory == UICollectionView.ElementCategory.cell {
candidateAttributes = attributes
}
}
Expand Down
4 changes: 2 additions & 2 deletions Player/Classes/Views/PlayerSongList/PlayerSongList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class PlayerSongList: ViewWithXib {
insets.left = self.frame.size.width * leftInsetCoefficient
insets.right = insets.left
self.collectionView.contentInset = insets
self.collectionView.decelerationRate = UIScrollViewDecelerationRateFast
self.collectionView.decelerationRate = UIScrollView.DecelerationRate.fast
DispatchQueue.main.async {
self.updateCellSizes()
}
Expand All @@ -71,7 +71,7 @@ class PlayerSongList: ViewWithXib {
collectionView.backgroundColor = UIColor.clear
collectionView.backgroundView = UIView(frame: CGRect(x: 0, y: 0, width: 0, height: 0))
collectionView.register(UINib(nibName: RoundedPictureCollectionViewCell.className, bundle: Bundle(for: self.classForCoder)), forCellWithReuseIdentifier: RoundedPictureCollectionViewCell.className)
collectionView.decelerationRate = decelerationRate
collectionView.decelerationRate = UIScrollView.DecelerationRate(rawValue: decelerationRate)

let tap = UITapGestureRecognizer(target: self, action: #selector(doubleTapped))
tap.numberOfTapsRequired = numberOfTapsRequired
Expand Down
2 changes: 1 addition & 1 deletion Player/Classes/Views/ViewWithXib.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ViewWithXib: UIView {
private func xibSetup() {
let view = loadViewFromNib()
view.frame = bounds
view.autoresizingMask = [UIViewAutoresizing.flexibleWidth, UIViewAutoresizing.flexibleHeight]
view.autoresizingMask = [UIView.AutoresizingMask.flexibleWidth, UIView.AutoresizingMask.flexibleHeight]
addSubview(view)
initUI()
}
Expand Down