Add + Update screen : PlayMusic

This commit is contained in:
mrustaa
2024-07-31 15:59:53 +03:00
parent 18c90f0c63
commit 85d52cd837
107 changed files with 2883 additions and 392 deletions
@@ -41,7 +41,7 @@ class CustomCardViewController: StoryboardController {
// let scrollV = createMapsCollectionAdapterView()
// scrollV.alpha = 0.75
// c1.add(scrollView: scrollV)
// c1.backView.y = 39
// c1.backView?.y = 39
containers.append( c1 )
}
@@ -58,7 +58,7 @@ class CustomCardViewController: StoryboardController {
// let scrollV = createTableViewTestItems(number: 33)
// scrollV.alpha = 0.5
// c1.add(scrollView: scrollV)
// c1.backView.y = 39
// c1.backView?.y = 39
containers.append( c1 )
}
@@ -84,7 +84,7 @@ class CustomCardViewController: StoryboardController {
// let scrollV = createCollectionAdapterView(width: ScreenSize.width - (98 + 8) )
// scrollV.alpha = 0.35
// c1.add(scrollView: scrollV)
// c1.backView.y = 63
// c1.backView?.y = 63
containers.append( c1 )
}
@@ -98,7 +98,7 @@ class CustomCardViewController: StoryboardController {
// let scrollV = createMapsCollectionAdapterView()
// scrollV.alpha = 0.5
// c1.add(scrollView: scrollV)
// c1.backView.y = 63i
// c1.backView?.y = 63i
// main(delay: p * 4) {
// c1.move(type: .top)
// }
@@ -111,7 +111,7 @@ class CustomCardViewController: StoryboardController {
containerTableView = t1
c1.backView.subviews.forEach {
c1.backView?.subviews.forEach {
$0.removeFromSuperview()
}
@@ -241,7 +241,7 @@ class CustomCardViewController: StoryboardController {
let scrollV = createMapsCollectionAdapterView()
scrollV.alpha = 0.0
c1.add(scrollView: scrollV)
c1.backView.y = 39
c1.backView?.y = 39
UIView.animate(withDuration: 0.35) {
scrollV.alpha = 0.75
}
@@ -249,7 +249,7 @@ class CustomCardViewController: StoryboardController {
let scrollV = createTableViewTestItems(number: 33)
scrollV.alpha = 0.0
c1.add(scrollView: scrollV)
c1.backView.y = 39
c1.backView?.y = 39
UIView.animate(withDuration: 0.35) {
scrollV.alpha = 0.5
}
@@ -257,7 +257,7 @@ class CustomCardViewController: StoryboardController {
let scrollV = createCollectionAdapterView(width: ScreenSize.width - (98 + 8) )
scrollV.alpha = 0.0
c1.add(scrollView: scrollV)
c1.backView.y = 63
c1.backView?.y = 63
UIView.animate(withDuration: 0.35) {
scrollV.alpha = 0.35
}
@@ -265,7 +265,7 @@ class CustomCardViewController: StoryboardController {
let scrollV = createMapsCollectionAdapterView()
scrollV.alpha = 0.0
c1.add(scrollView: scrollV)
c1.backView.y = 63
c1.backView?.y = 63
UIView.animate(withDuration: 0.35) {
scrollV.alpha = 0.5
}
@@ -351,7 +351,7 @@ class CustomCardViewController: StoryboardController {
let ccc = addContainer(position: .init(top: mini ? 241 : 350, bottom: mini ? 223 : 173), radius: mini ? 22 : 37, items: itemsC, addBackShadow: addBackShadow)
let frr = CGRect(x: 0, y: 0, width: ccc.0.backView.width, height: ccc.0.backView.height)
let frr = CGRect(x: 0, y: 0, width: ccc.0.backView?.width ?? 0, height: ccc.0.backView?.height ?? 0)
let gradientV = CustomCardGradientMainView()
gradientV.gr1.isHidden = !gradient
gradientV.gr2.isHidden = gradient
@@ -359,7 +359,7 @@ class CustomCardViewController: StoryboardController {
.flexibleRightMargin, .flexibleTopMargin]
gradientV.frame = frr
ccc.0.backView.addSubview( gradientV )
ccc.0.backView?.addSubview( gradientV )
@@ -1,122 +0,0 @@
import UIKit
import ContainerControllerSwift
// MARK: - State
extension PlayMusicItItem {
struct State {
var firstImage: UIImage?
var subtitleText: String?
var text2: String?
var image3: UIImage?
var image4: UIImage?
var image5: UIImage?
var image6: UIImage?
var image7: UIImage?
var image8: UIImage?
var image9: UIImage?
var image10: UIImage?
var image11: UIImage?
var image12: UIImage?
var handlers: Handlers = .init()
}
struct Handlers {
var onClickAt: (()->(Void))?
}
}
// MARK: - Item
class PlayMusicItItem: TableAdapterItem {
init(state: PlayMusicItItem.State) {
let cellData = PlayMusicItCellData(state: state)
super.init(cellClass: PlayMusicItCell.self, cellData: cellData)
}
}
// MARK: - Data
class PlayMusicItCellData: TableAdapterCellData {
var state: PlayMusicItItem.State
init(state: PlayMusicItItem.State) {
self.state = state
super.init()
// self.cellClickCallback = state.handlers.onClickAt
}
override public func cellHeight() -> CGFloat {
// let calcHeight = calculateLabel(
// text: state.titleText,
// padding: 16,
// titleFont: SFProText.regular.size(.headline)
// )
return Self.cHeight()
}
public static func cHeight() -> CGFloat {
return 706.0
}
override public func canEditing() -> Bool {
return editing
}
}
// MARK: - Cell
class PlayMusicItCell: TableAdapterCell {
public var data: PlayMusicItCellData?
@IBOutlet private weak var firstImageView: UIImageView?
@IBOutlet private weak var subtitleLabel: UILabel?
@IBOutlet private weak var label2: UILabel?
@IBOutlet private weak var imageView3: UIImageView?
@IBOutlet private weak var imageView4: UIImageView?
@IBOutlet private weak var imageView5: UIImageView?
@IBOutlet private weak var imageView6: UIImageView?
@IBOutlet private weak var imageView7: UIImageView?
@IBOutlet private weak var imageView8: UIImageView?
@IBOutlet private weak var imageView9: UIImageView?
@IBOutlet private weak var imageView10: UIImageView?
@IBOutlet private weak var imageView11: UIImageView?
@IBOutlet private weak var imageView12: UIImageView?
@IBOutlet override var selectedView: UIView? { didSet { } }
@IBOutlet var cardView: UIView?
@IBOutlet var button: UIButton?
override func awakeFromNib() {
separator(hide: true)
button?.tapHideAnimation(
view: cardView,
type: .alpha(0.5),
callback: { [weak self] type in
if type == .touchUpInside {
self?.data?.state.handlers.onClickAt?()
}
}
)
}
override func fill(data: TableAdapterCellData?) {
guard let data = data as? PlayMusicItCellData else { return }
self.data = data
if let v = data.state.firstImage { firstImageView?.image = v }
if let v = data.state.subtitleText { subtitleLabel?.text = v }
if let v = data.state.text2 { label2?.text = v }
if let v = data.state.image3 { imageView3?.image = v }
if let v = data.state.image4 { imageView4?.image = v }
if let v = data.state.image5 { imageView5?.image = v }
if let v = data.state.image6 { imageView6?.image = v }
if let v = data.state.image7 { imageView7?.image = v }
if let v = data.state.image8 { imageView8?.image = v }
if let v = data.state.image9 { imageView9?.image = v }
if let v = data.state.image10 { imageView10?.image = v }
if let v = data.state.image11 { imageView11?.image = v }
if let v = data.state.image12 { imageView12?.image = v }
}
}
@@ -1,58 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<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"/><tableViewCell clipsSubviews="NO" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" rowHeight="64" id="7kB-NQ-FSp" customClass="PlayMusicItCell" customModule="FigmaConvertXib" customModuleProvider="target">
<rect key="frame" x="526.0" y="108.0" width="375.0" height="706.0"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="7kB-NQ-FSp" id="ChH-TT-3bu">
<rect key="frame" x="0.0" y="0.0" width="375.0" height="706.0"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view clipsSubviews="NO" alpha="1.0" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" userLabel=" PlayMusicIt" id="pck-cd-HzR" customClass="DesignFigure" customModule="FigmaConvertXib" customModuleProvider="target"><rect key="frame" x="0.0" y="0.0" width="375.0" height="706.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/><freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/><subviews><view clipsSubviews="NO" alpha="1.0" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" userLabel="cardFullView" id="tVN-zL-fCZ" customClass="DesignFigure" customModule="FigmaConvertXib" customModuleProvider="target"><rect key="frame" x="0.0" y="0.0" width="375.0" height="706.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/><userDefinedRuntimeAttributes><userDefinedRuntimeAttribute type="color" keyPath="fillColor">
<color key="value" red="0.11764705926179886" green="0.11764705926179886" blue="0.11764705926179886" alpha="1.0" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute><userDefinedRuntimeAttribute type="color" keyPath="grColor1">
<color key="value" red="0.9411764740943909" green="0.9333333373069763" blue="0.9176470637321472" alpha="1.0" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute><userDefinedRuntimeAttribute type="color" keyPath="grColor2">
<color key="value" red="0.9647058844566345" green="0.9490196108818054" blue="0.9333333373069763" alpha="1.0" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute><userDefinedRuntimeAttribute type="color" keyPath="grColor3">
<color key="value" red="0.9647058844566345" green="0.9333333373069763" blue="0.9215686321258545" alpha="1.0" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute><userDefinedRuntimeAttribute type="color" keyPath="grColor4">
<color key="value" red="0.8745098114013672" green="0.8039215803146362" blue="0.8549019694328308" alpha="1.0" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute><userDefinedRuntimeAttribute type="color" keyPath="grColor5">
<color key="value" red="0.8549019694328308" green="0.8039215803146362" blue="0.843137264251709" alpha="1.0" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute><userDefinedRuntimeAttribute type="boolean" keyPath="grRadial" value="NO"/><userDefinedRuntimeAttribute type="point" keyPath="grStartPoint">
<point key="value" x="0.5" y="-3.0616171314629196e-17"/>
</userDefinedRuntimeAttribute><userDefinedRuntimeAttribute type="point" keyPath="grEndPoint">
<point key="value" x="0.5" y="0.9999999999999999"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes></view><view clipsSubviews="NO" alpha="1.0" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" userLabel="imgMusicPicView" id="nvc-Ju-J8w" customClass="DesignFigure" customModule="FigmaConvertXib" customModuleProvider="target"><rect key="frame" x="25.0" y="19.0" width="327.0" height="328.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/><subviews><imageView clipsSubviews="NO" userInteractionEnabled="NO" alpha="1.0" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="imgPlayMusicIdDisclosureYouMe" translatesAutoresizingMaskIntoConstraints="NO" userLabel="imgPlayMusicIdDisclosureYouMe" id="nwg-a4-OQj"><rect key="frame" x="5.0" y="5.0" width="317.0" height="318.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/></imageView>
</subviews><userDefinedRuntimeAttributes><userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="10.0"/>
</userDefinedRuntimeAttribute><userDefinedRuntimeAttribute type="color" keyPath="fillColor">
<color key="value" red="0.8666666746139526" green="0.8666666746139526" blue="0.8627451062202454" alpha="1.0" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes></view><label opaque="NO" userInteractionEnabled="NO" alpha="1.0" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Ut Distinctio Recusandae Vi..." textAlignment="left" lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AIJ-a4-N3r" userLabel="Ut Distinctio Recusandae Vi..." customModuleProvider="target"><rect key="frame" x="33.0" y="382.0" width="270.0" height="23.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/><fontDescription key="fontDescription" type="boldSystem" pointSize="18.0"/><color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1.0" colorSpace="custom" customColorSpace="sRGB"/><userDefinedRuntimeAttributes>
</userDefinedRuntimeAttributes></label><label opaque="NO" userInteractionEnabled="NO" alpha="1.0" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Est beatae non rerum et repudia..." textAlignment="left" lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XOy-9r-ZHX" userLabel="Est beatae non rerum et repudia..." customModuleProvider="target"><rect key="frame" x="33.0" y="405.0" width="270.0" height="23.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/><fontDescription key="fontDescription" type="system" weight="medium" pointSize="18.0"/><color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1.0" colorSpace="custom" customColorSpace="sRGB"/><userDefinedRuntimeAttributes>
</userDefinedRuntimeAttributes></label><view clipsSubviews="NO" alpha="1.0" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" userLabel="sliderMediaView" id="kNx-Pt-YLP"><rect key="frame" x="25.0" y="448.0" width="325.0" height="38.0"/><color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.10999999940395355" colorSpace="custom" customColorSpace="sRGB"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/></view><view clipsSubviews="NO" alpha="1.0" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" userLabel="sliderVolumeView" id="8oq-CE-yr9"><rect key="frame" x="25.0" y="612.0" width="325.0" height="38.0"/><color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.03999999910593033" colorSpace="custom" customColorSpace="sRGB"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/><subviews><imageView clipsSubviews="NO" userInteractionEnabled="NO" alpha="1.0" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="iconPlayMusicVolumeHight" translatesAutoresizingMaskIntoConstraints="NO" userLabel="iconPlayMusicVolumeHight" id="Gxt-jN-2A6"><rect key="frame" x="303.0" y="11.0" width="16.0" height="16.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/></imageView><imageView clipsSubviews="NO" userInteractionEnabled="NO" alpha="1.0" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="iconPlayMusicVolumeOff" translatesAutoresizingMaskIntoConstraints="NO" userLabel="iconPlayMusicVolumeOff" id="K8v-Kf-hrW"><rect key="frame" x="8.0" y="11.0" width="16.0" height="16.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/></imageView>
</subviews></view><view clipsSubviews="NO" alpha="1.0" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" userLabel="Frame 89552" id="MJE-Pp-4WO"><rect key="frame" x="25.0" y="534.0" width="325.0" height="38.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/><subviews><view clipsSubviews="NO" alpha="1.0" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" userLabel="Frame 89551" id="Qbe-vI-oIf"><rect key="frame" x="144.0" y="1.0" width="37.0" height="37.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/><subviews><imageView clipsSubviews="NO" userInteractionEnabled="NO" alpha="1.0" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="iconPlayMusicControlsPause" translatesAutoresizingMaskIntoConstraints="NO" userLabel="iconPlayMusicControlsPause" id="rom-FU-Cws"><rect key="frame" x="0.0" y="0.0" width="37.0" height="37.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/></imageView><imageView clipsSubviews="NO" userInteractionEnabled="NO" alpha="1.0" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="iconPlayMusicControlsPlay" translatesAutoresizingMaskIntoConstraints="NO" userLabel="iconPlayMusicControlsPlay" id="2Rw-Wx-IvX"><rect key="frame" x="0.0" y="0.0" width="37.0" height="37.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/></imageView>
</subviews></view><imageView clipsSubviews="NO" userInteractionEnabled="NO" alpha="1.0" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="iconPlayMusicControlsFastForwardRight" translatesAutoresizingMaskIntoConstraints="NO" userLabel="iconPlayMusicControlsFastForwardRight" id="CY2-D2-to6"><rect key="frame" x="252.0" y="0.0" width="37.0" height="37.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/></imageView><imageView clipsSubviews="NO" userInteractionEnabled="NO" alpha="1.0" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="iconPlayMusicControlsFastForwardLeft" translatesAutoresizingMaskIntoConstraints="NO" userLabel="iconPlayMusicControlsFastForwardLeft" id="AU2-ze-PXp"><rect key="frame" x="35.99999676535663" y="0.0" width="37.00000323464337" height="37.00000323464337"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/></imageView>
</subviews></view><view clipsSubviews="NO" alpha="1.0" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" userLabel="Frame 89553" id="cny-2h-Bsr"><rect key="frame" x="25.0" y="668.0" width="325.0" height="21.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/><subviews><imageView clipsSubviews="NO" userInteractionEnabled="NO" alpha="1.0" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="iconPlayMusicControlsRepeat" translatesAutoresizingMaskIntoConstraints="NO" userLabel="iconPlayMusicControlsRepeat" id="V5Q-Ge-JJm"><rect key="frame" x="258.0" y="0.0" width="21.0" height="21.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/></imageView><imageView clipsSubviews="NO" userInteractionEnabled="NO" alpha="1.0" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="iconPlayMusicControlsShuffle" translatesAutoresizingMaskIntoConstraints="NO" userLabel="iconPlayMusicControlsShuffle" id="Zob-Hc-hsj"><rect key="frame" x="46.0" y="0.0" width="21.0" height="21.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/></imageView><imageView clipsSubviews="NO" userInteractionEnabled="NO" alpha="1.0" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="iconPlayMusicControlsAirdrop" translatesAutoresizingMaskIntoConstraints="NO" userLabel="iconPlayMusicControlsAirdrop" id="93A-Xs-IWx"><rect key="frame" x="152.0" y="0.0" width="21.0" height="21.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/></imageView>
</subviews></view><imageView clipsSubviews="NO" userInteractionEnabled="NO" alpha="1.0" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="iconPlayMusicMore" translatesAutoresizingMaskIntoConstraints="NO" userLabel="iconPlayMusicMore" id="hv0-25-cXI"><rect key="frame" x="315.0" y="391.0" width="28.0" height="28.0"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/></imageView><button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4cU-L1-zcN">
<rect key="frame" x="0.0" y="0.0" width="375.0" height="706.0"/></button>
</subviews><userDefinedRuntimeAttributes>
</userDefinedRuntimeAttributes> </view>
</subviews>
<constraints>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/><connections>
<outlet property="firstImageView" destination="nwg-a4-OQj" id="XCp-Mc-Ruy"/><outlet property="subtitleLabel" destination="AIJ-a4-N3r" id="Ias-LY-lmI"/><outlet property="label2" destination="XOy-9r-ZHX" id="h1U-OD-iWR"/><outlet property="imageView3" destination="Gxt-jN-2A6" id="FCv-fF-gY3"/><outlet property="imageView4" destination="K8v-Kf-hrW" id="vFM-nf-SQC"/><outlet property="imageView5" destination="rom-FU-Cws" id="v8H-IR-wTs"/><outlet property="imageView6" destination="2Rw-Wx-IvX" id="wUZ-V1-5hO"/><outlet property="imageView7" destination="CY2-D2-to6" id="Qx5-Ce-tZ7"/><outlet property="imageView8" destination="AU2-ze-PXp" id="vq3-IY-NcH"/><outlet property="imageView9" destination="V5Q-Ge-JJm" id="5Ej-q1-36J"/><outlet property="imageView10" destination="Zob-Hc-hsj" id="tgO-3O-JmD"/><outlet property="imageView11" destination="93A-Xs-IWx" id="wCk-au-lki"/><outlet property="imageView12" destination="hv0-25-cXI" id="rue-u5-17B"/><outlet property="button" destination="4cU-L1-zcN" id="N62-Mb-uE6"/>
</connections></tableViewCell></objects></document>
@@ -1,19 +0,0 @@
import UIKit
import ContainerControllerSwift
// typealias PlayMusicItGribButtonActionCallback = () -> Void
class PlayMusicItGribView: XibView {
// MARK: - IBOutlets
// @IBOutlet weak var button: DesignButton!
override func loadedFromNib() {
}
// @IBAction func buttonClickAction(_ sender: DesignButton) {
// }
}
@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects><placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PlayMusicItGribView" customModule="FigmaConvertXib" customModuleProvider="target">
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/><view clipsSubviews="NO" alpha="1.0" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" userLabel=" PlayMusicItGrib" id="vYi-qe-j5R"><rect key="frame" x="526.0" y="0.0" width="375.0" height="30.0"/><color key="backgroundColor" red="1.0" green="1.0" blue="1.0" alpha="0.10999999940395355" colorSpace="custom" customColorSpace="sRGB"/><autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/><freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/></view></objects></document>
@@ -1,42 +0,0 @@
import UIKit
import ContainerControllerSwift
class PlayMusicViewController: StoryboardController {
@IBOutlet weak var tableView: TableAdapterView!
var containers: [ContainerController] = []
var containerTableView: TableAdapterView?
var container: ContainerController?
override func viewDidLoad() {
super.viewDidLoad()
self.navBarHide = true
view.backgroundColor = .white
let color1 = #colorLiteral(red: 0.1019607843, green: 0.168627451, blue: 0.4588235294, alpha: 1)
let img1 = #imageLiteral(resourceName: "imgPlaylistMain")
var items: [TableAdapterItem] = []
// items.append( PlaylistTitleItem(state: .init() ) )
tableView.set(items: items, animated: true)
let fr = CGRect(x: 0, y: 0, width: ScreenSize.width, height: 26)
let header = TaxiContainerHeaderView(frame: fr)
var itemsC: [TableAdapterItem] = []
// itemsC.append( TaxiAddressABItem(state: .init() ) )
// itemsC.append( TaxiAddressABItem(state: .init() ) )
// itemsC.append( TaxiCollectionCarsItem(state: .init() ) )
// itemsC.append( TaxiVisaCardItem(state: .init() ) )
// itemsC.append( TaxiButtonBottomItem(state: .init() ) )
let ccc = addContainer(position: .init(top: 266, bottom: 380), radius: 20, items: itemsC, header: header)
container = ccc.0
containerTableView = ccc.1
containers.append( ccc.0 )
}
}
@@ -37,6 +37,7 @@ class Button: UIButton {
/// Simple tap implementation
typealias Closure = () -> ()
typealias ClosureClick = (_ down: Bool) -> ()
class ClosureSleeve {
@@ -59,5 +60,21 @@ extension UIControl {
sleeve,
objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN)
}
func tapClassic(_ closure: @escaping ClosureClick) {
self.tap(for: .touchDown) { // [weak self] in
closure(true)
}
self.tap(for: .touchUpInside) { // [weak self] in
closure(false)
}
self.tap(for: .touchUpOutside) { // [weak self] in
closure(false)
}
self.tap(for: .touchCancel) { // [weak self] in
closure(false)
}
}
}
@@ -60,7 +60,7 @@ class StoryboardController: UIViewController {
extension StoryboardController: ContainerControllerDelegate {
func addContainer(position: ContainerPosition, radius: CGFloat, items: [TableAdapterItem]? = nil, delegate: ContainerControllerDelegate? = nil, addShadow: Bool = true, addBackShadow: Bool = false, header: UIView? = nil, footer: UIView? = nil) -> (ContainerController, TableAdapterView) {
func addContainer(position: ContainerPosition, radius: CGFloat, items: [TableAdapterItem]? = nil, delegate: ContainerControllerDelegate? = nil, addShadow: Bool = true, addBackShadow: Bool = false, header: UIView? = nil, footer: UIView? = nil, back: UIView? = nil) -> (ContainerController, TableAdapterView) {
let layoutC = ContainerLayout()
layoutC.positions = position //
@@ -89,6 +89,8 @@ extension StoryboardController: ContainerControllerDelegate {
container.set(backgroundShadowShow: addBackShadow)
container.view.backgroundColor = .white
// container.view.backgroundColor = color
if let headerV = header {
@@ -99,6 +101,10 @@ extension StoryboardController: ContainerControllerDelegate {
container.add(footerView: footerV)
}
if let back = back {
container.backView?.addSubview(back)
}
let table = TableAdapterView(frame: CGRect(x: 0, y: 0, width: ContainerDevice.width, height: 0), style: .plain)
table.indicatorStyle = .default
// container.add(scrollView: addCollectionView())
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "iconPlayMusicContainerGripOff.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "iconPlayMusicContainerGripOn.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "iconPlayMusicControlsAirdrop.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "iconPlayMusicControlsFastForwardLeft.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "iconPlayMusicControlsFastForwardRight.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "iconPlayMusicControlsPause.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "iconPlayMusicControlsPlay.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "iconPlayMusicControlsRepeat.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "iconPlayMusicControlsShuffle.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "iconPlayMusicMore.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "iconPlayMusicVolumeHight.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 998 B

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "iconPlayMusicVolumeOff.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "imgPlayMusicIdDisclosureYouMe.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "img_CamelPhat_DropIt.jpg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "img_Disclosure_Ware_Running.jpg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "img_Disclosure_You_Me.jpg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "img_Flume_Greatest_View.jpg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "benno_blome_botha.jpg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "big_miz_aador.jpg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "claptone_music_got_me.jpg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "funky_house_classic.jpg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "myselor_neurolife.jpg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "the_audio_bar.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "iconPlaylistPause.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 919 B

@@ -45,9 +45,9 @@ class MapParkingViewController: StoryboardController {
ccc.0.view.clipsToBounds = false
ccc.0.scrollView?.clipsToBounds = false
ccc.0.backView.clipsToBounds = false
ccc.0.backView?.clipsToBounds = false
headerr.clipsToBounds = false
// ccc.0.backView.addSubview( header)
// ccc.0.backView?.addSubview( header)
containerTableView = ccc.1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,376 @@
import UIKit
import AVFAudio
import ContainerControllerSwift
// MARK: - State
extension PlayMusicItItem {
enum FastForwardType {
case right
case left
}
struct State {
var type: ViewCallsPlayerType = .none
var duration: CGFloat = 0
var currentTimeChange: Bool = false
var currentTime: CGFloat = 0
var volume: Float = 0
var time: String = ""
var play: Bool?
var firstImage: UIImage?
var title: String?
var subtitle: String?
var image3: UIImage?
var image4: UIImage?
var image5: UIImage?
var image6: UIImage?
var image7: UIImage?
var image8: UIImage?
var image9: UIImage?
var image10: UIImage?
var image11: UIImage?
var image12: UIImage?
var handlers: Handlers = .init()
}
struct Handlers {
var onPlayAt: ((_ play: Bool)->(Void))?
var onFastForwardAt: ((_ type: FastForwardType)->(Void))?
var onMoreAt: (()->(Void))?
var onClickAt: (()->(Void))?
var onTimeAt: ((_ time: CGFloat)->(Void))?
// var onBottomAllAt: (()->(Void))?
}
}
// MARK: - Item
class PlayMusicItItem: TableAdapterItem {
init(state: PlayMusicItItem.State) {
let cellData = PlayMusicItCellData(state: state)
super.init(cellClass: PlayMusicItCell.self, cellData: cellData)
}
}
// MARK: - Data
class PlayMusicItCellData: TableAdapterCellData {
var state: PlayMusicItItem.State
init(state: PlayMusicItItem.State) {
self.state = state
super.init()
// self.cellClickCallback = state.handlers.onClickAt
}
override public func cellHeight() -> CGFloat {
// let calcHeight = calculateLabel(
// text: state.titleText,
// padding: 16,
// titleFont: SFProText.regular.size(.headline)
// )
return Self.cHeight()
}
public static func cHeight() -> CGFloat {
return 740.0
}
override public func canEditing() -> Bool {
return editing
}
}
// MARK: - Cell
class PlayMusicItCell: TableAdapterCell {
@IBOutlet var labelY: NSLayoutConstraint?
@IBOutlet var imageHeight: NSLayoutConstraint!
@IBOutlet var imageWidth: NSLayoutConstraint!
public var data: PlayMusicItCellData?
@IBOutlet private weak var firstImageView: UIImageView?
@IBOutlet var miniView: UIView!
@IBOutlet private weak var subtitleLabel: UILabel?
@IBOutlet private weak var titleLabel: UILabel?
@IBOutlet var subtitleMiniLabel: UILabel!
@IBOutlet private weak var titleMiniLabel: UILabel?
@IBOutlet var controlMiniImageView: UIImageView!
@IBOutlet var time1Label: UILabel!
@IBOutlet var time2Label: UILabel!
@IBOutlet private weak var imageView3: UIImageView?
@IBOutlet private weak var imageView4: UIImageView?
@IBOutlet private weak var imageView9: UIImageView?
@IBOutlet private weak var imageView10: UIImageView?
@IBOutlet private weak var imageView11: UIImageView?
@IBOutlet var ccardView: UIView!
@IBOutlet var cccardView: UIView!
@IBOutlet var timeSlider: UISlider!
@IBOutlet var volumeSlider: UISlider!
@IBOutlet var topControlMoreImageView: UIImageView!
@IBOutlet var centerControlRightImageView: UIImageView!
@IBOutlet var centerControlLeftImageView: UIImageView!
@IBOutlet var centerControllPlayView: UIView!
@IBOutlet var centerControlPlayImageView: UIImageView!
@IBOutlet var bottomControlsView: UIView!
@IBOutlet override var selectedView: UIView? { didSet { } }
@IBOutlet var cardView: UIView?
@IBOutlet var button: UIButton?
@IBOutlet var imgMusicPicView: DesignFigure!
var box: Bool = false
var pause: Bool = true
@IBOutlet var topControlMoreBtn: UIButton!
@IBOutlet var bottomControlsBtn: UIButton!
@IBOutlet var centerControlRightBtn: UIButton!
@IBOutlet var centerControlLeftBtn: UIButton!
@IBOutlet var centerControlPlayBtn: UIButton!
func updateImage(full: Bool = false) {
let v = ScreenSize.width - 50
// let v2 = ScreenSize.width + 7
imageWidth.constant = self.box ? 60 : v
imageHeight.constant = self.box ? 60 : v
// labelY.constant = self.box ? 25 : v2
if self.box && self.subtitleLabel?.alpha == 1 {
self.setNeedsUpdateConstraints()
} else if !self.box && self.subtitleLabel?.alpha == 0 {
self.setNeedsUpdateConstraints()
}
if let playerType = self.data?.state.type,
let d = self.data?.state.duration,
let c = self.data?.state.currentTime,
let time = self.data?.state.time,
let v = self.data?.state.volume {
print(" player cell \(d) \(c) \(v) ")
let currentTimeChange = self.data?.state.currentTimeChange ?? false
if !currentTimeChange {
self.timeSlider.maximumValue = Float(d)
self.timeSlider.value = d == c ? 0.0 : Float(c)
}
self.volumeSlider.maximumValue = Float(1.00)
self.volumeSlider.value = Float(v)
let titlee = "\(ViewCallsPlayer.getTitle( playerType))"
let subtitle = "\(ViewCallsPlayer.getSubtitle( playerType))"
self.titleLabel?.text = titlee
self.titleMiniLabel!.text = titlee
self.subtitleLabel?.text = subtitle
self.subtitleMiniLabel.text = subtitle
let ddTime = String(format: "%02d:%02d", ((Int)((d))) / 60, ((Int)((d))) % 60 )
if !currentTimeChange {
self.time1Label.text = time
}
self.time2Label.text = ddTime
self.firstImageView?.image = ViewCallsPlayer.getImage( playerType)
}
UIView.animate(withDuration: 0.35) {
if self.box && self.titleLabel?.alpha == 1 {
self.subtitleLabel?.alpha = 0
self.titleLabel?.alpha = 0
self.miniView.alpha = 1
self.layoutIfNeeded()
} else if !self.box && self.titleLabel?.alpha == 0 {
self.miniView.alpha = 0
self.subtitleLabel?.alpha = 1
self.titleLabel?.alpha = 1
self.layoutIfNeeded()
}
}
let imgPlay = #imageLiteral(resourceName: "iconPlayMusicControlsPlay")
let imgPause = #imageLiteral(resourceName: "iconPlayMusicControlsPause")
let imgMiniPause = #imageLiteral(resourceName: "iconPlaylistPause")
let imgMiniPlay = #imageLiteral(resourceName: "iconPlaylistPlay")
if full {
self.pause = !self.pause
}
if let play = self.data?.state.play {
self.pause = !play
}
self.centerControlPlayImageView.image = self.pause ? imgPlay : imgPause
self.controlMiniImageView.image = self.pause ? imgMiniPlay : imgMiniPause
}
override func awakeFromNib() {
self.updateImage(full: false)
separator(hide: true)
button?.tapClassic({ [weak self] down in
UIView.animate(withDuration: down ? 0.0 : 0.15) {
self?.cccardView.alpha = down ? 0.14 : 0.05
}
if !down {
self?.data?.state.handlers.onClickAt?()
}
})
centerControlPlayBtn?.tapHideAnimation(
view: centerControllPlayView,
type: .alpha(0.5),
callback: { //[weak self]
type in
if type == .touchUpInside {
let pl = !self.pause
self.data?.state.play = !pl
self.pause = !self.pause
// if let play = self.data?.state.play {
// self.pause = !play
// }
self.updateImage(full: false)
self.data?.state.handlers.onPlayAt?(!self.pause)
}
}
)
centerControlRightBtn?.tapHideAnimation(
view: centerControlRightImageView,
type: .alpha(0.5),
callback: { //[weak self]
type in
if type == .touchUpInside {
self.data?.state.play = true
self.pause = false
self.updateImage(full: false)
self.data?.state.handlers.onFastForwardAt?(.right)
}
}
)
centerControlLeftBtn?.tapHideAnimation(
view: centerControlLeftImageView,
type: .alpha(0.5),
callback: { //[weak self]
type in
if type == .touchUpInside {
self.data?.state.play = true
self.pause = false
self.updateImage(full: false)
self.data?.state.handlers.onFastForwardAt?(.left)
}
}
)
topControlMoreBtn?.tapHideAnimation(
view: topControlMoreImageView,
type: .alpha(0.5),
callback: { //[weak self]
type in
if type == .touchUpInside {
self.data?.state.handlers.onMoreAt?()
}
}
)
bottomControlsBtn?.tapHideAnimation(
view: bottomControlsView,
type: .alpha(0.5),
callback: { //[weak self]
type in
if type == .touchUpInside {
self.data?.state.handlers.onMoreAt?()
}
}
)
}
@IBAction func timeSliderDownAction(_ sender: UISlider) {
timeSliderrAction(sender, change: true)
}
@IBAction func timeSliderAction(_ sender: UISlider) {
timeSliderrAction(sender, change: false)
}
func timeSliderrAction(_ sender: UISlider, change: Bool = true) {
if change { self.data?.state.currentTimeChange = true }
let newV = CGFloat(sender.value)
let time = String(format: "%02d:%02d", ((Int)((newV))) / 60, ((Int)((newV))) % 60 )
print("timeSliderrAction \(newV) ")
self.time1Label.text = time
if !change {
ViewCallsPlayer.shared.avPlayer?.currentTime = newV
self.data?.state.currentTimeChange = false
}
self.data?.state.handlers.onTimeAt?(newV)
}
@IBAction func volumeSliderAction(_ sender: UISlider) {
// AVAudioSession.sharedInstance().setVolume(sender.value, at: CMTime.zero)
}
override func fill(data: TableAdapterCellData?) {
guard let data = data as? PlayMusicItCellData else { return }
self.data = data
if let play = self.data?.state.play {
self.pause = !play
}
if let v = data.state.firstImage { firstImageView?.image = v }
if let v = data.state.title {
titleLabel?.text = v
titleMiniLabel?.text = v
}
if let v = data.state.subtitle {
subtitleLabel?.text = v
subtitleMiniLabel?.text = v
}
if let v = data.state.image3 { imageView3?.image = v
}
if let v = data.state.image4 { imageView4?.image = v }
if let v = data.state.image9 { imageView9?.image = v }
if let v = data.state.image10 { imageView10?.image = v }
if let v = data.state.image11 { imageView11?.image = v }
// if let v = data.state.image5 { imageView5?.image = v }
// if let v = data.state.image6 { imageView6?.image = v }
// if let v = data.state.image7 { imageView7?.image = v }
// if let v = data.state.image8 { imageView8?.image = v }
// if let v = data.state.image12 { imageView12?.image = v }
}
}
@@ -0,0 +1,485 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="dark"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<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"/>
<tableViewCell contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" rowHeight="78" id="7kB-NQ-FSp" customClass="PlayMusicItCell" customModule="ContainerController" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="720"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="7kB-NQ-FSp" id="ChH-TT-3bu">
<rect key="frame" x="0.0" y="0.0" width="375" height="720"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pck-cd-HzR" userLabel="PlayMusicIt">
<rect key="frame" x="0.0" y="0.0" width="375" height="720"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ae3-Kp-Tdb" userLabel="Frame 89522">
<rect key="frame" x="0.0" y="15" width="375" height="64"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iconPlaylistPlay" translatesAutoresizingMaskIntoConstraints="NO" id="YaM-g0-kgC" userLabel="iconPlaylistPlay">
<rect key="frame" x="324" y="21" width="24" height="23"/>
<constraints>
<constraint firstAttribute="height" constant="23" id="4a9-Gj-md0"/>
<constraint firstAttribute="width" constant="24" id="i2B-JL-lWw"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iconPlaylistNext" translatesAutoresizingMaskIntoConstraints="NO" id="q8R-7C-HKV" userLabel="iconPlaylistNext">
<rect key="frame" x="279" y="21" width="24" height="23"/>
<constraints>
<constraint firstAttribute="height" constant="23" id="B9j-ES-iVL"/>
<constraint firstAttribute="width" constant="24" id="pEJ-G2-rF8"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ZHU" lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EMw-fw-R4C" userLabel="ZHU">
<rect key="frame" x="95" y="12" width="172" height="26"/>
<constraints>
<constraint firstAttribute="height" constant="26" id="osz-C7-SPO"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Generationwhy" lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vFG-Pk-ewu" userLabel="Generationwhy">
<rect key="frame" x="95" y="32" width="169" height="26"/>
<constraints>
<constraint firstAttribute="height" constant="26" id="Y8h-Vz-jmE"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="11"/>
<color key="textColor" red="0.50588238240000005" green="0.50980395079999996" blue="0.5411764979" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</label>
</subviews>
<constraints>
<constraint firstItem="EMw-fw-R4C" firstAttribute="top" secondItem="Ae3-Kp-Tdb" secondAttribute="top" constant="12" id="2CA-iD-Zb4"/>
<constraint firstItem="q8R-7C-HKV" firstAttribute="leading" secondItem="vFG-Pk-ewu" secondAttribute="trailing" constant="15" id="5OJ-UR-5CG"/>
<constraint firstAttribute="trailing" secondItem="YaM-g0-kgC" secondAttribute="trailing" constant="27" id="8kN-2X-N1G"/>
<constraint firstItem="YaM-g0-kgC" firstAttribute="top" secondItem="Ae3-Kp-Tdb" secondAttribute="top" constant="21" id="CaR-en-94f"/>
<constraint firstItem="vFG-Pk-ewu" firstAttribute="top" secondItem="Ae3-Kp-Tdb" secondAttribute="top" constant="32" id="Vqj-dB-ZIJ"/>
<constraint firstItem="q8R-7C-HKV" firstAttribute="top" secondItem="Ae3-Kp-Tdb" secondAttribute="top" constant="21" id="cRo-kZ-LGQ"/>
<constraint firstItem="EMw-fw-R4C" firstAttribute="leading" secondItem="Ae3-Kp-Tdb" secondAttribute="leading" constant="95" id="dcz-el-mUT"/>
<constraint firstAttribute="height" constant="64" id="lyK-Rz-k1E"/>
<constraint firstItem="YaM-g0-kgC" firstAttribute="leading" secondItem="q8R-7C-HKV" secondAttribute="trailing" constant="21" id="ok8-nJ-f6N"/>
<constraint firstItem="q8R-7C-HKV" firstAttribute="leading" secondItem="EMw-fw-R4C" secondAttribute="trailing" constant="12" id="xuo-He-pnJ"/>
<constraint firstItem="vFG-Pk-ewu" firstAttribute="leading" secondItem="Ae3-Kp-Tdb" secondAttribute="leading" constant="95" id="yyu-gz-tdE"/>
</constraints>
</view>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nvc-Ju-J8w" userLabel="imgMusicPicView" customClass="DesignFigure" customModule="ContainerController" customModuleProvider="target">
<rect key="frame" x="25" y="19" width="325" height="325"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aCv-5u-QVe" userLabel="imgMusicPicView" customClass="DesignFigure" customModule="ContainerController" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="325" height="325"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="10"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="fillColor">
<color key="value" red="0.52156862745098043" green="0.52156862745098043" blue="0.52156862745098043" alpha="0.20000000000000001" colorSpace="custom" customColorSpace="calibratedRGB"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="imgPlayMusicIdDisclosureYouMe" translatesAutoresizingMaskIntoConstraints="NO" id="nwg-a4-OQj" userLabel="imgPlayMusicIdDisclosureYouMe">
<rect key="frame" x="5" y="5" width="315" height="315"/>
</imageView>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="aCv-5u-QVe" secondAttribute="bottom" id="Bp4-w9-tkk"/>
<constraint firstItem="aCv-5u-QVe" firstAttribute="top" secondItem="nvc-Ju-J8w" secondAttribute="top" id="GzF-jg-t6d"/>
<constraint firstAttribute="height" constant="325" id="KlO-k9-3vb"/>
<constraint firstItem="aCv-5u-QVe" firstAttribute="leading" secondItem="nvc-Ju-J8w" secondAttribute="leading" id="P5W-iy-RIS"/>
<constraint firstAttribute="trailing" secondItem="aCv-5u-QVe" secondAttribute="trailing" id="RU1-ca-wag"/>
<constraint firstAttribute="bottom" secondItem="nwg-a4-OQj" secondAttribute="bottom" constant="5" id="T7c-cI-cOa"/>
<constraint firstAttribute="trailing" secondItem="nwg-a4-OQj" secondAttribute="trailing" constant="5" id="VRn-Lc-A66"/>
<constraint firstAttribute="width" constant="325" id="hqm-Io-0ou"/>
<constraint firstItem="nwg-a4-OQj" firstAttribute="leading" secondItem="nvc-Ju-J8w" secondAttribute="leading" constant="5" id="pNu-An-Du8"/>
<constraint firstItem="nwg-a4-OQj" firstAttribute="top" secondItem="nvc-Ju-J8w" secondAttribute="top" constant="5" id="uRz-vV-kxP"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Ut Distinctio Recusandae Vi..." lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AIJ-a4-N3r" userLabel="Ut Distinctio Recusandae Vi...">
<rect key="frame" x="33" y="382" width="270" height="23"/>
<constraints>
<constraint firstAttribute="height" constant="23" id="kZL-OT-OT1"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" alpha="0.5" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Est beatae non rerum et repudia..." lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XOy-9r-ZHX" userLabel="Est beatae non rerum et repudia...">
<rect key="frame" x="33" y="406" width="270" height="23"/>
<constraints>
<constraint firstAttribute="height" constant="23" id="l2K-go-qFQ"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" alpha="0.5" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0:31" lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1ta-Wm-m8n" userLabel="1">
<rect key="frame" x="35" y="484" width="26" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="mKA-jc-6Zd"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" alpha="0.5" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0:31" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PbO-FM-akX" userLabel="1">
<rect key="frame" x="314" y="484" width="26" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="S1P-lN-tBf"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iconPlayMusicMore" translatesAutoresizingMaskIntoConstraints="NO" id="hv0-25-cXI" userLabel="iconPlayMusicMore">
<rect key="frame" x="315" y="391" width="28" height="28"/>
<constraints>
<constraint firstAttribute="height" constant="28" id="aJ4-qp-Jcf"/>
<constraint firstAttribute="width" constant="28" id="g8S-ac-1MW"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lgs-3A-E6I">
<rect key="frame" x="300" y="376" width="60" height="60"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="0eB-bX-JZK"/>
<constraint firstAttribute="height" constant="60" id="Hjl-ju-Fwo"/>
</constraints>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kNx-Pt-YLP" userLabel="sliderMediaView">
<rect key="frame" x="0.0" y="429" width="375" height="78"/>
<subviews>
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" minValue="0.0" maxValue="100" translatesAutoresizingMaskIntoConstraints="NO" id="cb9-Ni-DJu">
<rect key="frame" x="35" y="4" width="305" height="70"/>
<color key="tintColor" red="0.92156862745098034" green="0.26666666666666666" blue="0.36470588235294116" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<action selector="timeSliderAction:" destination="7kB-NQ-FSp" eventType="touchUpOutside" id="4Cz-ax-K1q"/>
<action selector="timeSliderAction:" destination="7kB-NQ-FSp" eventType="touchCancel" id="BQp-xc-npr"/>
<action selector="timeSliderAction:" destination="7kB-NQ-FSp" eventType="touchUpInside" id="Cxr-Id-Xyy"/>
<action selector="timeSliderDownAction:" destination="7kB-NQ-FSp" eventType="valueChanged" id="D1H-oG-eFf"/>
<action selector="timeSliderDownAction:" destination="7kB-NQ-FSp" eventType="touchDown" id="yUy-KM-Xcn"/>
</connections>
</slider>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="cb9-Ni-DJu" secondAttribute="bottom" constant="5" id="0Jn-va-C4S"/>
<constraint firstAttribute="trailing" secondItem="cb9-Ni-DJu" secondAttribute="trailing" constant="37" id="NUo-o0-TE2"/>
<constraint firstAttribute="height" constant="78" id="lN4-n0-Qaw"/>
<constraint firstItem="cb9-Ni-DJu" firstAttribute="top" secondItem="kNx-Pt-YLP" secondAttribute="top" constant="4" id="ptQ-h1-f1V"/>
<constraint firstItem="cb9-Ni-DJu" firstAttribute="leading" secondItem="kNx-Pt-YLP" secondAttribute="leading" constant="37" id="vkd-6m-L41"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8oq-CE-yr9" userLabel="sliderVolumeView">
<rect key="frame" x="0.0" y="573" width="375" height="78"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iconPlayMusicVolumeHight" translatesAutoresizingMaskIntoConstraints="NO" id="Gxt-jN-2A6" userLabel="iconPlayMusicVolumeHight">
<rect key="frame" x="328" y="31" width="16" height="16"/>
<constraints>
<constraint firstAttribute="width" constant="16" id="U10-pb-MQ1"/>
<constraint firstAttribute="height" constant="16" id="xoL-cq-TvY"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iconPlayMusicVolumeOff" translatesAutoresizingMaskIntoConstraints="NO" id="K8v-Kf-hrW" userLabel="iconPlayMusicVolumeOff">
<rect key="frame" x="32" y="31" width="16" height="16"/>
<constraints>
<constraint firstAttribute="height" constant="16" id="NHe-Dv-Ko4"/>
<constraint firstAttribute="width" constant="16" id="khV-xk-f8f"/>
</constraints>
</imageView>
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="50" minValue="0.0" maxValue="100" translatesAutoresizingMaskIntoConstraints="NO" id="jQB-oj-6ya">
<rect key="frame" x="52" y="4" width="272" height="70"/>
<color key="tintColor" red="0.92156862750000001" green="0.2666666667" blue="0.36470588240000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<action selector="volumeSliderAction:" destination="7kB-NQ-FSp" eventType="valueChanged" id="drg-N7-1pk"/>
</connections>
</slider>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="K8v-Kf-hrW" firstAttribute="centerY" secondItem="8oq-CE-yr9" secondAttribute="centerY" id="6VU-Ia-jk3"/>
<constraint firstItem="K8v-Kf-hrW" firstAttribute="leading" secondItem="8oq-CE-yr9" secondAttribute="leading" constant="32" id="Nxp-qS-qg6"/>
<constraint firstItem="jQB-oj-6ya" firstAttribute="top" secondItem="8oq-CE-yr9" secondAttribute="top" constant="4" id="btj-rG-S1D"/>
<constraint firstAttribute="height" constant="78" id="czI-t4-Igd"/>
<constraint firstItem="Gxt-jN-2A6" firstAttribute="leading" secondItem="jQB-oj-6ya" secondAttribute="trailing" constant="6" id="hOB-Bf-znx"/>
<constraint firstAttribute="trailing" secondItem="Gxt-jN-2A6" secondAttribute="trailing" constant="31" id="izm-kj-9f1"/>
<constraint firstAttribute="bottom" secondItem="jQB-oj-6ya" secondAttribute="bottom" constant="5" id="kXX-wk-XeH"/>
<constraint firstItem="Gxt-jN-2A6" firstAttribute="centerY" secondItem="8oq-CE-yr9" secondAttribute="centerY" id="lEO-u1-RsN"/>
<constraint firstItem="jQB-oj-6ya" firstAttribute="leading" secondItem="K8v-Kf-hrW" secondAttribute="trailing" constant="6" id="yzn-HT-Egz"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MJE-Pp-4WO" userLabel="Frame 89552">
<rect key="frame" x="25" y="515" width="325" height="38"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qbe-vI-oIf" userLabel="Frame 89551">
<rect key="frame" x="144" y="0.5" width="37" height="37"/>
<subviews>
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iconPlayMusicControlsPause" translatesAutoresizingMaskIntoConstraints="NO" id="rom-FU-Cws" userLabel="iconPlayMusicControlsPause">
<rect key="frame" x="0.0" y="0.0" width="37" height="37"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iconPlayMusicControlsPlay" translatesAutoresizingMaskIntoConstraints="NO" id="2Rw-Wx-IvX" userLabel="iconPlayMusicControlsPlay">
<rect key="frame" x="0.0" y="0.0" width="37" height="37"/>
</imageView>
</subviews>
<constraints>
<constraint firstItem="2Rw-Wx-IvX" firstAttribute="top" secondItem="Qbe-vI-oIf" secondAttribute="top" id="2rK-2a-N1p"/>
<constraint firstItem="rom-FU-Cws" firstAttribute="top" secondItem="Qbe-vI-oIf" secondAttribute="top" id="40h-ci-Ddh"/>
<constraint firstAttribute="bottom" secondItem="rom-FU-Cws" secondAttribute="bottom" id="4ui-DA-ErJ"/>
<constraint firstItem="rom-FU-Cws" firstAttribute="leading" secondItem="Qbe-vI-oIf" secondAttribute="leading" id="TOp-lW-ACP"/>
<constraint firstAttribute="width" constant="37" id="Tpw-3u-Zwc"/>
<constraint firstAttribute="trailing" secondItem="2Rw-Wx-IvX" secondAttribute="trailing" id="byL-Fl-0a0"/>
<constraint firstItem="2Rw-Wx-IvX" firstAttribute="leading" secondItem="Qbe-vI-oIf" secondAttribute="leading" id="ioz-m4-fVv"/>
<constraint firstAttribute="bottom" secondItem="2Rw-Wx-IvX" secondAttribute="bottom" id="pZK-lI-4Jv"/>
<constraint firstAttribute="height" constant="37" id="yfi-gT-ey4"/>
<constraint firstAttribute="trailing" secondItem="rom-FU-Cws" secondAttribute="trailing" id="zvU-vd-aZw"/>
</constraints>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iconPlayMusicControlsFastForwardRight" translatesAutoresizingMaskIntoConstraints="NO" id="CY2-D2-to6" userLabel="iconPlayMusicControlsFastForwardRight">
<rect key="frame" x="252" y="0.5" width="37" height="37"/>
<constraints>
<constraint firstAttribute="height" constant="37" id="DT2-75-MVP"/>
<constraint firstAttribute="width" constant="37" id="JzX-BI-PEZ"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iconPlayMusicControlsFastForwardLeft" translatesAutoresizingMaskIntoConstraints="NO" id="AU2-ze-PXp" userLabel="iconPlayMusicControlsFastForwardLeft">
<rect key="frame" x="36" y="0.5" width="37" height="37"/>
<constraints>
<constraint firstAttribute="height" constant="37" id="OhL-ii-QHS"/>
<constraint firstAttribute="width" constant="37" id="ocB-ui-J6F"/>
</constraints>
</imageView>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="38" id="2K4-vn-uj2"/>
<constraint firstItem="AU2-ze-PXp" firstAttribute="centerX" secondItem="MJE-Pp-4WO" secondAttribute="centerX" constant="-108" id="3uh-RI-9Vx"/>
<constraint firstItem="CY2-D2-to6" firstAttribute="centerY" secondItem="MJE-Pp-4WO" secondAttribute="centerY" id="9Ao-eN-hEN"/>
<constraint firstItem="Qbe-vI-oIf" firstAttribute="centerY" secondItem="MJE-Pp-4WO" secondAttribute="centerY" id="ATp-1I-q8Y"/>
<constraint firstItem="CY2-D2-to6" firstAttribute="centerX" secondItem="MJE-Pp-4WO" secondAttribute="centerX" constant="108" id="TLa-Xv-6uE"/>
<constraint firstItem="Qbe-vI-oIf" firstAttribute="centerX" secondItem="MJE-Pp-4WO" secondAttribute="centerX" id="Ts6-eO-p2R"/>
<constraint firstItem="AU2-ze-PXp" firstAttribute="centerY" secondItem="MJE-Pp-4WO" secondAttribute="centerY" id="kse-ER-Ww8"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HoL-Lg-nHz">
<rect key="frame" x="139" y="485.5" width="97" height="97"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q2B-zB-axH">
<rect key="frame" x="257" y="495.5" width="77" height="77"/>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8QO-gI-q8V">
<rect key="frame" x="41" y="495.5" width="77" height="77"/>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cny-2h-Bsr" userLabel="Frame 89553">
<rect key="frame" x="25" y="669" width="325" height="21"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iconPlayMusicControlsRepeat" translatesAutoresizingMaskIntoConstraints="NO" id="V5Q-Ge-JJm" userLabel="iconPlayMusicControlsRepeat">
<rect key="frame" x="258" y="0.0" width="21" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="dZn-Ki-Gdh"/>
<constraint firstAttribute="width" constant="21" id="gIZ-Hb-ozW"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iconPlayMusicControlsShuffle" translatesAutoresizingMaskIntoConstraints="NO" id="Zob-Hc-hsj" userLabel="iconPlayMusicControlsShuffle">
<rect key="frame" x="46" y="0.0" width="21" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="21" id="Bz6-E1-Op3"/>
<constraint firstAttribute="height" constant="21" id="UIB-OP-Drt"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iconPlayMusicControlsAirdrop" translatesAutoresizingMaskIntoConstraints="NO" id="93A-Xs-IWx" userLabel="iconPlayMusicControlsAirdrop">
<rect key="frame" x="152" y="0.0" width="21" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="SVP-kS-Uhm"/>
<constraint firstAttribute="width" constant="21" id="m3m-XF-jbd"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FxI-Ie-kqC">
<rect key="frame" x="-3" y="-10" width="331" height="51"/>
</button>
</subviews>
<constraints>
<constraint firstItem="V5Q-Ge-JJm" firstAttribute="centerY" secondItem="cny-2h-Bsr" secondAttribute="centerY" id="8EJ-dl-65q"/>
<constraint firstItem="FxI-Ie-kqC" firstAttribute="leading" secondItem="Zob-Hc-hsj" secondAttribute="trailing" constant="-70" id="8zE-Kr-KLD"/>
<constraint firstItem="93A-Xs-IWx" firstAttribute="centerY" secondItem="cny-2h-Bsr" secondAttribute="centerY" id="Asq-eW-0c6"/>
<constraint firstItem="V5Q-Ge-JJm" firstAttribute="leading" secondItem="FxI-Ie-kqC" secondAttribute="trailing" constant="-70" id="BDG-PZ-gmy"/>
<constraint firstItem="Zob-Hc-hsj" firstAttribute="centerY" secondItem="cny-2h-Bsr" secondAttribute="centerY" id="OpJ-N8-XIB"/>
<constraint firstItem="93A-Xs-IWx" firstAttribute="centerX" secondItem="cny-2h-Bsr" secondAttribute="centerX" id="cfC-2A-pdj"/>
<constraint firstAttribute="bottom" secondItem="FxI-Ie-kqC" secondAttribute="bottom" constant="-20" id="drT-rf-y8g"/>
<constraint firstItem="FxI-Ie-kqC" firstAttribute="top" secondItem="cny-2h-Bsr" secondAttribute="top" constant="-10" id="fDK-NX-okp"/>
<constraint firstAttribute="height" constant="21" id="gHA-it-XWw"/>
<constraint firstItem="V5Q-Ge-JJm" firstAttribute="centerX" secondItem="cny-2h-Bsr" secondAttribute="centerX" constant="106" id="hyC-Jd-FvI"/>
<constraint firstItem="Zob-Hc-hsj" firstAttribute="centerX" secondItem="cny-2h-Bsr" secondAttribute="centerX" constant="-106" id="qd1-gt-0YL"/>
</constraints>
</view>
<view userInteractionEnabled="NO" alpha="0.0" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DkJ-tK-Xi7" userLabel="card">
<rect key="frame" x="0.0" y="0.0" width="375" height="720"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qtr-kn-9eE" userLabel="cardFull2">
<rect key="frame" x="0.0" y="0.0" width="375" height="720"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="Qtr-kn-9eE" firstAttribute="leading" secondItem="DkJ-tK-Xi7" secondAttribute="leading" id="M2n-N6-dpZ"/>
<constraint firstItem="Qtr-kn-9eE" firstAttribute="top" secondItem="DkJ-tK-Xi7" secondAttribute="top" id="ke9-wd-mqh"/>
<constraint firstAttribute="bottom" secondItem="Qtr-kn-9eE" secondAttribute="bottom" id="oX2-eF-rfR"/>
<constraint firstAttribute="trailing" secondItem="Qtr-kn-9eE" secondAttribute="trailing" id="zfd-fg-oDI"/>
</constraints>
</view>
<view hidden="YES" alpha="0.0" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kOV-1P-1yq" userLabel="cardFull1" customClass="DesignFigure" customModule="ContainerController" customModuleProvider="target">
<rect key="frame" x="0.0" y="179" width="375" height="800"/>
<constraints>
<constraint firstAttribute="height" constant="800" id="RI7-6X-FuG"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="grColor1">
<color key="value" red="1" green="1" blue="1" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="grColor2">
<color key="value" red="0.79304248089999996" green="0.49400478599999997" blue="0.19496919209999999" alpha="0.1299999952" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="grColor3">
<color key="value" red="0.75061541799999998" green="0.26842230560000002" blue="0.61667269469999997" alpha="0.1899999976" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="grRadial" value="NO"/>
<userDefinedRuntimeAttribute type="point" keyPath="grStartPoint">
<point key="value" x="0.5" y="-3.0616171314629196e-17"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="point" keyPath="grEndPoint">
<point key="value" x="0.5" y="0.99999999999999989"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8Uj-V5-Dkh">
<rect key="frame" x="0.0" y="-6" width="375" height="355"/>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="MJE-Pp-4WO" firstAttribute="top" secondItem="kNx-Pt-YLP" secondAttribute="bottom" constant="8" id="0gh-0w-ujw"/>
<constraint firstItem="1ta-Wm-m8n" firstAttribute="top" secondItem="XOy-9r-ZHX" secondAttribute="bottom" constant="55" id="119-T8-pQD"/>
<constraint firstItem="8QO-gI-q8V" firstAttribute="top" secondItem="AU2-ze-PXp" secondAttribute="top" constant="-20" id="2AF-vi-8xi"/>
<constraint firstItem="8QO-gI-q8V" firstAttribute="bottom" secondItem="AU2-ze-PXp" secondAttribute="bottom" constant="20" id="3z9-fa-oFB"/>
<constraint firstItem="cny-2h-Bsr" firstAttribute="top" secondItem="8oq-CE-yr9" secondAttribute="bottom" constant="18" id="4hs-tt-fDy"/>
<constraint firstItem="8QO-gI-q8V" firstAttribute="trailing" secondItem="AU2-ze-PXp" secondAttribute="trailing" constant="20" id="5N8-Cq-jNz"/>
<constraint firstAttribute="trailing" secondItem="MJE-Pp-4WO" secondAttribute="trailing" constant="25" id="6zQ-cb-HhM"/>
<constraint firstItem="HoL-Lg-nHz" firstAttribute="leading" secondItem="Qbe-vI-oIf" secondAttribute="leading" constant="-30" id="8C0-Vg-y6O"/>
<constraint firstAttribute="trailing" secondItem="PbO-FM-akX" secondAttribute="trailing" constant="35" id="9Kt-uU-noI"/>
<constraint firstAttribute="trailing" secondItem="cny-2h-Bsr" secondAttribute="trailing" constant="25" id="9cg-KV-321"/>
<constraint firstItem="lgs-3A-E6I" firstAttribute="top" secondItem="hv0-25-cXI" secondAttribute="top" constant="-15" id="AC6-wm-fWv"/>
<constraint firstItem="kOV-1P-1yq" firstAttribute="leading" secondItem="pck-cd-HzR" secondAttribute="leading" id="AxZ-s3-XBd"/>
<constraint firstItem="PbO-FM-akX" firstAttribute="top" secondItem="XOy-9r-ZHX" secondAttribute="bottom" constant="55" id="CHH-ee-TGq"/>
<constraint firstItem="hv0-25-cXI" firstAttribute="top" secondItem="pck-cd-HzR" secondAttribute="top" constant="391" id="CJw-AE-WQo"/>
<constraint firstItem="q2B-zB-axH" firstAttribute="trailing" secondItem="CY2-D2-to6" secondAttribute="trailing" constant="20" id="CKE-fA-dg0"/>
<constraint firstItem="kOV-1P-1yq" firstAttribute="top" secondItem="Ae3-Kp-Tdb" secondAttribute="bottom" constant="100" id="DIP-le-gEF"/>
<constraint firstAttribute="bottom" secondItem="DkJ-tK-Xi7" secondAttribute="bottom" id="EjG-fD-tKm"/>
<constraint firstAttribute="trailing" secondItem="8Uj-V5-Dkh" secondAttribute="trailing" id="IFV-Ww-ijT"/>
<constraint firstItem="DkJ-tK-Xi7" firstAttribute="leading" secondItem="pck-cd-HzR" secondAttribute="leading" id="IX2-21-QE6"/>
<constraint firstItem="8Uj-V5-Dkh" firstAttribute="bottom" secondItem="nvc-Ju-J8w" secondAttribute="bottom" constant="5" id="IeN-Qm-Qbp"/>
<constraint firstItem="nvc-Ju-J8w" firstAttribute="top" secondItem="pck-cd-HzR" secondAttribute="top" constant="19" id="KBc-wX-nqu"/>
<constraint firstItem="XOy-9r-ZHX" firstAttribute="leading" secondItem="pck-cd-HzR" secondAttribute="leading" constant="33" id="Mz5-Kv-s4h"/>
<constraint firstItem="q2B-zB-axH" firstAttribute="leading" secondItem="CY2-D2-to6" secondAttribute="leading" constant="-20" id="PIS-F6-Hqf"/>
<constraint firstAttribute="trailing" secondItem="hv0-25-cXI" secondAttribute="trailing" constant="32" id="R5x-pT-S2z"/>
<constraint firstItem="8oq-CE-yr9" firstAttribute="leading" secondItem="pck-cd-HzR" secondAttribute="leading" id="T26-sr-n8M"/>
<constraint firstItem="cny-2h-Bsr" firstAttribute="leading" secondItem="pck-cd-HzR" secondAttribute="leading" constant="25" id="ZEu-mi-Gle"/>
<constraint firstItem="8Uj-V5-Dkh" firstAttribute="top" secondItem="nvc-Ju-J8w" secondAttribute="top" constant="-25" id="ZRk-hg-5Po"/>
<constraint firstItem="DkJ-tK-Xi7" firstAttribute="top" secondItem="pck-cd-HzR" secondAttribute="top" id="ZYs-1n-NqD"/>
<constraint firstItem="HoL-Lg-nHz" firstAttribute="top" secondItem="Qbe-vI-oIf" secondAttribute="top" constant="-30" id="ag6-LK-AYQ"/>
<constraint firstItem="kNx-Pt-YLP" firstAttribute="leading" secondItem="pck-cd-HzR" secondAttribute="leading" id="bBQ-N5-Xeo"/>
<constraint firstItem="hv0-25-cXI" firstAttribute="leading" secondItem="AIJ-a4-N3r" secondAttribute="trailing" constant="12" id="bOE-KP-oYR"/>
<constraint firstAttribute="trailing" secondItem="Ae3-Kp-Tdb" secondAttribute="trailing" id="bt9-aj-gzZ"/>
<constraint firstItem="MJE-Pp-4WO" firstAttribute="leading" secondItem="pck-cd-HzR" secondAttribute="leading" constant="25" id="cCk-Tn-BN0"/>
<constraint firstAttribute="trailing" secondItem="kNx-Pt-YLP" secondAttribute="trailing" id="cdR-bK-Uhz"/>
<constraint firstItem="hv0-25-cXI" firstAttribute="leading" secondItem="XOy-9r-ZHX" secondAttribute="trailing" constant="12" id="eop-Wb-ZNY"/>
<constraint firstItem="AIJ-a4-N3r" firstAttribute="leading" secondItem="pck-cd-HzR" secondAttribute="leading" constant="33" id="haj-Z6-jBm"/>
<constraint firstItem="Ae3-Kp-Tdb" firstAttribute="leading" secondItem="pck-cd-HzR" secondAttribute="leading" id="jBQ-We-bKB"/>
<constraint firstItem="nvc-Ju-J8w" firstAttribute="leading" secondItem="pck-cd-HzR" secondAttribute="leading" constant="25" id="jv5-FG-wxz"/>
<constraint firstItem="kNx-Pt-YLP" firstAttribute="top" secondItem="XOy-9r-ZHX" secondAttribute="bottom" id="kTY-vh-CsV"/>
<constraint firstItem="q2B-zB-axH" firstAttribute="top" secondItem="CY2-D2-to6" secondAttribute="top" constant="-20" id="mIL-3I-uVf"/>
<constraint firstItem="8Uj-V5-Dkh" firstAttribute="leading" secondItem="pck-cd-HzR" secondAttribute="leading" id="mUS-m4-pOd"/>
<constraint firstItem="q2B-zB-axH" firstAttribute="bottom" secondItem="CY2-D2-to6" secondAttribute="bottom" constant="20" id="n3G-mv-wds"/>
<constraint firstItem="HoL-Lg-nHz" firstAttribute="bottom" secondItem="Qbe-vI-oIf" secondAttribute="bottom" constant="30" id="o8j-KN-xyq"/>
<constraint firstItem="8oq-CE-yr9" firstAttribute="top" secondItem="MJE-Pp-4WO" secondAttribute="bottom" constant="20" id="reh-R0-v8D"/>
<constraint firstAttribute="trailing" secondItem="8oq-CE-yr9" secondAttribute="trailing" id="rlV-rz-ETy"/>
<constraint firstAttribute="trailing" secondItem="kOV-1P-1yq" secondAttribute="trailing" id="srm-uE-8AX"/>
<constraint firstItem="AIJ-a4-N3r" firstAttribute="top" secondItem="nvc-Ju-J8w" secondAttribute="bottom" constant="38" id="szG-HG-hL5"/>
<constraint firstAttribute="trailing" secondItem="DkJ-tK-Xi7" secondAttribute="trailing" id="tOT-R5-uLt"/>
<constraint firstItem="HoL-Lg-nHz" firstAttribute="trailing" secondItem="Qbe-vI-oIf" secondAttribute="trailing" constant="30" id="u6K-kJ-ahd"/>
<constraint firstItem="8QO-gI-q8V" firstAttribute="leading" secondItem="AU2-ze-PXp" secondAttribute="leading" constant="-20" id="uhb-cZ-6cP"/>
<constraint firstItem="1ta-Wm-m8n" firstAttribute="leading" secondItem="pck-cd-HzR" secondAttribute="leading" constant="35" id="vvi-GJ-lQd"/>
<constraint firstItem="Ae3-Kp-Tdb" firstAttribute="top" secondItem="pck-cd-HzR" secondAttribute="top" constant="15" id="x5F-fN-lTB"/>
<constraint firstItem="lgs-3A-E6I" firstAttribute="leading" secondItem="hv0-25-cXI" secondAttribute="leading" constant="-15" id="yNS-aR-Wkw"/>
<constraint firstItem="XOy-9r-ZHX" firstAttribute="top" secondItem="AIJ-a4-N3r" secondAttribute="bottom" constant="1" id="z5N-gH-NuX"/>
</constraints>
<variation key="default">
<mask key="subviews">
<exclude reference="kOV-1P-1yq"/>
</mask>
</variation>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="pck-cd-HzR" secondAttribute="bottom" id="9OY-Wa-CNB"/>
<constraint firstItem="pck-cd-HzR" firstAttribute="leading" secondItem="ChH-TT-3bu" secondAttribute="leading" id="GO9-sE-eM5"/>
<constraint firstItem="pck-cd-HzR" firstAttribute="top" secondItem="ChH-TT-3bu" secondAttribute="top" id="IY9-8b-5sQ"/>
<constraint firstAttribute="trailing" secondItem="pck-cd-HzR" secondAttribute="trailing" id="sEz-Pj-C9X"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="bottomControlsBtn" destination="FxI-Ie-kqC" id="oun-BJ-Omz"/>
<outlet property="bottomControlsView" destination="cny-2h-Bsr" id="7nn-uz-HH7"/>
<outlet property="button" destination="8Uj-V5-Dkh" id="2g9-4j-YFv"/>
<outlet property="ccardView" destination="pck-cd-HzR" id="hDl-dC-gjs"/>
<outlet property="cccardView" destination="DkJ-tK-Xi7" id="hzX-Xg-iT0"/>
<outlet property="centerControlLeftBtn" destination="8QO-gI-q8V" id="sjv-qB-kgo"/>
<outlet property="centerControlLeftImageView" destination="AU2-ze-PXp" id="jHU-iQ-qnN"/>
<outlet property="centerControlPlayBtn" destination="HoL-Lg-nHz" id="GDV-Tl-OiX"/>
<outlet property="centerControlPlayImageView" destination="2Rw-Wx-IvX" id="Rnq-Uz-FuE"/>
<outlet property="centerControlRightBtn" destination="q2B-zB-axH" id="9xJ-i1-cal"/>
<outlet property="centerControlRightImageView" destination="CY2-D2-to6" id="hzz-eJ-EkJ"/>
<outlet property="centerControllPlayView" destination="Qbe-vI-oIf" id="zgs-Ua-rWA"/>
<outlet property="controlMiniImageView" destination="YaM-g0-kgC" id="ojt-kI-p5V"/>
<outlet property="firstImageView" destination="nwg-a4-OQj" id="XCp-Mc-Ruy"/>
<outlet property="imageHeight" destination="KlO-k9-3vb" id="sd4-z3-kBj"/>
<outlet property="imageView10" destination="Zob-Hc-hsj" id="tgO-3O-JmD"/>
<outlet property="imageView11" destination="93A-Xs-IWx" id="wCk-au-lki"/>
<outlet property="imageView3" destination="Gxt-jN-2A6" id="FCv-fF-gY3"/>
<outlet property="imageView4" destination="K8v-Kf-hrW" id="vFM-nf-SQC"/>
<outlet property="imageView9" destination="V5Q-Ge-JJm" id="5Ej-q1-36J"/>
<outlet property="imageWidth" destination="hqm-Io-0ou" id="zLK-1P-o0n"/>
<outlet property="miniView" destination="Ae3-Kp-Tdb" id="CXW-TU-LCh"/>
<outlet property="subtitleLabel" destination="XOy-9r-ZHX" id="NU6-lj-ygi"/>
<outlet property="subtitleMiniLabel" destination="vFG-Pk-ewu" id="CeZ-yX-gr8"/>
<outlet property="time1Label" destination="1ta-Wm-m8n" id="wcu-v4-VR5"/>
<outlet property="time2Label" destination="PbO-FM-akX" id="hvx-Ov-Yqh"/>
<outlet property="timeSlider" destination="cb9-Ni-DJu" id="AE7-ZV-CAf"/>
<outlet property="titleLabel" destination="AIJ-a4-N3r" id="7hB-yY-dGZ"/>
<outlet property="titleMiniLabel" destination="EMw-fw-R4C" id="cRd-dZ-fac"/>
<outlet property="topControlMoreBtn" destination="lgs-3A-E6I" id="cie-re-eeI"/>
<outlet property="topControlMoreImageView" destination="hv0-25-cXI" id="tXZ-yN-5Vr"/>
<outlet property="volumeSlider" destination="jQB-oj-6ya" id="o9D-Gn-bd1"/>
</connections>
<point key="canvasLocation" x="-90.400000000000006" y="-116.04197901049476"/>
</tableViewCell>
</objects>
<resources>
<image name="iconPlayMusicControlsAirdrop" width="63" height="63"/>
<image name="iconPlayMusicControlsFastForwardLeft" width="111" height="111"/>
<image name="iconPlayMusicControlsFastForwardRight" width="111" height="111"/>
<image name="iconPlayMusicControlsPause" width="111" height="111"/>
<image name="iconPlayMusicControlsPlay" width="111" height="111"/>
<image name="iconPlayMusicControlsRepeat" width="63" height="63"/>
<image name="iconPlayMusicControlsShuffle" width="63" height="63"/>
<image name="iconPlayMusicMore" width="84" height="84"/>
<image name="iconPlayMusicVolumeHight" width="48" height="48"/>
<image name="iconPlayMusicVolumeOff" width="48" height="48"/>
<image name="iconPlaylistNext" width="72" height="69"/>
<image name="iconPlaylistPlay" width="72" height="69"/>
<image name="imgPlayMusicIdDisclosureYouMe" width="951" height="954"/>
</resources>
</document>
@@ -0,0 +1,34 @@
import UIKit
import ContainerControllerSwift
// typealias PlayMusicItGradientButtonActionCallback = () -> Void
class PlayMusicItGradientView: XibView {
// MARK: - IBOutlets
// @IBOutlet weak var button: DesignButton!
required public override init() {
super.init()
let fr = CGRect(x: 0, y: 0, width: ScreenSize.width, height: 818.0)
super.frame = fr
}
required public init(frame: CGRect) {
super.init()
super.frame = frame
}
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
override func loadedFromNib() {
}
// @IBAction func buttonClickAction(_ sender: DesignButton) {
// }
}
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22690"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PlayMusicItGradientView" customModule="ContainerController" customModuleProvider="target"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Skq-5Q-biP" userLabel=" PlayMusicItGradient">
<rect key="frame" x="0.0" y="0.0" width="375" height="818"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7c1-BM-S6Y" userLabel="cardFull2">
<rect key="frame" x="0.0" y="0.0" width="375" height="818"/>
<color key="backgroundColor" red="0.12549019607843137" green="0.12941176470588234" blue="0.15686274509803921" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<view alpha="0.5" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sCk-dg-jJt" userLabel="cardFull1" customClass="DesignFigure" customModule="ContainerController" customModuleProvider="target">
<rect key="frame" x="0.0" y="100" width="375" height="718"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="grColor1">
<color key="value" red="1" green="1" blue="1" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="grColor2">
<color key="value" red="0.79304248094558716" green="0.49400478601455688" blue="0.19496919214725494" alpha="0.12999999523162842" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="grColor3">
<color key="value" red="0.75061541795730591" green="0.26842230558395386" blue="0.61667269468307495" alpha="0.18999999761581421" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="grRadial" value="NO"/>
<userDefinedRuntimeAttribute type="point" keyPath="grStartPoint">
<point key="value" x="0.5" y="-3.0616171314629196e-17"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="point" keyPath="grEndPoint">
<point key="value" x="0.5" y="0.99999999999999989"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="sCk-dg-jJt" firstAttribute="leading" secondItem="Skq-5Q-biP" secondAttribute="leading" id="8ym-vE-Lda"/>
<constraint firstItem="7c1-BM-S6Y" firstAttribute="leading" secondItem="Skq-5Q-biP" secondAttribute="leading" id="DU0-Z1-DhD"/>
<constraint firstItem="sCk-dg-jJt" firstAttribute="top" secondItem="Skq-5Q-biP" secondAttribute="top" constant="100" id="Jqv-gs-JKp"/>
<constraint firstAttribute="trailing" secondItem="7c1-BM-S6Y" secondAttribute="trailing" id="PRg-r9-NJE"/>
<constraint firstAttribute="bottom" secondItem="7c1-BM-S6Y" secondAttribute="bottom" id="ZqR-3p-1Jp"/>
<constraint firstItem="7c1-BM-S6Y" firstAttribute="top" secondItem="Skq-5Q-biP" secondAttribute="top" id="bqB-xG-OuN"/>
<constraint firstAttribute="bottom" secondItem="sCk-dg-jJt" secondAttribute="bottom" id="k8D-kY-hB3"/>
<constraint firstAttribute="trailing" secondItem="sCk-dg-jJt" secondAttribute="trailing" id="vVh-Rt-bea"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="-86" y="-49"/>
</view>
</objects>
</document>
@@ -0,0 +1,46 @@
import UIKit
import ContainerControllerSwift
// typealias PlayMusicItGribButtonActionCallback = () -> Void
class PlayMusicItGribView: XibView {
// MARK: - IBOutlets
@IBOutlet private weak var firstImageView: UIImageView?
@IBOutlet private weak var secondImageView: UIImageView?
// @IBOutlet weak var button: DesignButton!
required public override init() {
super.init()
super.frame = Self.rrect()
}
class func rrect() -> CGRect {
CGRect(x: 0, y: 0, width: ScreenSize.width, height: 87)
}
func grib(visible: Bool, open: Bool) {
firstImageView?.isHidden = !open
firstImageView?.alpha = visible ? 1 : 0
secondImageView?.isHidden = open
secondImageView?.alpha = visible ? 1 : 0
}
required public init(frame: CGRect) {
super.init()
super.frame = frame
}
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
override func loadedFromNib() {
}
// @IBAction func buttonClickAction(_ sender: DesignButton) {
// }
}
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PlayMusicItGribView" customModule="ContainerController" customModuleProvider="target">
<connections>
<outlet property="firstImageView" destination="chO-UL-0Df" id="Ez6-hY-v6r"/>
<outlet property="secondImageView" destination="GmN-Yk-74F" id="HkK-2M-02B"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MS7-OL-EmF" userLabel=" PlayMusicItGrib">
<rect key="frame" x="0.0" y="0.0" width="375" height="15"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iconPlayMusicContainerGripOn" translatesAutoresizingMaskIntoConstraints="NO" id="chO-UL-0Df" userLabel="iconPlayMusicContainerGripOn">
<rect key="frame" x="166" y="-15" width="43" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="QyA-cm-BmH"/>
<constraint firstAttribute="width" constant="43" id="vWc-E1-80y"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" alpha="0.0" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iconPlayMusicContainerGripOff" translatesAutoresizingMaskIntoConstraints="NO" id="GmN-Yk-74F" userLabel="iconPlayMusicContainerGripOff">
<rect key="frame" x="166" y="-15" width="43" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="43" id="YvB-fU-cpY"/>
<constraint firstAttribute="height" constant="30" id="jdE-e7-qM6"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="0.12549019610000001" green="0.12941176469999999" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="chO-UL-0Df" secondAttribute="bottom" id="7OJ-Lm-7WG"/>
<constraint firstItem="chO-UL-0Df" firstAttribute="centerX" secondItem="MS7-OL-EmF" secondAttribute="centerX" id="jhz-pf-1q1"/>
<constraint firstItem="GmN-Yk-74F" firstAttribute="centerX" secondItem="MS7-OL-EmF" secondAttribute="centerX" id="lOb-Ow-bls"/>
<constraint firstAttribute="bottom" secondItem="GmN-Yk-74F" secondAttribute="bottom" id="ybV-dZ-zkY"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="-394.39999999999998" y="-91.754122938530742"/>
</view>
</objects>
<resources>
<image name="iconPlayMusicContainerGripOff" width="129" height="90"/>
<image name="iconPlayMusicContainerGripOn" width="129" height="90"/>
</resources>
</document>
@@ -1,40 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--PlayMusicViewController-->
<!--Play Music View Controller-->
<scene sceneID="iwE-Yf-ugv">
<objects>
<viewController storyboardIdentifier="PlayMusicViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="5fM-9x-XQe" customClass="PlayMusicViewController" customModule="FigmaConvertXib" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="UBf-41-FeJ">
<viewController storyboardIdentifier="PlayMusicViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="5fM-9x-XQe" customClass="PlayMusicViewController" customModule="ContainerController" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="UBf-41-FeJ">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="qyv-r8-IHm" customClass="TableAdapterView" customModule="FigmaConvertXib" customModuleProvider="target">
<tableView clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="qyv-r8-IHm" customClass="TableAdapterView" customModule="ContainerControllerSwift">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<color key="backgroundColor" red="0.93725490196078431" green="0.94901960784313721" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
</tableView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="qyv-r8-IHm" secondAttribute="trailing" id="zh9-Hu-8hl"/>
<constraint firstItem="qyv-r8-IHm" firstAttribute="leading" secondItem="UBf-41-FeJ" secondAttribute="leading" id="tcc-c9-7hp"/>
<constraint firstAttribute="bottom" secondItem="qyv-r8-IHm" secondAttribute="bottom" id="A9r-du-1R4"/>
<constraint firstItem="qyv-r8-IHm" firstAttribute="top" secondItem="UBf-41-FeJ" secondAttribute="top" id="pmT-7W-vFz"/>
<constraint firstItem="qyv-r8-IHm" firstAttribute="top" secondItem="UBf-41-FeJ" secondAttribute="top" id="QnD-ib-zeh"/>
<constraint firstAttribute="trailing" secondItem="qyv-r8-IHm" secondAttribute="trailing" id="SCA-wC-q5x"/>
<constraint firstItem="qyv-r8-IHm" firstAttribute="leading" secondItem="UBf-41-FeJ" secondAttribute="leading" id="hLs-pB-BBI"/>
<constraint firstAttribute="bottom" secondItem="qyv-r8-IHm" secondAttribute="bottom" id="xih-DB-tMd"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6qi-GV-N23"/>
</view>
<connections>
<outlet property="tableView" destination="qyv-r8-IHm" id="5RW-sq-YuK"/>
<outlet property="tableView" destination="qyv-r8-IHm" id="0fB-Ib-RJg"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="0Mu-2s-QOT" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-100" y="-69.715142428785612"/>
</scene>
</scenes>
</document>
</document>
@@ -0,0 +1,618 @@
import UIKit
import ContainerControllerSwift
import AVFAudio
class PlayMusicViewController: StoryboardController {
@IBOutlet weak var tableView: TableAdapterView!
var containers: [ContainerController] = []
var musicItems: [ViewCallsPlayerType] = [
.disclosure_you_me,
.flume_greatest_view,
.disclosure_ware_running,
.camelphat_dropit,
.the_audio_bar,
.funky_house_classic,
.big_miz_aador,
.claptone_music_got_me,
.myselor_neurolife,
.benno_blome_botha,
]
private var timer: Timer?
private let timerUpdateInterval = 0.25
var containerTableView: TableAdapterView?
var container: ContainerController?
var container2HeaderView: PlayMusicItGribView?
var container2TableView: TableAdapterView?
var container2: ContainerController?
var box: Bool = false
var count: Int = 0
var hideFooterView: PlaylistFooterPlayView?
/// Description
///
///
///
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
// Remove the subviews ContainerController
stopTimer()
ViewCallsPlayer.shared.stop()
}
override func viewDidLoad() {
super.viewDidLoad()
self.navBarHide = true
// let color1 = #colorLiteral(red: 0.1254901961, green: 0.1294117647, blue: 0.1568627451, alpha: 1)
// let color2 = #colorLiteral(red: 0.07450980392, green: 0.08235294118, blue: 0.1137254902, alpha: 1)
let color3 = #colorLiteral(red: 0.1176470588, green: 0.1215686275, blue: 0.137254902, alpha: 1)
title = "PlayMusic"
view.backgroundColor = color3
let img1 = #imageLiteral(resourceName: "imgPlaylistLandscape")
let imgg = #imageLiteral(resourceName: "iconSportCatalogStars")
let imgg2 = #imageLiteral(resourceName: "iconSportCatalog1")
let imgg11 = #imageLiteral(resourceName: "imgSportCatalogProduct1")
let imgg12 = #imageLiteral(resourceName: "imgSportCatalogProduct2")
let imgg13 = #imageLiteral(resourceName: "imgSportCatalogProduct3")
let imgg14 = #imageLiteral(resourceName: "imgSportCatalogProduct4")
var itemsFilter: [CollectionAdapterItem] = []
itemsFilter.append( SportTagFilterItem(state: .init()))
itemsFilter.append( SportTagSizeColorItem(state: .init(index: 1, selectted: true, icon: imgg , handlers: .init(onClickAt: { n in
// self.updateTagCellIndex(n, section: 2)
}))))
itemsFilter.append( SportTagSizeColorItem(state: .init(index: 2, selectted: true, icon: imgg2 , handlers: .init(onClickAt: { n in
// self.updateTagCellIndex(n, section: 2)
}))))
itemsFilter.append( SportTagSizeColorItem(state: .init(index: 3, selectted: false, icon: imgg2 , handlers: .init(onClickAt: { n in
// self.updateTagCellIndex(n, section: 2)
}))))
itemsFilter.append( SportTagSizeColorItem(state: .init(index: 4, selectted: false, icon: imgg , handlers: .init(onClickAt: { n in
// self.updateTagCellIndex(n, section: 2)
}))))
var itemsProducts: [CollectionAdapterItem] = []
itemsProducts.append( SportCatalogOneItem(state: .init(secondImage: imgg11, text2: "Adidas\nHuman Race", text3: "$280", handlers: .init(onClickAt: { //[weak self] in
}))))
itemsProducts.append( SportCatalogOneItem(state: .init(secondImage: imgg12, text2: "Nike\nJoyraide", text3: "$320", handlers: .init(onClickAt: { //[weak self] in
}))))
itemsProducts.append( SportCatalogOneItem(state: .init(secondImage: imgg13, text2: "Nike\nZoom Pegasus", text3: "$250", handlers: .init(onClickAt: { //[weak self] in
}))))
itemsProducts.append( SportCatalogOneItem(state: .init(fav: true, secondImage: imgg14, text2: "Adidas\nStreet Ball", text3: "$160", handlers: .init(onClickAt: { //[weak self] in
}))))
itemsProducts.append( SportCatalogOneItem(state: .init(secondImage: imgg11, text2: "Adidas\nHuman Race", text3: "$280", handlers: .init(onClickAt: {// [weak self] in
}))))
var tagC: [CollectionAdapterItem] = []
tagC.append(MyCardsAddCardItem(state: .init()))
tagC.append(MyCardsOneCardItem(state: .init(visa: false)))
tagC.append(MyCardsOneCardItem(state: .init(visa: true)))
var tagR: [CollectionAdapterItem] = []
tagR.append(MyCardsAddonsItem(state: .init()))
tagR.append(MyCardsAddonsItem(state: .init()))
tagR.append(MyCardsAddonsItem(state: .init()))
tagR.append(MyCardsAddonsItem(state: .init()))
let insets = CollectionAdapterInsets(minSpacing: CollectionAdapterMinSpacing(cell: 16, line: 16), insets: .init(top: 16, left: 21, bottom: 16, right: 21))
let insets2 = CollectionAdapterInsets(minSpacing: CollectionAdapterMinSpacing(cell: 16, line: 16), insets: .init(top: 16, left: 28, bottom: 16, right: 28))
var items: [TableAdapterItem] = []
items.append( PlaylistTitleItem(state: .init(titleText: "New Releases", subtitleText: "More") ) )
items.append( PlaylistCollectionsItem(state: .init(firstImage: img1, secondImage: img1)))
items.append( PlaylistTitleItem(state: .init(titleText: "Likes Views", subtitleText: "More") ) )
// items.append(MyCardsTitileItem(state: .init()))
items.append(MyCardsCollectionItem(state: .init(items: tagC, insets: insets)))
items.append(MyCardsCollAddonsItem(state: .init(items: tagR, insets: insets2)))
items.append( PlaylistTitleItem(state: .init(titleText: "Recommendations", subtitleText: "More") ) )
// items.append( SportCatalogTitileItem(state: .init() ) )
items.append( SportCatalogFilterItem(state: .init(items: itemsFilter, insets: .init(minSpacing: .init(cell: 16, line: 16), insets: .init(top: 16, left: 32, bottom: 10, right: 32))) ) )
items.append( SportCatalogAllItem(state: .init(items: itemsProducts, insets: .init(minSpacing: .init(cell: 0, line: 16), insets: .init(top: 11, left: 32, bottom: 11, right: 32))) ) )
tableView.set(items: items, animated: true)
main(delay: 0.25) {
self.music(next: true)
self.music(play: true, updatePlay: true, next: true)
// main(delay: 0.25) {
// self.music(play: true, updatePlay: false)
// }
// main(delay: 0.5) {
// self.music(play: true, updatePlay: true)
// }
}
// main(delay: 2.5) {
// self.music(play: false, updatePlay: false)
// }
// self.music(play: true, next: true)
// let titleView = PlaylistTitleCell()
// titleView.frame = CGRect(x: 0, y: 0, width: ScreenSize.width, height: 148)
// view.addSubview(titleView)
//
//
// let titleView2 = PlaylistCollectionsCell()
// titleView2.frame = CGRect(x: 0, y: 0, width: ScreenSize.width, height: 162)
// view.addSubview(titleView2)
var items2: [TableAdapterItem] = []
items2.append( PlayMusicItItem(state: .init(handlers: .init(
onPlayAt: { play in
self.music(play: play)
}, onFastForwardAt: { type in
self.music(next: type == .right)
self.music(play: true, next: true)
}, onMoreAt: {
self.container?.move(type: .top)
}, onClickAt: {
self.container2?.move(type: .top)
self.container?.move(type: .hide)
}, onTimeAt: { time in
// self.stopTimer()
// self.music(play: false)
// self.music(play: true, interval: time)
}))) )
let header2 = PlayMusicItGribView()
self.container2HeaderView = header2
let gradient = PlayMusicItGradientView()
let ccc2 = addContainer(position: .init(top: 0, bottom: 118), radius: 0, items: items2, delegate: self, addBackShadow: true, header: header2, back: gradient)
self.container2TableView = ccc2.1
// self.container2TableView?.clipsToBounds = false
// self.container2?.set(movingEnabled: false)
self.container2 = ccc2.0
self.container2?.view.backgroundColor = .clear
// ccc2.0.view.contentView?.insertSubview(ccc2.0.backView, at: 0)
self.container2?.move(type: .hide)
main(delay: 0.15) {
self.container2?.move(type: .hide )
}
self.container2?.move(type: .hide)
main(delay: 0.5) {
self.container2?.move(type: .bottom )
}
containers.append(ccc2.0)
addContainerr(position: .init(top: 148, middle: 350/*, bottom: 100*/))
self.container?.move(type: .hide)
self.container?.move(type: .bottom )
main(delay: 0.05) {
self.container?.move(type: .bottom )
}
// let fr2 = CGRect(x: 0, y: ScreenSize.height - 98, width: ScreenSize.width, height: 98)
// let footer = PlaylistFooterPlayView()
// footer.frame = fr2
// view.addSubview(footer)
// hideFooterView = footer
// hideFooterView?.clickCallback = {
//
// if (self.containers.count != 0) {
//
// self.container2?.move(type: .top)
//
// }
// }
// self.hideFooterView?.alpha = 0
}
func music(next: Bool) {
if self.count == 0 {
ViewCallsPlayer.shared.stop()
ViewCallsPlayer.shared.play( .none )
ViewCallsPlayer.shared.pause()
}
if next {
self.count = self.count + 1
if self.count > musicItems.count {
self.count = 1
}
} else if !next {
self.count = self.count - 1
if self.count < 1 {
self.count = musicItems.count
}
}
ViewCallsPlayer.shared.stop()
// let typee = ViewCallsPlayerType(rawValue: self.count) ?? .disclosure_you_me
// if typee == .none {
// ViewCallsPlayer.shared.stop()
// } else {
// ViewCallsPlayer.shared.play( typee )
// }
}
func music(play: Bool, updatePlay: Bool? = nil, next: Bool = false, interval: CGFloat? = nil) {
if play {
let typee = ViewCallsPlayerType(rawValue: self.count) ?? .none
if next { ViewCallsPlayer.shared.play( typee ) }
else if let _ = interval {
// ViewCallsPlayer.shared.play(interval: interval)
// ViewCallsPlayer.shared.play()
// ViewCallsPlayer.shared.avPlayer?.currentTime = interval
}
else { ViewCallsPlayer.shared.play() }
if let u = updatePlay {
self.updatePlayerCell(play: u)
}
self.startTimer()
} else {
if let u = updatePlay {
self.updatePlayerCell(play: u)
}
ViewCallsPlayer.shared.pause()
self.stopTimer()
}
}
private func startTimer() {
if timer == nil {
timer = Timer.scheduledTimer(withTimeInterval: timerUpdateInterval,
repeats: true) { [weak self] _ in
guard let strongSelf = self else { return }
main {
strongSelf.updatePlayerCell()
}
}
}
}
private func updatePlayerCell(play: Bool? = nil) {
let typee = ViewCallsPlayerType(rawValue: self.count) ?? .none
let t1 = (ViewCallsPlayer.shared.avPlayer?.duration ?? 0)
let t2 = (ViewCallsPlayer.shared.avPlayer?.currentTime ?? 0)
// let v3 = (ViewCallsPlayer.shared.avPlayer?.volume ?? 0)
if t1 == t2 {
self.music(next: true)
self.music(play: true, next: true)
return
}
let vol = AVAudioSession.sharedInstance().outputVolume
let time = String(format: "%02d:%02d", ((Int)((t2))) / 60, ((Int)((t2))) % 60 )
// let remainingTime: CGFloat = (ViewCallsPlayer.shared.avPlayer?.duration ?? 0) - (ViewCallsPlayer.shared.avPlayer?.currentTime ?? 0)
if let cell = self.container2TableView?.cellForRow(at: .init(row: 0, section: 0)) as? PlayMusicItCell {
cell.box = self.box
cell.data?.state.type = typee
cell.data?.state.duration = t1
cell.data?.state.currentTime = t2
cell.data?.state.volume = vol
cell.data?.state.time = time
if let play = play {
cell.data?.state.play = play
}
cell.updateImage()
}
}
private func stopTimer() {
timer?.invalidate()
timer = nil
}
func addContainerr(position: ContainerPosition) {
let layoutC = ContainerLayout()
layoutC.positions = position //
layoutC.insets = .init(right: 0, left: 0)
let container = ContainerController(addTo: self, layout: layoutC)
container.view.cornerRadius = 22
container.view.addShadow()
container.view.tag = 12
container.delegate = self
// let shadowColor = UIColor.black.withAlphaComponent(0.1).cgColor
container.view.layer.shadowOpacity = Float(0.20)
container.view.layer.shadowOffset = .init(width: 0, height: 13)
container.view.layer.shadowRadius = 30.0
container.view.layer.shadowColor = UIColor.black.cgColor
let fr = CGRect(x: 0, y: 0, width: ScreenSize.width, height: 77)
let header = PlaylistHeaderView()
header.frame = fr
container.add(headerView: header)
// footer.frame = fr2
// let fr2 = CGRect(x: 0, y: 0, width: ScreenSize.width, height: 98)
// let footer = PlaylistFooterPlayView()
// footer.frame = fr2
//
// footer.clickCallback = {
//
// if (self.containers.count != 0) {
//
// self.container2?.move(type: .top)
//
// }
// }
//
// container.add(footerView: footer)
// var imgHeader = UIImage(named: "imgWalletsHeader2")?.withTintColor(color, renderingMode: .alwaysTemplate)
let color1 = #colorLiteral(red: 0.07450980392, green: 0.08235294118, blue: 0.1137254902, alpha: 1)
// var header = UIImageView(frame: CGRect(x: 0, y: 0, width: ScreenSize.width - 23 - 23 , height: 680)) //
// header.image = imgHeader
// header.tintColor = color
//
// // container.view.addSubview(header) //
// container.view.insertSubview(header, at: 0)
container.view.backgroundColor = color1
// container.view.mask = header
// container.add(headerView: header)
// container.view.backgroundColor = color
let table = TableAdapterView(frame: CGRect(x: 0, y: 0, width: ContainerDevice.width, height: 0), style: .plain)
table.indicatorStyle = .default
// container.add(scrollView: addCollectionView())
self.containerTableView = table
self.container = container
// let img1 = #imageLiteral(resourceName: "imgPlaylistMain")
// let img2 = #imageLiteral(resourceName: "imgPlaylistFlume")
var items: [TableAdapterItem] = []
self.musicItems.forEach { type in
items.append( PlaylistOneItem(state: .init(type: type, handlers: .init(onClickAt: { selType in
// self.music(next: type == .right)
self.count = selType.rawValue
ViewCallsPlayer.shared.stop()
self.music(play: true, next: true)
}))) )
}
table.set(items: items)
// [
// PlaylistOneItem(state: .init(firstImage: ViewCallsPlayer.getImage( playerType), subtitleText: "Flume", text2: "What you need", text3: "4:10")),
// PlaylistOneItem(state: .init(firstImage: img2, subtitleText: "Martin Ikin", text2: "Headnoise", text3: "4:10")),
//
// PlaylistOneItem(state: .init(firstImage: img1, subtitleText: "ZHU", text2: "Generationwhy", text3: "59:14")),
//
// PlaylistOneItem(state: .init(firstImage: img2, subtitleText: "Flume", text2: "What you need", text3: "4:10")),
// PlaylistOneItem(state: .init(firstImage: img2, subtitleText: "Martin Ikin", text2: "Headnoise", text3: "4:10")),
// PlaylistOneItem(state: .init(firstImage: img2, subtitleText: "Flume", text2: "What you need", text3: "4:10")),
//
// PlaylistOneItem(state: .init(firstImage: img1, subtitleText: "Flume", text2: "What you need", text3: "4:10")),
// PlaylistOneItem(state: .init(firstImage: img1, subtitleText: "Martin Ikin", text2: "Headnoise", text3: "4:10")),
// PlaylistOneItem(state: .init(firstImage: img2, subtitleText: "Flume", text2: "What you need", text3: "4:10"))
// ]
container.add(scrollView: table)
// container.move(type: .bottom)
// main(delay: 1.05) {
// container.move(type: .middle
// )
// }
containers.append(container)
// self.view.addSubview(self.footerImg)
}
override func containerControllerMove(_ containerController: ContainerController, position: CGFloat, type: ContainerMoveType, animation: Bool) {
if animation {
if containerController == self.container2 {
self.headerUpdate(open: type == .bottom, height: 0, grib: type == .top)
// UIView.animate(withDuration: 2) {
// self.headerUpdate(open: type == .bottom )
self.box = type == .bottom
if let cell = self.container2TableView?.cellForRow(at: .init(row: 0, section: 0)) as? PlayMusicItCell {
cell.box = self.box
cell.updateImage()
}
// self.container2?.set(movingEnabled: ((type == .top) && self.box))
// }
main(delay: 0.05) {
if type == .bottom {
self.container?.move(type: .hide)
}
}
}
else if containerController == self.container {
if type == .top || type == .middle {
self.headerUpdate(open: type == .top, height: 54.0, grib: self.container2?.moveType == .top)
self.box = type == .top
// main(delay: 0.05) {
if let cell = self.container2TableView?.cellForRow(at: .init(row: 0, section: 0)) as? PlayMusicItCell {
cell.box = self.box
cell.updateImage()
}
self.container2?.set(movingEnabled: !((type == .top) && self.box))
// if type == .middle {
// self.container2?.move(type: .bottom)
//
// }
// }
} else if type == .bottom {
self.box = (self.container2?.moveType == .bottom) || ((self.container2?.moveType == .top) && (type == .top))
if let cell = self.container2TableView?.cellForRow(at: .init(row: 0, section: 0)) as? PlayMusicItCell {
cell.box = self.box
cell.updateImage()
}
self.container2?.set(movingEnabled: !self.box)
}
//
}
}
}
func headerUpdate(open: Bool, height: CGFloat = 54.0, grib: Bool) {
// main {
let heightt = open ? height : PlayMusicItGribView.rrect().height
if self.container2HeaderView?.height != heightt {
self.container2HeaderView?.height = heightt
self.container2?.headerView?.height = heightt
UIView.animate(withDuration: 0.15) {
self.container2?.calculationViews()
}
}
// if grib {
UIView.animate(withDuration: 0.75) {
self.container2HeaderView?.grib(visible: !open, open: grib)
}
// }
// if open {
//// self.container2?.headerView?.height = 15
//
//// if let headerView = self.container2HeaderView, self.container2?.headerView == nil {
//// headerView.height = 15
//// self.container2?.add(headerView: headerView)
////
//// }
//
// self.container2?.removeHeaderView()
// // self.container2?.view.alpha = 0
// // self.container?.move(type: .top)
// } else {
//
//
//
// if let headerView = self.container2HeaderView, self.container2?.headerView == nil {
// self.container2?.add(headerView: headerView)
//
// }
//
// if self.container2?.headerView != nil {
// self.container2?.headerView?.height = PlayMusicItGribView.rrect().height
// }
//
//
// // self.container2?.view.alpha = 1
// }
// }
}
}
@@ -0,0 +1,69 @@
//
// TimerUtils.swift
// irbis
//
// Created by lan on 08.10.2021.
// Copyright © 2021 &#1048;&#1058;&#1057;&#1086;&#1092;&#1090;. All rights reserved.
//
import Foundation
class TimerControl {
var running: Bool { timer != nil }
private var timer: Timer?
private var ti: TimeInterval
private var repeats: Bool
private var target: Any?
private var selector: Selector?
private(set) var startTime: Date?
init(_ ti: TimeInterval, repeats: Bool = true) {
self.ti = ti
self.repeats = repeats
}
init(_ ti: TimeInterval, repeats: Bool = true, target: Any, selector: Selector) {
self.ti = ti
self.repeats = repeats
self.target = target
self.selector = selector
}
func start(_ block: @escaping (Timer) -> Void) {
stop()
startTime = Date()
timer = Timer.scheduledTimer(withTimeInterval: ti, repeats: repeats, block: block)
}
func start(target : Any, selector : Selector) {
stop()
startTime = Date()
timer = Timer.scheduledTimer(timeInterval: ti, target: target, selector: selector, userInfo: nil, repeats: repeats)
}
func start() {
guard let target = target, let selector = selector else { return }
start(target: target, selector: selector)
}
func stop() {
guard let _ = timer else { return }
startTime = nil
timer?.invalidate()
timer = nil
}
}
extension TimerControl {
static func start(ti: TimeInterval, repeats: Bool, block: @escaping (Timer) -> Void) -> TimerControl {
let timerControl = TimerControl(ti, repeats: repeats)
timerControl.start(block)
return timerControl
}
static func start(ti: TimeInterval, repeats: Bool, target : Any, selector : Selector) -> TimerControl {
let timerControl = TimerControl(ti, repeats: repeats)
timerControl.start(target: target, selector: selector)
return timerControl
}
}
@@ -0,0 +1,244 @@
//
// ViewCallsPlayer.swift
// irbis
//
// Created by Aleksandr Lobyncev on 14.03.2022.
// Copyright © 2022 &#1048;&#1058;&#1057;&#1086;&#1092;&#1090;. All rights reserved.
//
import Foundation
import AVFoundation
import Speech
//тип проигрываемой мелодии
@objc enum ViewCallsPlayerType: Int {
//отсутствует
case none
case the_audio_bar
case funky_house_classic
case big_miz_aador
case disclosure_you_me
case disclosure_ware_running
case camelphat_dropit
case claptone_music_got_me
case flume_greatest_view
case myselor_neurolife
case benno_blome_botha
}
@objcMembers
class ViewCallsPlayer: NSObject {
static let shared = ViewCallsPlayer()
static private let disclosure_you_me = "Disclosure_You_Me.mp3"
static private let disclosure_ware_running = "Disclosure_Ware_Running.mp3"
static private let flume_greatest_view = "Flume_Greatest_View.mp3"
static private let flume_sleepless = "Flume_Sleepless.mp3"
static private let camelphat_dropit = "CamelPhat_DropIt.mp3"
static private let the_audio_bar = "the_audio_bar.mp3"
static private let funky_house_classic = "funky_house_classic.mp3"
static private let big_miz_aador = "big_miz_aador.mp3"
static private let claptone_music_got_me = "claptone_music_got_me.mp3"
static private let myselor_neurolife = "myselor_neurolife.mp3"
static private let benno_blome_botha = "benno_blome_botha.mp3"
// static private let callingFileName = "call_ring_ringing.wav"
// static private let busyFileName = "call_ring_busy.wav"
// static private let holdFileName = "call_hold.wav"
// static private let flume_sleepless = "call_ring_second_alert.wav"
// static private let errorAlertFileName = "call_ring_error_alert.wav"
//тип мелодии
private(set) var playerType: ViewCallsPlayerType = .none
var avPlayer: AVAudioPlayer?
func play(interval: TimeInterval? = nil) {
guard let avPlayer = avPlayer else { return }
print("viewCallsPlayer pause")
if let interval = interval {
avPlayer.play(atTime: interval)
} else { avPlayer.play() }
}
//проиграть
func play(_ newPlayerType: ViewCallsPlayerType) {
guard playerType != newPlayerType else { return }
playerType = newPlayerType
if playerType == .none {
stop()
} else {
prepareAndPlay()
}
}
//остановить
func stop() {
guard let avPlayer = avPlayer else { return }
print("viewCallsPlayer stop")
avPlayer.stop()
self.avPlayer = nil
}
func pause() {
guard let avPlayer = avPlayer else { return }
print("viewCallsPlayer pause")
avPlayer.pause()
}
//проиграть второй входящий
func playSecondIncoming() {
let url = URL(fileURLWithResource: ViewCallsPlayer.flume_sleepless)
guard let player = try? AVAudioPlayer(contentsOf: url) else { return }
player.numberOfLoops = 0
player.volume = 1
player.prepareToPlay()
player.play()
}
class func getSubtitle(_ playerType: ViewCallsPlayerType) -> String {
switch playerType {
case .disclosure_you_me:
return "You Me"
case .flume_greatest_view:
return "Greatest View"
case .disclosure_ware_running:
return "Ware Running"
case .camelphat_dropit:
return "Drop It"
case .the_audio_bar: return "Harlequins"
case .funky_house_classic: return "ID Mix"
case .big_miz_aador: return "Renegade"
case .claptone_music_got_me: return "The Music Got Me (Darius Syrossian Remix)"
case .myselor_neurolife: return "Neurolife"
case .benno_blome_botha: return "Abotha"
default:
return ""
}
}
class func getTitle(_ playerType: ViewCallsPlayerType) -> String {
switch playerType {
case .disclosure_you_me:
return "Disclosure"
case .flume_greatest_view:
return "Flume"
case .disclosure_ware_running:
return "Disclosure"
case .camelphat_dropit:
return "CamelPhat"
case .the_audio_bar: return "The Audio Bar"
case .funky_house_classic: return "Funky House Classic vinyl"
case .big_miz_aador: return "Big Miz, A.D.O.R."
case .claptone_music_got_me: return "Claptone"
case .myselor_neurolife: return "Myselor"
case .benno_blome_botha: return "Benno Blome"
default:
return ""
}
}
class func getImage(_ playerType: ViewCallsPlayerType) -> UIImage? {
let img1 = #imageLiteral(resourceName: "img_Disclosure_You_Me")
let img2 = #imageLiteral(resourceName: "img_Flume_Greatest_View")
let img3 = #imageLiteral(resourceName: "img_Disclosure_Ware_Running")
let img4 = #imageLiteral(resourceName: "img_CamelPhat_DropIt")
let img5 = #imageLiteral(resourceName: "img_the_audio_bar")
let img6 = #imageLiteral(resourceName: "img_funky_house_classic")
let img7 = #imageLiteral(resourceName: "img_big_miz_aador")
let img8 = #imageLiteral(resourceName: "img_claptone_music_got_me")
let img9 = #imageLiteral(resourceName: "img_myselor_neurolife")
let img10 = #imageLiteral(resourceName: "img_benno_blome_botha")
switch playerType {
case .disclosure_you_me:
return img1
case .flume_greatest_view:
return img2
case .disclosure_ware_running:
return img3
case .camelphat_dropit:
return img4
case .the_audio_bar: return img5
case .funky_house_classic: return img6
case .big_miz_aador: return img7
case .claptone_music_got_me: return img8
case .myselor_neurolife: return img9
case .benno_blome_botha: return img10
default:
return nil
}
}
private func prepareAndPlay() {
stop()
let url: URL
switch playerType {
case .disclosure_you_me:
print("viewCallsPlayer disclosure_you_me")
url = URL(fileURLWithResource: ViewCallsPlayer.disclosure_you_me)
case .flume_greatest_view:
print("viewCallsPlayer flume_greatest_view")
url = URL(fileURLWithResource: ViewCallsPlayer.flume_greatest_view)
case .disclosure_ware_running:
print("viewCallsPlayer disclosure_ware_running")
url = URL(fileURLWithResource: ViewCallsPlayer.disclosure_ware_running)
case .camelphat_dropit:
print("viewCallsPlayer camelphat_dropit")
url = URL(fileURLWithResource: ViewCallsPlayer.camelphat_dropit)
case .the_audio_bar:
print("viewCallsPlayer the_audio_bar")
url = URL(fileURLWithResource: ViewCallsPlayer.the_audio_bar)
case .funky_house_classic:
print("viewCallsPlayer funky_house_classic")
url = URL(fileURLWithResource: ViewCallsPlayer.funky_house_classic)
case .big_miz_aador:
print("viewCallsPlayer big_miz_aador")
url = URL(fileURLWithResource: ViewCallsPlayer.big_miz_aador)
case .claptone_music_got_me:
print("viewCallsPlayer claptone_music_got_me")
url = URL(fileURLWithResource: ViewCallsPlayer.claptone_music_got_me)
case .myselor_neurolife:
print("viewCallsPlayer myselor_neurolife")
url = URL(fileURLWithResource: ViewCallsPlayer.myselor_neurolife)
case .benno_blome_botha:
print("viewCallsPlayer benno_blome_botha")
url = URL(fileURLWithResource: ViewCallsPlayer.benno_blome_botha)
default:
return
}
guard let player = try? AVAudioPlayer(contentsOf: url) else { return }
avPlayer = player
player.numberOfLoops = -1
player.volume = 1
player.prepareToPlay()
player.play()
}
}
extension URL {
init(fileURLWithResource resource: String) {
self.init(fileURLWithPath: "\(Bundle.main.resourcePath ?? "")/\(resource)")
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

@@ -5,6 +5,7 @@ import ContainerControllerSwift
extension PlaylistOneItem {
struct State {
var type: ViewCallsPlayerType = .none
var firstImage: UIImage?
var subtitleText: String?
var text2: String?
@@ -12,7 +13,8 @@ extension PlaylistOneItem {
var handlers: Handlers = .init()
}
struct Handlers {
var onClickAt: (()->(Void))?
var onClickAt: ((_ selType: ViewCallsPlayerType)->(Void))?
}
}
@@ -67,25 +69,59 @@ class PlaylistOneCell: TableAdapterCell {
@IBOutlet private weak var label3: UILabel?
@IBOutlet override var selectedView: UIView? { didSet { } }
@IBOutlet var cardView: UIView?
@IBOutlet var ccardView: UIView?
@IBOutlet var button: UIButton?
override func awakeFromNib() {
separator(hide: true)
button?.tapHideAnimation(
view: cardView,
type: .alpha(0.5),
callback: { [weak self] type in
if type == .touchUpInside {
self?.data?.state.handlers.onClickAt?()
}
}
)
button?.tapClassic({ [weak self] down in
UIView.animate(withDuration: down ? 0.0 : 0.35) {
self?.ccardView?.alpha = down ? 0.2 : 0.0
}
if !down {
if let playerType = self?.data?.state.type {
self?.data?.state.handlers.onClickAt?(playerType)
}
}
})
// button?.tapHideAnimation(
// view: cardView,
// type: .alpha(0.5),
// callback: { [weak self] type in
// if type == .touchUpInside {
// self?.data?.state.handlers.onClickAt?()
// }
// }
// )
}
override func fill(data: TableAdapterCellData?) {
guard let data = data as? PlaylistOneCellData else { return }
self.data = data
if let playerType = self.data?.state.type {
let firstImage = ViewCallsPlayer.getImage( playerType)
let subtitleText = ViewCallsPlayer.getTitle( playerType)
let text2 = ViewCallsPlayer.getSubtitle( playerType)
let text3 = "4:10"
self.data?.state.firstImage = firstImage
self.data?.state.subtitleText = subtitleText
self.data?.state.text2 = text2
self.data?.state.text3 = text3
firstImageView?.image = firstImage
subtitleLabel?.text = subtitleText
label2?.text = text2
label3?.text = text3
}
firstImageView?.image = data.state.firstImage
subtitleLabel?.text = data.state.subtitleText
label2?.text = data.state.text2
@@ -52,14 +52,16 @@
<fontDescription key="fontDescription" type="boldSystem" pointSize="11"/>
<color key="textColor" red="0.5058823823928833" green="0.50980395078659058" blue="0.54117649793624878" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="4:10" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SGp-y5-hcF" userLabel="4:10">
<rect key="frame" x="268" y="23" width="35" height="27"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="4:10" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SGp-y5-hcF" userLabel="4:10">
<rect key="frame" x="278" y="18.5" width="25" height="27"/>
<constraints>
<constraint firstAttribute="height" constant="27" id="ZUN-H6-WEO"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="11"/>
<color key="textColor" red="0.5058823823928833" green="0.50980395078659058" blue="0.54117649793624878" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</label>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5rF-eA-GVk" userLabel="Frame 89512">
<rect key="frame" x="317" y="16" width="29" height="30"/>
<rect key="frame" x="317" y="18" width="29" height="30"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" alpha="0.5" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iconPlaylistMore" translatesAutoresizingMaskIntoConstraints="NO" id="dZ0-Sj-4nm">
<rect key="frame" x="0.0" y="0.0" width="29" height="30"/>
@@ -74,17 +76,31 @@
<constraint firstAttribute="height" constant="30" id="wZE-a8-FLj"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7ZZ-NP-3X2">
<view alpha="0.0" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u2E-Di-Nkd" userLabel=" PlaylistOne">
<rect key="frame" x="0.0" y="0.0" width="373" height="64"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7ZZ-NP-3X2">
<rect key="frame" x="0.0" y="0.0" width="373" height="64"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="SGp-y5-hcF" firstAttribute="centerY" secondItem="5w9-4X-Ppe" secondAttribute="centerY" id="27B-9z-Jn4"/>
<constraint firstItem="7ZZ-NP-3X2" firstAttribute="top" secondItem="5w9-4X-Ppe" secondAttribute="top" id="CvJ-IP-NMI"/>
<constraint firstItem="7ZZ-NP-3X2" firstAttribute="leading" secondItem="5w9-4X-Ppe" secondAttribute="leading" id="DWP-eL-saq"/>
<constraint firstItem="n3f-vv-0Pt" firstAttribute="leading" secondItem="5w9-4X-Ppe" secondAttribute="leading" constant="28" id="GqR-Xj-dfG"/>
<constraint firstItem="5rF-eA-GVk" firstAttribute="centerY" secondItem="5w9-4X-Ppe" secondAttribute="centerY" constant="1" id="JcS-cn-sXs"/>
<constraint firstAttribute="trailing" secondItem="u2E-Di-Nkd" secondAttribute="trailing" id="KBv-lU-uAs"/>
<constraint firstItem="u2E-Di-Nkd" firstAttribute="top" secondItem="5w9-4X-Ppe" secondAttribute="top" id="Pb3-tk-DC0"/>
<constraint firstItem="n3f-vv-0Pt" firstAttribute="top" secondItem="5w9-4X-Ppe" secondAttribute="top" constant="5" id="R9R-bp-Gya"/>
<constraint firstItem="5rF-eA-GVk" firstAttribute="top" secondItem="5w9-4X-Ppe" secondAttribute="top" constant="16" id="UAs-FD-Pf3"/>
<constraint firstAttribute="bottom" secondItem="u2E-Di-Nkd" secondAttribute="bottom" id="UpY-xb-MzF"/>
<constraint firstItem="u2E-Di-Nkd" firstAttribute="leading" secondItem="5w9-4X-Ppe" secondAttribute="leading" id="phW-la-eQB"/>
<constraint firstItem="5rF-eA-GVk" firstAttribute="leading" secondItem="SGp-y5-hcF" secondAttribute="trailing" constant="14" id="qdX-oO-EpJ"/>
<constraint firstAttribute="trailing" secondItem="5rF-eA-GVk" secondAttribute="trailing" constant="27" id="tyX-bu-UHb"/>
<constraint firstItem="SGp-y5-hcF" firstAttribute="centerY" secondItem="5w9-4X-Ppe" secondAttribute="centerY" id="vtD-ck-Uci"/>
<constraint firstAttribute="bottom" secondItem="7ZZ-NP-3X2" secondAttribute="bottom" id="xK5-Lj-RdW"/>
<constraint firstAttribute="trailing" secondItem="7ZZ-NP-3X2" secondAttribute="trailing" id="yD7-3E-dIM"/>
</constraints>
</view>
</subviews>
@@ -98,11 +114,13 @@
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<outlet property="button" destination="7ZZ-NP-3X2" id="OGz-mW-LLN"/>
<outlet property="ccardView" destination="u2E-Di-Nkd" id="81e-Gs-J50"/>
<outlet property="firstImageView" destination="tPe-B9-pZV" id="ubZ-Nb-grU"/>
<outlet property="label2" destination="XLd-DB-Fl7" id="ogN-5J-dup"/>
<outlet property="label3" destination="SGp-y5-hcF" id="U9E-29-q3U"/>
<outlet property="subtitleLabel" destination="0eD-dL-Ugw" id="r4k-Md-cEY"/>
</connections>
<point key="canvasLocation" x="-100" y="-49"/>
<point key="canvasLocation" x="-100" y="-49.475262368815599"/>
</tableViewCell>
</objects>
<resources>
@@ -11,11 +11,11 @@
<scene sceneID="SDB-mK-l0T">
<objects>
<viewController storyboardIdentifier="PlaylistViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="azT-09-ln3" customClass="PlaylistViewController" customModule="ContainerController" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="kPA-uf-PXN">
<view key="view" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="kPA-uf-PXN">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="qSd-FA-5ZQ" customClass="TableAdapterView" customModule="ContainerControllerSwift">
<tableView clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="qSd-FA-5ZQ" customClass="TableAdapterView" customModule="ContainerControllerSwift">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<color key="backgroundColor" red="0.93725490196078431" green="0.94901960784313721" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
</tableView>

Some files were not shown because too many files have changed in this diff Show More