mirror of
https://github.com/fxm90/GradientLoadingBar.git
synced 2026-06-16 12:24:31 +00:00
🚸 :: Updated Example Application
This commit is contained in:
@@ -13,12 +13,12 @@ class AdvancedExampleViewController: UIViewController {
|
||||
// MARK: - Outlets
|
||||
|
||||
@IBOutlet var customSuperviewButton: BlueBorderedButton!
|
||||
@IBOutlet var customGradientColorsButton: BlueBorderedButton!
|
||||
@IBOutlet var customColorsButton: BlueBorderedButton!
|
||||
|
||||
// MARK: - Private properties
|
||||
|
||||
private var buttonGradientLoadingBar: GradientLoadingBar?
|
||||
private var customGradientColorsGradientLoadingBar: GradientLoadingBar?
|
||||
private var customColorsGradientLoadingBar: GradientLoadingBar?
|
||||
|
||||
// MARK: - Public methods
|
||||
|
||||
@@ -29,15 +29,15 @@ class AdvancedExampleViewController: UIViewController {
|
||||
onView: customSuperviewButton)
|
||||
|
||||
// Source: https://color.adobe.com/Pink-Flamingo-color-theme-10343714/
|
||||
customGradientColorsGradientLoadingBar = BottomGradientLoadingBar(height: 3.0,
|
||||
gradientColorList: [
|
||||
UIColor(hex: "#f2526e"),
|
||||
UIColor(hex: "#f17a97"),
|
||||
UIColor(hex: "#f3bcc8"),
|
||||
UIColor(hex: "#6dddf2"),
|
||||
UIColor(hex: "#c1f0f4")
|
||||
],
|
||||
onView: customGradientColorsButton)
|
||||
customColorsGradientLoadingBar = BottomGradientLoadingBar(height: 3.0,
|
||||
gradientColorList: [
|
||||
UIColor(hex: "#f2526e"),
|
||||
UIColor(hex: "#f17a97"),
|
||||
UIColor(hex: "#f3bcc8"),
|
||||
UIColor(hex: "#6dddf2"),
|
||||
UIColor(hex: "#c1f0f4")
|
||||
],
|
||||
onView: customColorsButton)
|
||||
}
|
||||
|
||||
@IBAction func customSuperviewButtonTouchUpInside(_: Any) {
|
||||
@@ -45,7 +45,7 @@ class AdvancedExampleViewController: UIViewController {
|
||||
}
|
||||
|
||||
@IBAction func customGradientColorsButtonTouchUpInside(_: Any) {
|
||||
customGradientColorsGradientLoadingBar?.toggle()
|
||||
customColorsGradientLoadingBar?.toggle()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -283,11 +283,11 @@
|
||||
<outlet property="delegate" destination="l28-cg-vu8" id="gIY-Ta-u93"/>
|
||||
</connections>
|
||||
</navigationBar>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" alignment="center" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="U9H-uQ-uml">
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" alignment="center" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="U9H-uQ-uml">
|
||||
<rect key="frame" x="16" y="150" width="343" height="468"/>
|
||||
<subviews>
|
||||
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xCv-N4-HyQ" customClass="BlueBorderedButton" customModule="GradientLoadingBar_Example" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="214" width="138.5" height="40"/>
|
||||
<rect key="frame" x="0.0" y="214" width="163.5" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="dRO-9l-Y6y"/>
|
||||
</constraints>
|
||||
@@ -298,12 +298,12 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="v4T-ew-NT3" userLabel="Custom Colors Button" customClass="BlueBorderedButton" customModule="GradientLoadingBar_Example" customModuleProvider="target">
|
||||
<rect key="frame" x="154.5" y="214" width="188.5" height="40"/>
|
||||
<rect key="frame" x="179.5" y="214" width="163.5" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="0Ni-Bh-WPG"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="13"/>
|
||||
<state key="normal" title="Custom Gradient Colors"/>
|
||||
<state key="normal" title="Custom Colors"/>
|
||||
<connections>
|
||||
<action selector="customGradientColorsButtonTouchUpInside:" destination="l28-cg-vu8" eventType="touchUpInside" id="eeU-Lu-Jg0"/>
|
||||
</connections>
|
||||
@@ -325,7 +325,7 @@
|
||||
<tabBarItem key="tabBarItem" title="Advanced Example" image="rocket" id="SyM-zw-tlg"/>
|
||||
<simulatedTabBarMetrics key="simulatedBottomBarMetrics"/>
|
||||
<connections>
|
||||
<outlet property="customGradientColorsButton" destination="v4T-ew-NT3" id="Z7N-mY-X4b"/>
|
||||
<outlet property="customColorsButton" destination="v4T-ew-NT3" id="Z7N-mY-X4b"/>
|
||||
<outlet property="customSuperviewButton" destination="xCv-N4-HyQ" id="Mxt-nu-ZS3"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
|
||||
Reference in New Issue
Block a user