-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* music player gestures * resolved offline song issue * gestures and prefetching of songs * implemented suggested changes in repeat mode * thumbnail aspect ratio fix
- Loading branch information
1 parent
decd0d3
commit 9313148
Showing
20 changed files
with
766 additions
and
268 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
AmahiAnywhere/AmahiAnywhere/Cells/AudioThumbnailCollectionCell.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// AudioThumbnailCollectionCell.swift | ||
// AmahiAnywhere | ||
// | ||
// Created by Shresth Pratap Singh on 14/07/20. | ||
// Copyright © 2020 Amahi. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
class AudioThumbnailCollectionCell: UICollectionViewCell { | ||
|
||
@IBOutlet weak var imageView: UIImageView! | ||
|
||
override func awakeFromNib() { | ||
super.awakeFromNib() | ||
|
||
self.imageView.layer.masksToBounds = false | ||
self.imageView.clipsToBounds = true | ||
self.imageView.layer.cornerRadius = UIScreen.main.bounds.width * 0.04 | ||
} | ||
|
||
override func prepareForReuse() { | ||
imageView.image = UIImage(named: "musicPlayerArtWork") | ||
} | ||
|
||
} |
56 changes: 56 additions & 0 deletions
56
AmahiAnywhere/AmahiAnywhere/Cells/AudioThumbnailCollectionCell.xib
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | ||
<device id="retina6_1" orientation="portrait" appearance="light"/> | ||
<dependencies> | ||
<deployment identifier="iOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> | ||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<objects> | ||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="AudioThumbnailCollectionCell" customModule="AmahiAnywhere" customModuleProvider="target"> | ||
<rect key="frame" x="0.0" y="0.0" width="561" height="574"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> | ||
<rect key="frame" x="0.0" y="0.0" width="561" height="574"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
<subviews> | ||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="c31-5C-Sqb" userLabel="containerView"> | ||
<rect key="frame" x="0.0" y="0.0" width="561" height="574"/> | ||
<subviews> | ||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" image="musicPlayerArtWork" translatesAutoresizingMaskIntoConstraints="NO" id="2Uy-7b-FSj"> | ||
<rect key="frame" x="10" y="5" width="541" height="564"/> | ||
</imageView> | ||
</subviews> | ||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
<constraints> | ||
<constraint firstItem="2Uy-7b-FSj" firstAttribute="leading" secondItem="c31-5C-Sqb" secondAttribute="leading" constant="10" id="Prj-AY-Ufi"/> | ||
<constraint firstItem="2Uy-7b-FSj" firstAttribute="top" secondItem="c31-5C-Sqb" secondAttribute="top" constant="5" id="Tz3-OD-Zsw"/> | ||
<constraint firstAttribute="trailing" secondItem="2Uy-7b-FSj" secondAttribute="trailing" constant="10" id="cFn-n4-E6x"/> | ||
<constraint firstAttribute="bottom" secondItem="2Uy-7b-FSj" secondAttribute="bottom" constant="5" id="eWu-pO-7Jm"/> | ||
<constraint firstItem="2Uy-7b-FSj" firstAttribute="centerX" secondItem="c31-5C-Sqb" secondAttribute="centerX" id="kB5-Gr-W58"/> | ||
<constraint firstItem="2Uy-7b-FSj" firstAttribute="centerY" secondItem="c31-5C-Sqb" secondAttribute="centerY" id="uSe-pq-8Nb"/> | ||
</constraints> | ||
</view> | ||
</subviews> | ||
</view> | ||
<constraints> | ||
<constraint firstAttribute="trailing" secondItem="c31-5C-Sqb" secondAttribute="trailing" id="5JH-08-IbN"/> | ||
<constraint firstItem="c31-5C-Sqb" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="GeW-yd-5Ut"/> | ||
<constraint firstItem="c31-5C-Sqb" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="L7Q-Ml-dpa"/> | ||
<constraint firstAttribute="bottom" secondItem="c31-5C-Sqb" secondAttribute="bottom" id="mCj-dU-Xab"/> | ||
</constraints> | ||
<viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/> | ||
<size key="customSize" width="561" height="574"/> | ||
<connections> | ||
<outlet property="imageView" destination="2Uy-7b-FSj" id="NTk-9z-FtD"/> | ||
</connections> | ||
<point key="canvasLocation" x="536.95652173913049" y="306.02678571428572"/> | ||
</collectionViewCell> | ||
</objects> | ||
<resources> | ||
<image name="musicPlayerArtWork" width="300" height="300"/> | ||
</resources> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.