Skip to content

Commit

Permalink
Added some final touch ups before archiving this project.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThasianX committed Dec 19, 2019
1 parent 9609bdb commit ca6a892
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 76 deletions.
21 changes: 2 additions & 19 deletions SpotifyDaily/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -15,21 +15,7 @@
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logo" translatesAutoresizingMaskIntoConstraints="NO" id="qRa-Th-GCS">
<rect key="frame" x="87" y="384" width="240" height="128"/>
<color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="240" id="rnq-Ji-4We"/>
<constraint firstAttribute="height" constant="128" id="vwF-2C-NCl"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="qRa-Th-GCS" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="1E3-Ch-r6s"/>
<constraint firstItem="qRa-Th-GCS" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="3KL-XS-EIY"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
Expand All @@ -38,7 +24,4 @@
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="logo" width="60" height="60"/>
</resources>
</document>
11 changes: 6 additions & 5 deletions SpotifyDaily_iOS/App/AppCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,17 @@ class AppCoordinator: BaseCoordinator {
}

override func start() {
self.window.makeKeyAndVisible()

ViewControllerUtils.setRootViewController(
window: self.window,
viewController: StartupViewController(),
withAnimation: true)
// Uncomment this line out if you are getting problems with the root view controller not being set by the time appdelegate returns.
// ViewControllerUtils.setRootViewController(
// window: self.window,
// viewController: StartupViewController(),
// withAnimation: true)

self.sessionService.loadSession()
.bind(onNext: { [unowned self] session in
session == nil ? self.showSignIn() : self.showDashboard()
self.window.makeKeyAndVisible()
})
.disposed(by: disposeBag)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ final class DashboardViewController: ViewControllerWithSideMenu, BindableType {
super.viewDidLoad()

self.view.backgroundColor = ColorPreference.secondaryColor
title = "Spotify Daily Dashboard"
title = "Dashboard"
self.setUpView()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ final class RecentlyPlayedTracksViewController: UIViewController, BindableType {
recentlyPlayedTitle.leadingAnchor.constraint(equalTo: layoutGuide.leadingAnchor).isActive = true
recentlyPlayedTitle.trailingAnchor.constraint(equalTo: layoutGuide.trailingAnchor).isActive = true

tableView.topAnchor.constraint(equalTo: recentlyPlayedTitle.bottomAnchor, constant: Constraints.outerMargins*2).isActive = true
tableView.topAnchor.constraint(equalTo: recentlyPlayedTitle.bottomAnchor).isActive = true
tableView.leadingAnchor.constraint(equalTo: layoutGuide.leadingAnchor).isActive = true
tableView.trailingAnchor.constraint(equalTo: layoutGuide.trailingAnchor).isActive = true
tableView.bottomAnchor.constraint(equalTo: self.view.bottomAnchor).isActive = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ RecentlyPlayedTracksViewModelOutput {
// Initializing utputs
title = Observable.just("Your Recently Played Tracks")

trackCollections = sessionService.getRecentlyPlayedTracks(limit: 20)
trackCollections = sessionService.getRecentlyPlayedTracks(limit: 50)
.flatMapLatest { [unowned self] tracks -> Observable<[RecentlyPlayedTrack]> in
var updatedTracks = [RecentlyPlayedTrack]()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ final class TopArtistsCollectionViewController: UIViewController, BindableType {
artistsTimeRangeControl.trailingAnchor.constraint(equalTo: layoutGuide.trailingAnchor).isActive = true
artistsTimeRangeControl.heightAnchor.constraint(equalToConstant: Constraints.height).isActive = true

collectionView.topAnchor.constraint(equalTo: artistsTimeRangeControl.bottomAnchor, constant: Constraints.controlMargin*2).isActive = true
collectionView.topAnchor.constraint(equalTo: artistsTimeRangeControl.bottomAnchor).isActive = true
collectionView.leadingAnchor.constraint(equalTo: layoutGuide.leadingAnchor).isActive = true
collectionView.trailingAnchor.constraint(equalTo: layoutGuide.trailingAnchor).isActive = true
collectionView.bottomAnchor.constraint(equalTo: self.view.bottomAnchor).isActive = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ final class TopTracksCollectionViewController: UIViewController, BindableType {
tracksTimeRangeControl.trailingAnchor.constraint(equalTo: layoutGuide.trailingAnchor).isActive = true
tracksTimeRangeControl.heightAnchor.constraint(equalToConstant: Constraints.height).isActive = true

collectionView.topAnchor.constraint(equalTo: tracksTimeRangeControl.bottomAnchor, constant: Constraints.controlMargin*2).isActive = true
collectionView.topAnchor.constraint(equalTo: tracksTimeRangeControl.bottomAnchor).isActive = true
collectionView.leadingAnchor.constraint(equalTo: layoutGuide.leadingAnchor).isActive = true
collectionView.trailingAnchor.constraint(equalTo: layoutGuide.trailingAnchor).isActive = true
collectionView.bottomAnchor.constraint(equalTo: self.view.bottomAnchor).isActive = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import RxCocoa

class DrawerMenuViewController: UIViewController {

private var selectedRow: Int = 0
private var selectedRow: Int = 1
private let disposeBag = DisposeBag()

private lazy var tableView = UITableView.tableView
Expand All @@ -23,7 +23,7 @@ class DrawerMenuViewController: UIViewController {

var viewModel: DrawerMenuViewModel? {
didSet {
self.selectedRow = 0
self.selectedRow = 1
self.setUpBindings()
}
}
Expand Down
2 changes: 1 addition & 1 deletion SpotifyDaily_iOS/App/DrawerMenu/DrawerMenuViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class DrawerMenuViewModel {
private let sessionService: SessionService
private let dataManager: DataManager

let didSelectScreen = BehaviorSubject(value: DrawerMenuScreen.new_releases)
let didSelectScreen = BehaviorSubject(value: DrawerMenuScreen.dashboard)

let menuItems = Observable.just([
"New Releases",
Expand Down
2 changes: 1 addition & 1 deletion SpotifyDaily_iOS/App/New Releases/Cell/NewTrackCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private extension UILabel {
static var trackLabel: UILabel {
let label = UILabel()
label.textColor = ColorPreference.tertiaryColor
label.font = UIFont.systemFont(ofSize: 18, weight: .semibold)
label.font = UIFont.systemFont(ofSize: 14, weight: .semibold)
label.textAlignment = .left
label.numberOfLines = 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ final class NewReleasesViewController: ViewControllerWithSideMenu, BindableType
emptyLabel.topAnchor.constraint(equalTo: newReleasesSlider.bottomAnchor).isActive = true
emptyLabel.leadingAnchor.constraint(equalTo: layoutGuide.leadingAnchor, constant: Constraints.outerMargins).isActive = true
emptyLabel.trailingAnchor.constraint(equalTo: layoutGuide.trailingAnchor, constant: -Constraints.outerMargins).isActive = true
emptyLabel.bottomAnchor.constraint(equalTo: self.view.bottomAnchor).isActive = true
emptyLabel.bottomAnchor.constraint(equalTo: layoutGuide.bottomAnchor).isActive = true
}

private func configureNavigationBar() {
Expand Down
Loading

0 comments on commit ca6a892

Please sign in to comment.