diff --git a/SpotifyRadar_iOS/App/Dashboard/Recently Played/RecentlyPlayedTracksViewModel.swift b/SpotifyRadar_iOS/App/Dashboard/Recently Played/RecentlyPlayedTracksViewModel.swift index a02c7ed..f275e37 100644 --- a/SpotifyRadar_iOS/App/Dashboard/Recently Played/RecentlyPlayedTracksViewModel.swift +++ b/SpotifyRadar_iOS/App/Dashboard/Recently Played/RecentlyPlayedTracksViewModel.swift @@ -65,7 +65,7 @@ RecentlyPlayedTracksViewModelOutput { self.dataManager = dataManager self.safariService = safariService - // Initializing utputs + // Initializing outputs title = Observable.just("Your Recently Played Tracks") trackCollections = sessionService.getRecentlyPlayedTracks(limit: 50) diff --git a/SpotifyRadar_iOS/App/New Releases/NewReleasesViewController.swift b/SpotifyRadar_iOS/App/New Releases/NewReleasesViewController.swift index 1c8baf4..75c2996 100644 --- a/SpotifyRadar_iOS/App/New Releases/NewReleasesViewController.swift +++ b/SpotifyRadar_iOS/App/New Releases/NewReleasesViewController.swift @@ -38,6 +38,7 @@ final class NewReleasesViewController: ViewControllerWithSideMenu, BindableType configureNavigationBar() configureTableView() setUpView() + createTickView() } deinit { @@ -63,6 +64,10 @@ final class NewReleasesViewController: ViewControllerWithSideMenu, BindableType newReleasesSlider.trailingAnchor.constraint(equalTo: layoutGuide.trailingAnchor, constant: -Constraints.outerMargins).isActive = true newReleasesSlider.heightAnchor.constraint(equalToConstant: Constraints.height).isActive = true + // adds target to method snap functionality on the newReleasesSlider UISlider + newReleasesSlider.addTarget(self, action: #selector(sliderChanged), for: .touchUpInside) + newReleasesSlider.isContinuous = false + tableView.topAnchor.constraint(equalTo: newReleasesSlider.bottomAnchor).isActive = true tableView.leadingAnchor.constraint(equalTo: layoutGuide.leadingAnchor).isActive = true tableView.trailingAnchor.constraint(equalTo: layoutGuide.trailingAnchor).isActive = true @@ -93,6 +98,24 @@ final class NewReleasesViewController: ViewControllerWithSideMenu, BindableType ) } + // creates the tick mark view and inserts it on top of the newReleasesSlider UISlider + private func createTickView() { + var tick : UIView + let tickArray = Array(1...12) + for i in 0..