Add + All Screens
This commit is contained in:
1 parent
85d52cd837
commit
50d52c70a4
464 files changed
+12893
-4125
No files matched your search
+35
@@ -0,0 +1,35 @@
|
||||
import UIKit
|
||||
//import ContainerControllerSwift
|
||||
|
||||
// typealias ExampleTextButtonBottomButtonActionCallback = () -> Void
|
||||
|
||||
class ExampleTextButtonBottomView: XibView {
|
||||
|
||||
// MARK: - IBOutlets
|
||||
|
||||
@IBOutlet private weak var titleLabel: UILabel?
|
||||
|
||||
// @IBOutlet weak var button: DesignButton!
|
||||
|
||||
required public override init() {
|
||||
super.init()
|
||||
let fr = CGRect(x: 0, y: 0, width: ScreenSize.width, height: 104.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) {
|
||||
// }
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
<?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="ExampleTextButtonBottomView" customModule="ContainerController" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="titleLabel" destination="Gu0-1m-IUU" id="vHf-NI-cL1"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9gF-5Q-DHC" userLabel=" ExampleTextButtonBottom">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="104"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="M4X-o8-kkj" userLabel="Frame 89503">
|
||||
<rect key="frame" x="0.0" y="8" width="375" height="57"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fH7-fo-wI3" userLabel="Rectangle 29" customClass="DesignnView" customModule="ContainerController" customModuleProvider="target">
|
||||
<rect key="frame" x="16" y="0.0" width="343" height="57"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="17"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="brWidth">
|
||||
<real key="value" value="0.0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="fillColor">
|
||||
<color key="value" red="0.99215686321258545" green="0.87843137979507446" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Найти велосипед" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="100" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gu0-1m-IUU" userLabel="Найти велосипед">
|
||||
<rect key="frame" x="0.0" y="19" width="375" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="18" id="VR8-Z2-ywn"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
|
||||
<color key="textColor" red="0.1335751861333847" green="0.11804264783859253" blue="0.10140056908130646" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="Gu0-1m-IUU" firstAttribute="leading" secondItem="M4X-o8-kkj" secondAttribute="leading" id="11W-qv-lh4"/>
|
||||
<constraint firstAttribute="bottom" secondItem="fH7-fo-wI3" secondAttribute="bottom" id="6Ay-ww-YQ7"/>
|
||||
<constraint firstItem="Gu0-1m-IUU" firstAttribute="top" secondItem="M4X-o8-kkj" secondAttribute="top" constant="19" id="8EH-ad-UpD"/>
|
||||
<constraint firstItem="fH7-fo-wI3" firstAttribute="leading" secondItem="M4X-o8-kkj" secondAttribute="leading" constant="16" id="CEK-l6-9B0"/>
|
||||
<constraint firstAttribute="height" constant="57" id="NOs-k6-deb"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Gu0-1m-IUU" secondAttribute="trailing" id="O2n-rq-IsD"/>
|
||||
<constraint firstItem="fH7-fo-wI3" firstAttribute="top" secondItem="M4X-o8-kkj" secondAttribute="top" id="Wl0-qQ-hJ0"/>
|
||||
<constraint firstAttribute="trailing" secondItem="fH7-fo-wI3" secondAttribute="trailing" constant="16" id="WwU-I9-1RB"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="M4X-o8-kkj" secondAttribute="trailing" id="5lN-eC-9YB"/>
|
||||
<constraint firstItem="M4X-o8-kkj" firstAttribute="leading" secondItem="9gF-5Q-DHC" secondAttribute="leading" id="AnZ-pd-x8r"/>
|
||||
<constraint firstItem="M4X-o8-kkj" firstAttribute="top" secondItem="9gF-5Q-DHC" secondAttribute="top" constant="8" id="mt9-8O-OHE"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="138" y="-10"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
import UIKit
|
||||
//import ContainerControllerSwift
|
||||
|
||||
// typealias ExampleTextHeaderButtonActionCallback = () -> Void
|
||||
|
||||
class ExampleTextHeaderView: XibView {
|
||||
|
||||
// MARK: - IBOutlets
|
||||
|
||||
@IBOutlet private weak var firstImageView: UIImageView?
|
||||
@IBOutlet private weak var subtitleLabel: UILabel?
|
||||
|
||||
// @IBOutlet weak var button: DesignButton!
|
||||
|
||||
required public override init() {
|
||||
super.init()
|
||||
let fr = CGRect(x: 0, y: 0, width: ScreenSize.width, height: 337.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) {
|
||||
// }
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
<?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="ExampleTextHeaderView" customModule="ContainerController" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="firstImageView" destination="8li-jf-gp6" id="xEd-j4-uAh"/>
|
||||
<outlet property="subtitleLabel" destination="4DZ-ye-aIR" id="7ND-8A-u7K"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9yr-a6-i2r" userLabel=" ExampleTextHeader">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="337"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="88w-KB-OSB" userLabel="Rectangle 75" customClass="DesignnView" customModule="ContainerController" customModuleProvider="target">
|
||||
<rect key="frame" x="16" y="28" width="343" height="209"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="11"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="fillColor">
|
||||
<color key="value" red="0.96078431606292725" green="0.95686274766921997" blue="0.94901961088180542" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="imgExampleTextViewLogo" translatesAutoresizingMaskIntoConstraints="NO" id="8li-jf-gp6" userLabel="imgExampleTextViewLogo">
|
||||
<rect key="frame" x="17" y="28" width="343" height="208"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9jH-CL-YIV" userLabel="Rectangle 1097" customClass="DesignnView" customModule="ContainerController" customModuleProvider="target">
|
||||
<rect key="frame" x="171" y="4" width="34" height="4"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="4" id="Us7-pi-sLy"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="fillColor">
|
||||
<color key="value" red="0.85098040103912354" green="0.85098040103912354" blue="0.85098040103912354" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Ещё больше двухколесных" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4DZ-ye-aIR" userLabel="Ещё больше двухколесных" customClass="DesignLabel" customModule="ContainerController" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="255" width="375" height="73"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="73" id="Udp-DP-E0I"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="30"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="shColor">
|
||||
<color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.25" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="shRadius">
|
||||
<real key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="size" keyPath="shOffset">
|
||||
<size key="value" width="0.0" height="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="9jH-CL-YIV" firstAttribute="top" secondItem="9yr-a6-i2r" secondAttribute="top" constant="4" id="9lp-mG-N4L"/>
|
||||
<constraint firstAttribute="trailing" secondItem="88w-KB-OSB" secondAttribute="trailing" constant="16" id="B3z-Gp-cjQ"/>
|
||||
<constraint firstItem="88w-KB-OSB" firstAttribute="top" secondItem="9yr-a6-i2r" secondAttribute="top" constant="28" id="LHT-UV-BYt"/>
|
||||
<constraint firstAttribute="bottom" secondItem="88w-KB-OSB" secondAttribute="bottom" constant="100" id="PM2-BG-0e1"/>
|
||||
<constraint firstItem="88w-KB-OSB" firstAttribute="leading" secondItem="9yr-a6-i2r" secondAttribute="leading" constant="16" id="dqv-hg-gbf"/>
|
||||
<constraint firstItem="4DZ-ye-aIR" firstAttribute="top" secondItem="9yr-a6-i2r" secondAttribute="top" constant="255" id="mlg-g2-vLG"/>
|
||||
<constraint firstItem="4DZ-ye-aIR" firstAttribute="leading" secondItem="9yr-a6-i2r" secondAttribute="leading" id="mzn-gZ-xtR"/>
|
||||
<constraint firstAttribute="trailing" secondItem="4DZ-ye-aIR" secondAttribute="trailing" id="ni2-Kq-gHJ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="9jH-CL-YIV" secondAttribute="trailing" constant="170" id="rfc-Yj-zxB"/>
|
||||
<constraint firstItem="9jH-CL-YIV" firstAttribute="leading" secondItem="9yr-a6-i2r" secondAttribute="leading" constant="171" id="uLs-9M-MMH"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<point key="canvasLocation" x="-68" y="-48"/>
|
||||
</view>
|
||||
</objects>
|
||||
<designables>
|
||||
<designable name="4DZ-ye-aIR">
|
||||
<size key="intrinsicContentSize" width="399" height="36"/>
|
||||
</designable>
|
||||
</designables>
|
||||
<resources>
|
||||
<image name="imgExampleTextViewLogo" width="1029" height="624"/>
|
||||
</resources>
|
||||
</document>
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="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="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Example Alert Popup Controller-->
|
||||
<scene sceneID="Zyy-oh-ZWO">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="ExampleAlertPopupController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="WD1-w9-jdT" customClass="ExampleAlertPopupController" customModule="ContainerController" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="tYk-Rm-2kC">
|
||||
<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" insetsLayoutMarginsFromSafeArea="NO" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="USX-oT-7SK" 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>
|
||||
<viewLayoutGuide key="safeArea" id="6qi-GV-N23"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="USX-oT-7SK" firstAttribute="leading" secondItem="tYk-Rm-2kC" secondAttribute="leading" id="7TM-w1-Kfr"/>
|
||||
<constraint firstAttribute="trailing" secondItem="USX-oT-7SK" secondAttribute="trailing" id="CDx-dn-PrB"/>
|
||||
<constraint firstAttribute="bottom" secondItem="USX-oT-7SK" secondAttribute="bottom" id="DqU-nh-5rX"/>
|
||||
<constraint firstItem="USX-oT-7SK" firstAttribute="top" secondItem="tYk-Rm-2kC" secondAttribute="top" id="rVc-YC-tbP"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="tableView" destination="USX-oT-7SK" id="6e7-Je-kP7"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="4Ix-vf-0x1" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-68" y="-69"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="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="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Example Text View Controller-->
|
||||
<scene sceneID="Zyy-oh-ZWO">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="ExampleTextViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="WD1-w9-jdT" customClass="ExampleTextViewController" customModule="ContainerController" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="tYk-Rm-2kC">
|
||||
<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" insetsLayoutMarginsFromSafeArea="NO" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="USX-oT-7SK" 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>
|
||||
<viewLayoutGuide key="safeArea" id="6qi-GV-N23"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="USX-oT-7SK" firstAttribute="leading" secondItem="tYk-Rm-2kC" secondAttribute="leading" id="7TM-w1-Kfr"/>
|
||||
<constraint firstAttribute="trailing" secondItem="USX-oT-7SK" secondAttribute="trailing" id="CDx-dn-PrB"/>
|
||||
<constraint firstAttribute="bottom" secondItem="USX-oT-7SK" secondAttribute="bottom" id="DqU-nh-5rX"/>
|
||||
<constraint firstItem="USX-oT-7SK" firstAttribute="top" secondItem="tYk-Rm-2kC" secondAttribute="top" id="rVc-YC-tbP"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="tableView" destination="USX-oT-7SK" id="6e7-Je-kP7"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="4Ix-vf-0x1" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-68" y="-69"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
+194
@@ -0,0 +1,194 @@
|
||||
import UIKit
|
||||
import ContainerControllerSwift
|
||||
|
||||
|
||||
class ExampleAlertPopupController: ExampleTextViewController {
|
||||
override func viewDidLoad() {
|
||||
self.alert = true
|
||||
super.viewDidLoad()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class ExampleTextViewController: StoryboardController {
|
||||
|
||||
@IBOutlet weak var tableView: TableAdapterView!
|
||||
var containers: [ContainerController] = []
|
||||
|
||||
var alert: Bool = false
|
||||
|
||||
var textVieww: UITextView?
|
||||
var container: ContainerController?
|
||||
|
||||
var containerTable2: TableAdapterView?
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
|
||||
title = alert ? "Example Alert Popup" : "Example Add TextView"
|
||||
|
||||
// self.navBarHide = true
|
||||
let color1 = #colorLiteral(red: 0.4980392157, green: 0.4980392157, blue: 0.4980392157, alpha: 1)
|
||||
view.backgroundColor = color1
|
||||
// let img1 = #imageLiteral(resourceName: "imgPlaylistMain")
|
||||
|
||||
var items: [TableAdapterItem] = []
|
||||
items.append( PlaylistTitleItem(state: .init(titleText: "") ) )
|
||||
tableView.set(items: items, animated: true)
|
||||
|
||||
|
||||
if alert {
|
||||
|
||||
let header = ExampleTextHeaderView(frame: CGRect(x: 0, y: 0, width: ScreenSize.width, height: 337))
|
||||
let footer = ExampleTextButtonBottomView(frame: CGRect(x: 0, y: 0, width: ScreenSize.width, height: 104))
|
||||
|
||||
let topS = 227 - topbarHeight
|
||||
let ccc = addContainer(position: .init(top: topS, bottom: topS), radius: 25, header: header, footer: footer)
|
||||
container = ccc.0
|
||||
|
||||
|
||||
let textView = createTextView2()
|
||||
self.container?.add(scrollView: textView)
|
||||
self.textVieww = textView
|
||||
|
||||
|
||||
containers.append( ccc.0 )
|
||||
|
||||
main(delay: 0.5) {
|
||||
self.container?.move(type: .top)
|
||||
}
|
||||
|
||||
// main(delay: 2.5) {
|
||||
// self.container?.move(type: .top)
|
||||
// }
|
||||
//
|
||||
// main(delay: 4.5) {
|
||||
// self.container?.move(type: .hide)
|
||||
// }
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
let ccc2 = createContainerFull(title: "", addBackShadow: true)
|
||||
|
||||
if let c1 = ccc2.0, let t1 = ccc2.1 {
|
||||
|
||||
containerTable2 = t1
|
||||
|
||||
c1.backView?.subviews.forEach {
|
||||
$0.removeFromSuperview()
|
||||
}
|
||||
|
||||
c1.set(bottom: 100 )
|
||||
|
||||
|
||||
let fr = CGRect(x: 0, y: 0, width: ScreenSize.width, height: 161)
|
||||
let header = CustomCardHeaderMainView()
|
||||
header.titleLabel?.text = "HeaderView"
|
||||
header.subtitleLabel?.text = "Added UITextView"
|
||||
header.frame = fr
|
||||
|
||||
|
||||
c1.add(headerView: header)
|
||||
|
||||
c1.set(left: 15)
|
||||
c1.set(right: 15)
|
||||
c1.set(top: 40)
|
||||
c1.view.cornerRadius = 37
|
||||
|
||||
containers.append( c1 )
|
||||
|
||||
c1.set(top: 40)
|
||||
let scrollV = createTextView()
|
||||
scrollV.alpha = 0.0
|
||||
c1.add(scrollView: scrollV)
|
||||
UIView.animate(withDuration: 0.35) {
|
||||
scrollV.alpha = 1.0
|
||||
}
|
||||
|
||||
main {
|
||||
c1.move(type: .top)
|
||||
}
|
||||
|
||||
// main(delay: 2.0) {
|
||||
// c1.move(type: .hide)
|
||||
// }
|
||||
//
|
||||
// main(delay: 4.5) {
|
||||
// c1.move(type: .top)
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func createTextView2() -> UITextView {
|
||||
|
||||
let textView = UITextView()
|
||||
textView.returnKeyType = .done
|
||||
textView.backgroundColor = .clear
|
||||
textView.textContainerInset = .init(top: 10, left: 16, bottom: 5, right: 16)
|
||||
textView.font = UIFont.mediumSystemFont(ofSize: 15)
|
||||
textView.text = """
|
||||
Вы знали, что в Яндекс Go есть не только самокаты, но ещё и электровелосипеды!
|
||||
На них тоже можно кататься по абонементу или с пакетом минут. Берите для себя и друзей и колесите по городу
с удовольствием
|
||||
"""
|
||||
|
||||
return textView
|
||||
}
|
||||
|
||||
|
||||
func createContainerFull(mini: Bool = false, gradient: Bool = false, title: String? = nil, addBackShadow: Bool = false) -> (ContainerController?, TableAdapterView?) {
|
||||
|
||||
let items: [TableAdapterItem] = []
|
||||
// items.append( PlaylistTitleItem(state: .init() ) )
|
||||
tableView.set(items: items, animated: true)
|
||||
|
||||
|
||||
let itemsC: [TableAdapterItem] = []
|
||||
|
||||
|
||||
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 ?? 0, height: ccc.0.backView?.height ?? 0)
|
||||
let gradientV = CustomCardGradientMainView()
|
||||
gradientV.gr1.isHidden = !gradient
|
||||
gradientV.gr2.isHidden = gradient
|
||||
gradientV.autoresizingMask = [.flexibleWidth, .flexibleHeight, .flexibleLeftMargin,
|
||||
.flexibleRightMargin, .flexibleTopMargin]
|
||||
gradientV.frame = frr
|
||||
|
||||
ccc.0.backView?.addSubview( gradientV )
|
||||
|
||||
|
||||
|
||||
|
||||
if !mini {
|
||||
let fr = CGRect(x: 0, y: 0, width: ScreenSize.width, height: 63)
|
||||
let header = CustomCardHeaderView()
|
||||
header.titleLabel?.text = title ?? ""
|
||||
header.frame = fr
|
||||
|
||||
ccc.0.add(headerView: header)
|
||||
} else {
|
||||
|
||||
let fr = CGRect(x: 0, y: 0, width: ScreenSize.width, height: 39)
|
||||
let header = CustomCardHeaderMiniView()
|
||||
header.frame = fr
|
||||
header.titleLabel?.text = title ?? ""
|
||||
ccc.0.add(headerView: header)
|
||||
}
|
||||
|
||||
|
||||
ccc.0.move(type: .hide)
|
||||
|
||||
|
||||
|
||||
return ccc
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user