@@ -1,70 +0,0 @@ |
||
| 1 |
-// |
|
| 2 |
-// UIButtonExt.swift |
|
| 3 |
-// ExtensionKit |
|
| 4 |
-// |
|
| 5 |
-// Created by FFIB on 2017/9/14. |
|
| 6 |
-// Copyright © 2017年 FFIB. All rights reserved. |
|
| 7 |
-// |
|
| 8 |
- |
|
| 9 |
-import UIKit |
|
| 10 |
- |
|
| 11 |
-extension UIButton {
|
|
| 12 |
- @IBInspectable |
|
| 13 |
- public var normalStatusBackgroundColor: UIColor? {
|
|
| 14 |
- set {
|
|
| 15 |
- if let color = newValue {
|
|
| 16 |
- let img = UIImage.imageWithColor(color) |
|
| 17 |
- self.setBackgroundImage(img, for: UIControl.State()) |
|
| 18 |
- } else {
|
|
| 19 |
- self.setBackgroundImage(nil, for: UIControl.State()) |
|
| 20 |
- } |
|
| 21 |
- } |
|
| 22 |
- get {
|
|
| 23 |
- return nil |
|
| 24 |
- } |
|
| 25 |
- } |
|
| 26 |
- @IBInspectable |
|
| 27 |
- public var pressedStatusBackgroundColor: UIColor? {
|
|
| 28 |
- set {
|
|
| 29 |
- if let color = newValue {
|
|
| 30 |
- let img = UIImage.imageWithColor(color) |
|
| 31 |
- self.setBackgroundImage(img, for: .highlighted) |
|
| 32 |
- } else {
|
|
| 33 |
- self.setBackgroundImage(nil, for: .highlighted) |
|
| 34 |
- } |
|
| 35 |
- } |
|
| 36 |
- get {
|
|
| 37 |
- return nil |
|
| 38 |
- } |
|
| 39 |
- } |
|
| 40 |
- @IBInspectable |
|
| 41 |
- public var disabledStatusBackgroundColor: UIColor? {
|
|
| 42 |
- set {
|
|
| 43 |
- if let color = newValue {
|
|
| 44 |
- let img = UIImage.imageWithColor(color) |
|
| 45 |
- self.setBackgroundImage(img, for: .disabled) |
|
| 46 |
- } else {
|
|
| 47 |
- self.setBackgroundImage(nil, for: .disabled) |
|
| 48 |
- } |
|
| 49 |
- } |
|
| 50 |
- get {
|
|
| 51 |
- return nil |
|
| 52 |
- } |
|
| 53 |
- } |
|
| 54 |
- |
|
| 55 |
- @IBInspectable |
|
| 56 |
- public var selectedStatusBackgroundColor: UIColor? {
|
|
| 57 |
- set {
|
|
| 58 |
- if let color = newValue {
|
|
| 59 |
- let img = UIImage.imageWithColor(color) |
|
| 60 |
- self.setBackgroundImage(img, for: .selected) |
|
| 61 |
- } else {
|
|
| 62 |
- self.setBackgroundImage(nil, for: .selected) |
|
| 63 |
- } |
|
| 64 |
- } |
|
| 65 |
- get {
|
|
| 66 |
- return nil |
|
| 67 |
- } |
|
| 68 |
- } |
|
| 69 |
- |
|
| 70 |
-} |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 |
// |
| 2 |
-// ToastImageView.swift |
|
| 2 |
+// NiblessView.swift |
|
| 3 | 3 |
// PaiaiUIKit |
| 4 | 4 |
// |
| 5 |
-// Created by ffib on 2019/1/18. |
|
| 5 |
+// Created by ffib on 2019/2/6. |
|
| 6 | 6 |
// Copyright © 2019 yb. All rights reserved. |
| 7 | 7 |
// |
| 8 | 8 |
|
@@ -0,0 +1,30 @@ |
||
| 1 |
+// |
|
| 2 |
+// NiblessViewController.swift |
|
| 3 |
+// PaiaiUIKit |
|
| 4 |
+// |
|
| 5 |
+// Created by ffib on 2019/2/6. |
|
| 6 |
+// Copyright © 2019 yb. All rights reserved. |
|
| 7 |
+// |
|
| 8 |
+ |
|
| 9 |
+import UIKit |
|
| 10 |
+ |
|
| 11 |
+class NiblessViewController: UIViewController {
|
|
| 12 |
+ |
|
| 13 |
+ override func viewDidLoad() {
|
|
| 14 |
+ super.viewDidLoad() |
|
| 15 |
+ |
|
| 16 |
+ // Do any additional setup after loading the view. |
|
| 17 |
+ } |
|
| 18 |
+ |
|
| 19 |
+ |
|
| 20 |
+ /* |
|
| 21 |
+ // MARK: - Navigation |
|
| 22 |
+ |
|
| 23 |
+ // In a storyboard-based application, you will often want to do a little preparation before navigation |
|
| 24 |
+ override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
|
| 25 |
+ // Get the new view controller using segue.destination. |
|
| 26 |
+ // Pass the selected object to the new view controller. |
|
| 27 |
+ } |
|
| 28 |
+ */ |
|
| 29 |
+ |
|
| 30 |
+} |
@@ -1,20 +0,0 @@ |
||
| 1 |
-// |
|
| 2 |
-// ToastContentView.swift |
|
| 3 |
-// PaiaiUIKit |
|
| 4 |
-// |
|
| 5 |
-// Created by ffib on 2019/1/18. |
|
| 6 |
-// Copyright © 2019 yb. All rights reserved. |
|
| 7 |
-// |
|
| 8 |
- |
|
| 9 |
-import UIKit |
|
| 10 |
- |
|
| 11 |
-protocol ToastContentView: class {
|
|
| 12 |
- var option: ToastOption { get }
|
|
| 13 |
- var contentView: UIView { get }
|
|
| 14 |
-} |
|
| 15 |
- |
|
| 16 |
-extension ToastContentView where Self: UIView {
|
|
| 17 |
- var contentView: UIView {
|
|
| 18 |
- return self |
|
| 19 |
- } |
|
| 20 |
-} |
@@ -1,28 +0,0 @@ |
||
| 1 |
-// |
|
| 2 |
-// ToastTextView.swift |
|
| 3 |
-// PaiaiUIKit |
|
| 4 |
-// |
|
| 5 |
-// Created by ffib on 2019/1/18. |
|
| 6 |
-// Copyright © 2019 yb. All rights reserved. |
|
| 7 |
-// |
|
| 8 |
- |
|
| 9 |
-import Foundation |
|
| 10 |
- |
|
| 11 |
-final class ToastTextView: UILabel {
|
|
| 12 |
- |
|
| 13 |
- override init(frame: CGRect) {
|
|
| 14 |
- super.init(frame: frame) |
|
| 15 |
- } |
|
| 16 |
- |
|
| 17 |
- convenience init(text: String, option: ToastOption) {
|
|
| 18 |
- self.init(frame: CGRect.zero) |
|
| 19 |
- self.text = text |
|
| 20 |
- numberOfLines = 0 |
|
| 21 |
- textColor = option.tintColor |
|
| 22 |
- font = UIFont.systemFont(ofSize: 14) |
|
| 23 |
- } |
|
| 24 |
- |
|
| 25 |
- required init?(coder aDecoder: NSCoder) {
|
|
| 26 |
- fatalError("init(coder:) has not been implemented")
|
|
| 27 |
- } |
|
| 28 |
-} |
@@ -0,0 +1,66 @@ |
||
| 1 |
+<?xml version="1.0" encoding="UTF-8"?> |
|
| 2 |
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useSafeAreas="YES" colorMatched="YES"> |
|
| 3 |
+ <device id="retina4_7" orientation="portrait"> |
|
| 4 |
+ <adaptation id="fullscreen"/> |
|
| 5 |
+ </device> |
|
| 6 |
+ <dependencies> |
|
| 7 |
+ <deployment identifier="iOS"/> |
|
| 8 |
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/> |
|
| 9 |
+ <capability name="Safe area layout guides" minToolsVersion="9.0"/> |
|
| 10 |
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
|
| 11 |
+ </dependencies> |
|
| 12 |
+ <scenes> |
|
| 13 |
+ <!--GroupViewController--> |
|
| 14 |
+ <scene sceneID="JW2-m4-67r"> |
|
| 15 |
+ <objects> |
|
| 16 |
+ <viewController storyboardIdentifier="GroupViewController" automaticallyAdjustsScrollViewInsets="NO" id="qPy-31-33I" userLabel="GroupViewController" customClass="GroupViewController" customModule="Paiai_iOS" customModuleProvider="target" sceneMemberID="viewController"> |
|
| 17 |
+ <view key="view" contentMode="scaleToFill" id="3WT-kq-eEc"> |
|
| 18 |
+ <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
|
| 19 |
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
|
| 20 |
+ <subviews> |
|
| 21 |
+ <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="SQ2-vg-KI2"> |
|
| 22 |
+ <rect key="frame" x="0.0" y="20" width="375" height="647"/> |
|
| 23 |
+ <color key="backgroundColor" red="0.87843137250000003" green="0.87843137250000003" blue="0.87843137250000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
| 24 |
+ <collectionViewLayout key="collectionViewLayout" id="JAB-7S-F8d" customClass="WaterfallFlowLayout" customModule="PaiaiUIKit"/> |
|
| 25 |
+ <cells/> |
|
| 26 |
+ </collectionView> |
|
| 27 |
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ckt-CA-ny6"> |
|
| 28 |
+ <rect key="frame" x="303" y="597" width="64" height="64"/> |
|
| 29 |
+ <constraints> |
|
| 30 |
+ <constraint firstAttribute="height" constant="64" id="dza-Pq-ZRx"/> |
|
| 31 |
+ <constraint firstAttribute="width" constant="64" id="kEi-cK-cxH"/> |
|
| 32 |
+ </constraints> |
|
| 33 |
+ <state key="normal" image="BTN-拍照"/> |
|
| 34 |
+ <state key="selected" image="BTN-拍照-press"/> |
|
| 35 |
+ <connections> |
|
| 36 |
+ <action selector="takePhotoAction" destination="qPy-31-33I" eventType="touchUpInside" id="vIP-Gk-vDZ"/> |
|
| 37 |
+ </connections> |
|
| 38 |
+ </button> |
|
| 39 |
+ </subviews> |
|
| 40 |
+ <color key="backgroundColor" red="0.87843137250000003" green="0.87843137250000003" blue="0.87843137250000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|
| 41 |
+ <constraints> |
|
| 42 |
+ <constraint firstItem="jD2-65-6eY" firstAttribute="bottom" secondItem="Ckt-CA-ny6" secondAttribute="bottom" constant="6" id="3sN-1z-kEg"/> |
|
| 43 |
+ <constraint firstItem="jD2-65-6eY" firstAttribute="trailing" secondItem="SQ2-vg-KI2" secondAttribute="trailing" id="6Mx-Yn-Q9C"/> |
|
| 44 |
+ <constraint firstItem="SQ2-vg-KI2" firstAttribute="top" secondItem="jD2-65-6eY" secondAttribute="top" id="SjQ-TS-6Py"/> |
|
| 45 |
+ <constraint firstItem="SQ2-vg-KI2" firstAttribute="leading" secondItem="jD2-65-6eY" secondAttribute="leading" id="jE9-N2-trU"/> |
|
| 46 |
+ <constraint firstItem="jD2-65-6eY" firstAttribute="trailing" secondItem="Ckt-CA-ny6" secondAttribute="trailing" constant="8" id="ory-hZ-HWM"/> |
|
| 47 |
+ <constraint firstAttribute="bottom" secondItem="SQ2-vg-KI2" secondAttribute="bottom" id="qMe-Om-r14"/> |
|
| 48 |
+ </constraints> |
|
| 49 |
+ <viewLayoutGuide key="safeArea" id="jD2-65-6eY"/> |
|
| 50 |
+ </view> |
|
| 51 |
+ <navigationItem key="navigationItem" id="sdS-ms-7Io"/> |
|
| 52 |
+ <connections> |
|
| 53 |
+ <outlet property="collectionView" destination="SQ2-vg-KI2" id="QZZ-9l-Lg5"/> |
|
| 54 |
+ <outlet property="photographBtn" destination="Ckt-CA-ny6" id="nq9-32-Rhg"/> |
|
| 55 |
+ </connections> |
|
| 56 |
+ </viewController> |
|
| 57 |
+ <placeholder placeholderIdentifier="IBFirstResponder" id="1WI-xu-c0y" sceneMemberID="firstResponder"/> |
|
| 58 |
+ </objects> |
|
| 59 |
+ <point key="canvasLocation" x="437.5" y="63.5"/> |
|
| 60 |
+ </scene> |
|
| 61 |
+ </scenes> |
|
| 62 |
+ <resources> |
|
| 63 |
+ <image name="BTN-拍照" width="168" height="168"/> |
|
| 64 |
+ <image name="BTN-拍照-press" width="16" height="16"/> |
|
| 65 |
+ </resources> |
|
| 66 |
+</document> |
@@ -0,0 +1,21 @@ |
||
| 1 |
+// |
|
| 2 |
+// GroupQRView.swift |
|
| 3 |
+// Paiai_iOS |
|
| 4 |
+// |
|
| 5 |
+// Created by ffib on 2019/2/18. |
|
| 6 |
+// Copyright © 2019 yb. All rights reserved. |
|
| 7 |
+// |
|
| 8 |
+ |
|
| 9 |
+import UIKit |
|
| 10 |
+ |
|
| 11 |
+class GroupQRView: UIView {
|
|
| 12 |
+ |
|
| 13 |
+ /* |
|
| 14 |
+ // Only override draw() if you perform custom drawing. |
|
| 15 |
+ // An empty implementation adversely affects performance during animation. |
|
| 16 |
+ override func draw(_ rect: CGRect) {
|
|
| 17 |
+ // Drawing code |
|
| 18 |
+ } |
|
| 19 |
+ */ |
|
| 20 |
+ |
|
| 21 |
+} |