Skip to content

Commit d157ffe

Browse files
committed
add loader
1 parent 45c62f3 commit d157ffe

File tree

7 files changed

+25
-2
lines changed

7 files changed

+25
-2
lines changed

StudentTourism/Helpers/Loader.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class LoaderView: UIView {
9797
}()
9898

9999
private lazy var blurView: BlurView = {
100-
let view = BlurView(radius: 6, color: .fDarkGray, colorAlpha: 0.5)
100+
let view = BlurView(radius: 6, color: Asset.Colors.sBlack.color, colorAlpha: 0.5)
101101
view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
102102
view.frame = frame
103103
return view

StudentTourism/Screens/Main/Base.lproj/Main.storyboard

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,13 +312,24 @@
312312
<constraint firstItem="71O-c5-b4E" firstAttribute="centerY" secondItem="Psg-oC-Cvv" secondAttribute="centerY" id="bx4-vT-E51"/>
313313
</constraints>
314314
</view>
315+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="I5X-ai-Pe6">
316+
<rect key="frame" x="0.0" y="0.0" width="152" height="152"/>
317+
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
318+
<connections>
319+
<action selector="didTapTourWithButton:" destination="pzc-gm-IiC" eventType="touchUpInside" id="rB5-pD-Twc"/>
320+
</connections>
321+
</button>
315322
</subviews>
316323
<constraints>
324+
<constraint firstItem="I5X-ai-Pe6" firstAttribute="width" secondItem="PjR-TP-fhF" secondAttribute="width" id="5rG-ib-U0U"/>
317325
<constraint firstItem="PjR-TP-fhF" firstAttribute="top" secondItem="3y4-Wd-qa2" secondAttribute="top" id="6l7-c0-IxU"/>
326+
<constraint firstItem="I5X-ai-Pe6" firstAttribute="height" secondItem="PjR-TP-fhF" secondAttribute="height" id="BOE-AS-Isv"/>
327+
<constraint firstItem="I5X-ai-Pe6" firstAttribute="centerX" secondItem="PjR-TP-fhF" secondAttribute="centerX" id="HvW-Ox-VfW"/>
318328
<constraint firstAttribute="bottom" secondItem="Mlz-w6-N1c" secondAttribute="bottom" constant="8" id="VNb-jJ-Bfo"/>
319329
<constraint firstItem="PjR-TP-fhF" firstAttribute="leading" secondItem="3y4-Wd-qa2" secondAttribute="leading" id="guR-g3-Kr3"/>
320330
<constraint firstItem="Mlz-w6-N1c" firstAttribute="leading" secondItem="3y4-Wd-qa2" secondAttribute="leading" id="hQo-dr-gB0"/>
321331
<constraint firstItem="Mlz-w6-N1c" firstAttribute="top" secondItem="PjR-TP-fhF" secondAttribute="bottom" constant="8" id="nZ6-zq-vLZ"/>
332+
<constraint firstItem="I5X-ai-Pe6" firstAttribute="centerY" secondItem="PjR-TP-fhF" secondAttribute="centerY" id="vfD-of-n1t"/>
322333
<constraint firstAttribute="trailing" secondItem="PjR-TP-fhF" secondAttribute="trailing" id="wh8-r6-pjj"/>
323334
<constraint firstAttribute="trailing" secondItem="Mlz-w6-N1c" secondAttribute="trailing" id="xOD-ab-rjj"/>
324335
</constraints>

StudentTourism/Screens/Main/MainVC.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ private extension MainVC {
3232

3333
@IBAction func didTapTour(button: UIButton) {
3434
Haptic.selection()
35-
Router.showVC(type: TourViewVC.self)
35+
Router.showVC(type: TourViewVC.self) {
36+
$0.state[.image] = Asset.Assets.imgDacha.image
37+
}
3638
}
3739

3840
}

StudentTourism/Screens/TourView/TourView.storyboard

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,7 @@
10151015
<constraint firstItem="hli-oQ-qCx" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" id="oL5-mv-Smy"/>
10161016
</constraints>
10171017
<connections>
1018+
<outlet property="imageView" destination="N8B-gM-ekO" id="Sf4-5u-gh0"/>
10181019
<outlet property="roomCollection" destination="des-iN-5yM" id="jFH-ix-Gb8"/>
10191020
</connections>
10201021
</view>

StudentTourism/Screens/TourView/TourViewVC.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class TourViewVC: BaseVC {
2626
//MARK: - Actions -
2727
private extension TourViewVC {
2828
@IBAction func didTapPay(button: UIButton) {
29+
Loader.show(animation: .mastercard)
2930
Router.showVC(type: WebVC.self) {
3031
$0.state[s:.url] = "https://mustdev.ru/payment/index.html"
3132
}

StudentTourism/Screens/TourView/TourViewView.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@ import UIKit
1010
class TourViewView: BaseView {
1111

1212
@IBOutlet var roomCollection: RoomCollection!
13+
@IBOutlet var imageView: UIImageView!
1314

1415

1516
override func customizeUI() {
1617
roomCollection.items = [Item(reuseId: "BannerCell"),Item(reuseId: "BannerCell"),Item(reuseId: "BannerCell"),Item(reuseId: "BannerCell") ]
18+
}
1719

20+
override func render() {
21+
if let image = state[.image] as? UIImage {
22+
imageView.image = image
23+
}
1824
}
1925
}
2026

StudentTourism/Screens/Web/WebVC.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class WebVC: BaseVC {
1111

1212
override func viewDidLoad() {
1313
super.viewDidLoad()
14+
setAttributed(title: "Оплата".withAttr())
15+
DispatchQueue.main.asyncAfter(deadline: .now() + 2) { Loader.hide() }
1416
}
1517

1618
}

0 commit comments

Comments
 (0)