接口注释

This commit is contained in:
xaoxuu 2023-08-19 14:21:22 +08:00
parent 0574844a7f
commit ccaad1d13d
9 changed files with 45 additions and 41 deletions

View File

@ -7,11 +7,11 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
CD2439342A82164E00A3BBF5 /* CapsuleVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD2439332A82164E00A3BBF5 /* CapsuleVC.swift */; }; CD2439342A82164E00A3BBF5 /* DemoCapsuleVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD2439332A82164E00A3BBF5 /* DemoCapsuleVC.swift */; };
CD6537BF28C3311B00A5981B /* ListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6537BE28C3311B00A5981B /* ListModel.swift */; }; CD6537BF28C3311B00A5981B /* ListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6537BE28C3311B00A5981B /* ListModel.swift */; };
CD6537C128C35E1C00A5981B /* ListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6537C028C35E1C00A5981B /* ListVC.swift */; }; CD6537C128C35E1C00A5981B /* ListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6537C028C35E1C00A5981B /* ListVC.swift */; };
CD6537C328C35E6200A5981B /* ToastVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6537C228C35E6200A5981B /* ToastVC.swift */; }; CD6537C328C35E6200A5981B /* DemoToastVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6537C228C35E6200A5981B /* DemoToastVC.swift */; };
CD6537C528C35F2C00A5981B /* SheetVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6537C428C35F2C00A5981B /* SheetVC.swift */; }; CD6537C528C35F2C00A5981B /* DemoSheetVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6537C428C35F2C00A5981B /* DemoSheetVC.swift */; };
CD6AE8A32A7CC1BA0044E53D /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = CD6AE8A22A7CC1BA0044E53D /* SnapKit */; }; CD6AE8A32A7CC1BA0044E53D /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = CD6AE8A22A7CC1BA0044E53D /* SnapKit */; };
CD891BCD2A80B58E00848BBC /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = CD891BCC2A80B58E00848BBC /* SnapKit */; }; CD891BCD2A80B58E00848BBC /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = CD891BCC2A80B58E00848BBC /* SnapKit */; };
CD8EEF3B28BC5C7200E660EA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD8EEF3A28BC5C7200E660EA /* AppDelegate.swift */; }; CD8EEF3B28BC5C7200E660EA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD8EEF3A28BC5C7200E660EA /* AppDelegate.swift */; };
@ -22,16 +22,16 @@
CD9C7B1E28CB8972006190CD /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD9C7B1D28CB8972006190CD /* Extensions.swift */; }; CD9C7B1E28CB8972006190CD /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD9C7B1D28CB8972006190CD /* Extensions.swift */; };
CDA83DB928C601E60025F0DF /* TableHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA83DB828C601E60025F0DF /* TableHeaderView.swift */; }; CDA83DB928C601E60025F0DF /* TableHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDA83DB828C601E60025F0DF /* TableHeaderView.swift */; };
CDB6A2A228BC5F4600DEC80D /* ProHUD in Frameworks */ = {isa = PBXBuildFile; productRef = CDB6A2A128BC5F4600DEC80D /* ProHUD */; }; CDB6A2A228BC5F4600DEC80D /* ProHUD in Frameworks */ = {isa = PBXBuildFile; productRef = CDB6A2A128BC5F4600DEC80D /* ProHUD */; };
CDB7A1D028C32A7400E034D8 /* AlertVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDB7A1CF28C32A7400E034D8 /* AlertVC.swift */; }; CDB7A1D028C32A7400E034D8 /* DemoAlertVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDB7A1CF28C32A7400E034D8 /* DemoAlertVC.swift */; };
CDCBAEC42A80D6FD00C30DE5 /* ProHUD in Frameworks */ = {isa = PBXBuildFile; productRef = CDCBAEC32A80D6FD00C30DE5 /* ProHUD */; }; CDCBAEC42A80D6FD00C30DE5 /* ProHUD in Frameworks */ = {isa = PBXBuildFile; productRef = CDCBAEC32A80D6FD00C30DE5 /* ProHUD */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
CD2439332A82164E00A3BBF5 /* CapsuleVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CapsuleVC.swift; sourceTree = "<group>"; }; CD2439332A82164E00A3BBF5 /* DemoCapsuleVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DemoCapsuleVC.swift; sourceTree = "<group>"; };
CD6537BE28C3311B00A5981B /* ListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListModel.swift; sourceTree = "<group>"; }; CD6537BE28C3311B00A5981B /* ListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListModel.swift; sourceTree = "<group>"; };
CD6537C028C35E1C00A5981B /* ListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListVC.swift; sourceTree = "<group>"; }; CD6537C028C35E1C00A5981B /* ListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListVC.swift; sourceTree = "<group>"; };
CD6537C228C35E6200A5981B /* ToastVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastVC.swift; sourceTree = "<group>"; }; CD6537C228C35E6200A5981B /* DemoToastVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoToastVC.swift; sourceTree = "<group>"; };
CD6537C428C35F2C00A5981B /* SheetVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SheetVC.swift; sourceTree = "<group>"; }; CD6537C428C35F2C00A5981B /* DemoSheetVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoSheetVC.swift; sourceTree = "<group>"; };
CD8EEF3728BC5C7200E660EA /* PHDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PHDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; CD8EEF3728BC5C7200E660EA /* PHDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PHDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
CD8EEF3A28BC5C7200E660EA /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; CD8EEF3A28BC5C7200E660EA /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
CD8EEF3C28BC5C7200E660EA /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; }; CD8EEF3C28BC5C7200E660EA /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
@ -41,7 +41,7 @@
CD8EEF4828BC5C7300E660EA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; CD8EEF4828BC5C7300E660EA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
CD9C7B1D28CB8972006190CD /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; }; CD9C7B1D28CB8972006190CD /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
CDA83DB828C601E60025F0DF /* TableHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableHeaderView.swift; sourceTree = "<group>"; }; CDA83DB828C601E60025F0DF /* TableHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableHeaderView.swift; sourceTree = "<group>"; };
CDB7A1CF28C32A7400E034D8 /* AlertVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertVC.swift; sourceTree = "<group>"; }; CDB7A1CF28C32A7400E034D8 /* DemoAlertVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoAlertVC.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -85,10 +85,10 @@
CDA83DB828C601E60025F0DF /* TableHeaderView.swift */, CDA83DB828C601E60025F0DF /* TableHeaderView.swift */,
CD9C7B1D28CB8972006190CD /* Extensions.swift */, CD9C7B1D28CB8972006190CD /* Extensions.swift */,
CD6537C028C35E1C00A5981B /* ListVC.swift */, CD6537C028C35E1C00A5981B /* ListVC.swift */,
CD6537C228C35E6200A5981B /* ToastVC.swift */, CD6537C228C35E6200A5981B /* DemoToastVC.swift */,
CDB7A1CF28C32A7400E034D8 /* AlertVC.swift */, CDB7A1CF28C32A7400E034D8 /* DemoAlertVC.swift */,
CD6537C428C35F2C00A5981B /* SheetVC.swift */, CD6537C428C35F2C00A5981B /* DemoSheetVC.swift */,
CD2439332A82164E00A3BBF5 /* CapsuleVC.swift */, CD2439332A82164E00A3BBF5 /* DemoCapsuleVC.swift */,
CD8EEF4028BC5C7200E660EA /* Main.storyboard */, CD8EEF4028BC5C7200E660EA /* Main.storyboard */,
CD8EEF4328BC5C7300E660EA /* Assets.xcassets */, CD8EEF4328BC5C7300E660EA /* Assets.xcassets */,
CD8EEF4528BC5C7300E660EA /* LaunchScreen.storyboard */, CD8EEF4528BC5C7300E660EA /* LaunchScreen.storyboard */,
@ -186,10 +186,10 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
CDA83DB928C601E60025F0DF /* TableHeaderView.swift in Sources */, CDA83DB928C601E60025F0DF /* TableHeaderView.swift in Sources */,
CD6537C528C35F2C00A5981B /* SheetVC.swift in Sources */, CD6537C528C35F2C00A5981B /* DemoSheetVC.swift in Sources */,
CD2439342A82164E00A3BBF5 /* CapsuleVC.swift in Sources */, CD2439342A82164E00A3BBF5 /* DemoCapsuleVC.swift in Sources */,
CD6537C328C35E6200A5981B /* ToastVC.swift in Sources */, CD6537C328C35E6200A5981B /* DemoToastVC.swift in Sources */,
CDB7A1D028C32A7400E034D8 /* AlertVC.swift in Sources */, CDB7A1D028C32A7400E034D8 /* DemoAlertVC.swift in Sources */,
CD6537C128C35E1C00A5981B /* ListVC.swift in Sources */, CD6537C128C35E1C00A5981B /* ListVC.swift in Sources */,
CD8EEF3B28BC5C7200E660EA /* AppDelegate.swift in Sources */, CD8EEF3B28BC5C7200E660EA /* AppDelegate.swift in Sources */,
CD8EEF3D28BC5C7200E660EA /* SceneDelegate.swift in Sources */, CD8EEF3D28BC5C7200E660EA /* SceneDelegate.swift in Sources */,

View File

@ -2,16 +2,15 @@
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22152" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="06J-FN-U3n"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22152" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="06J-FN-U3n">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22127"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22127"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<scenes> <scenes>
<!--AlertVC--> <!--Demo AlertVC-->
<scene sceneID="LP0-RE-kvY"> <scene sceneID="LP0-RE-kvY">
<objects> <objects>
<tableViewController id="NBo-Re-tKO" customClass="AlertVC" customModule="PHDemo" customModuleProvider="target" sceneMemberID="viewController"> <tableViewController id="NBo-Re-tKO" customClass="DemoAlertVC" customModule="PHDemo" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="insetGrouped" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" estimatedSectionHeaderHeight="-1" sectionFooterHeight="18" estimatedSectionFooterHeight="-1" id="eCS-6f-ub3"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="insetGrouped" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" estimatedSectionHeaderHeight="-1" sectionFooterHeight="18" estimatedSectionFooterHeight="-1" id="eCS-6f-ub3">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -60,10 +59,10 @@
</objects> </objects>
<point key="canvasLocation" x="1865.217391304348" y="71.651785714285708"/> <point key="canvasLocation" x="1865.217391304348" y="71.651785714285708"/>
</scene> </scene>
<!--ToastVC--> <!--Demo ToastVC-->
<scene sceneID="DAh-i5-GcF"> <scene sceneID="DAh-i5-GcF">
<objects> <objects>
<tableViewController id="h7R-Kd-Dn5" customClass="ToastVC" customModule="PHDemo" customModuleProvider="target" sceneMemberID="viewController"> <tableViewController id="h7R-Kd-Dn5" customClass="DemoToastVC" customModule="PHDemo" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="insetGrouped" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" estimatedSectionHeaderHeight="-1" sectionFooterHeight="18" estimatedSectionFooterHeight="-1" id="MVT-cH-t1Z"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="insetGrouped" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" estimatedSectionHeaderHeight="-1" sectionFooterHeight="18" estimatedSectionFooterHeight="-1" id="MVT-cH-t1Z">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -90,10 +89,10 @@
</objects> </objects>
<point key="canvasLocation" x="1863.7681159420292" y="803.57142857142856"/> <point key="canvasLocation" x="1863.7681159420292" y="803.57142857142856"/>
</scene> </scene>
<!--SheetVC--> <!--Demo SheetVC-->
<scene sceneID="DG9-RE-7gC"> <scene sceneID="DG9-RE-7gC">
<objects> <objects>
<tableViewController id="9SY-ag-pK6" customClass="SheetVC" customModule="PHDemo" customModuleProvider="target" sceneMemberID="viewController"> <tableViewController id="9SY-ag-pK6" customClass="DemoSheetVC" customModule="PHDemo" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="insetGrouped" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" estimatedSectionHeaderHeight="-1" sectionFooterHeight="18" estimatedSectionFooterHeight="-1" id="N9I-Aa-GtP"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="insetGrouped" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" estimatedSectionHeaderHeight="-1" sectionFooterHeight="18" estimatedSectionFooterHeight="-1" id="N9I-Aa-GtP">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -120,10 +119,10 @@
</objects> </objects>
<point key="canvasLocation" x="5471.0144927536239" y="803.57142857142856"/> <point key="canvasLocation" x="5471.0144927536239" y="803.57142857142856"/>
</scene> </scene>
<!--CapsuleVC--> <!--Demo CapsuleVC-->
<scene sceneID="Bhf-XS-ITh"> <scene sceneID="Bhf-XS-ITh">
<objects> <objects>
<tableViewController id="xyo-OI-w9X" customClass="CapsuleVC" customModule="PHDemo" customModuleProvider="target" sceneMemberID="viewController"> <tableViewController id="xyo-OI-w9X" customClass="DemoCapsuleVC" customModule="PHDemo" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="insetGrouped" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" estimatedSectionHeaderHeight="-1" sectionFooterHeight="18" estimatedSectionFooterHeight="-1" id="jta-3v-OTY"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="insetGrouped" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="18" estimatedSectionHeaderHeight="-1" sectionFooterHeight="18" estimatedSectionFooterHeight="-1" id="jta-3v-OTY">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>

View File

@ -1,5 +1,5 @@
// //
// AlertVC.swift // DemoAlertVC.swift
// PHDemo // PHDemo
// //
// Created by xaoxuu on 2022/9/3. // Created by xaoxuu on 2022/9/3.
@ -8,7 +8,7 @@
import UIKit import UIKit
import ProHUD import ProHUD
class AlertVC: ListVC { class DemoAlertVC: ListVC {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
@ -29,9 +29,7 @@ class AlertVC: ListVC {
list.add(title: "纯文字") { section in list.add(title: "纯文字") { section in
section.add(title: "只有一句话") { section.add(title: "只有一句话") {
// Alert(.message("").duration(2)) Alert(.message("只有一句话").duration(2))
//
Alert("只有一句话")
} }
section.add(title: "标题 + 正文") { section.add(title: "标题 + 正文") {
let title = "这是标题" let title = "这是标题"

View File

@ -1,5 +1,5 @@
// //
// CapsuleVC.swift // DemoCapsuleVC.swift
// PHDemo // PHDemo
// //
// Created by xaoxuu on 2022/9/3. // Created by xaoxuu on 2022/9/3.
@ -8,7 +8,7 @@
import UIKit import UIKit
import ProHUD import ProHUD
class CapsuleVC: ListVC { class DemoCapsuleVC: ListVC {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()

View File

@ -1,5 +1,5 @@
// //
// SheetVC.swift // DemoSheetVC.swift
// PHDemo // PHDemo
// //
// Created by xaoxuu on 2022/9/3. // Created by xaoxuu on 2022/9/3.
@ -8,7 +8,7 @@
import UIKit import UIKit
import ProHUD import ProHUD
class SheetVC: ListVC { class DemoSheetVC: ListVC {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()

View File

@ -1,5 +1,5 @@
// //
// ToastVC.swift // DemoToastVC.swift
// PHDemo // PHDemo
// //
// Created by xaoxuu on 2022/9/3. // Created by xaoxuu on 2022/9/3.
@ -44,7 +44,7 @@ class TestToast: ToastProvider {
typealias Target = TestToastTarget typealias Target = TestToastTarget
} }
class ToastVC: ListVC { class DemoToastVC: ListVC {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()

View File

@ -16,6 +16,10 @@ open class AlertProvider: HUDProvider<AlertViewModel, AlertTarget> {
super.init(initializer: initializer) super.init(initializer: initializer)
} }
/// ViewModelTarget
/// - Parameters:
/// - vm:
/// - initializer:
@discardableResult public convenience init(_ vm: ViewModel, initializer: ((_ alert: Target) -> Void)?) { @discardableResult public convenience init(_ vm: ViewModel, initializer: ((_ alert: Target) -> Void)?) {
self.init { alert in self.init { alert in
alert.vm = vm alert.vm = vm
@ -28,11 +32,6 @@ open class AlertProvider: HUDProvider<AlertViewModel, AlertTarget> {
self.init(vm, initializer: nil) self.init(vm, initializer: nil)
} }
@discardableResult @objc public convenience init(_ text: String, duration: TimeInterval = 3) {
self.init(.message(text).duration(duration), initializer: nil)
}
/// HUD /// HUD
/// - Parameters: /// - Parameters:
/// - identifier: /// - identifier:

View File

@ -33,6 +33,8 @@ open class CapsuleProvider: HUDProvider<CapsuleViewModel, CapsuleTarget> {
self.init(vm, initializer: nil) self.init(vm, initializer: nil)
} }
/// Target
/// - Parameter text:
@discardableResult public convenience init(_ text: String) { @discardableResult public convenience init(_ text: String) {
self.init(.message(text), initializer: nil) self.init(.message(text), initializer: nil)
} }

View File

@ -16,6 +16,10 @@ open class ToastProvider: HUDProvider<ToastViewModel, ToastTarget> {
super.init(initializer: initializer) super.init(initializer: initializer)
} }
/// ViewModelTarget
/// - Parameters:
/// - vm:
/// - initializer:
@discardableResult public convenience init(_ vm: ViewModel, initializer: ((_ toast: Target) -> Void)?) { @discardableResult public convenience init(_ vm: ViewModel, initializer: ((_ toast: Target) -> Void)?) {
self.init { toast in self.init { toast in
toast.vm = vm toast.vm = vm
@ -29,6 +33,8 @@ open class ToastProvider: HUDProvider<ToastViewModel, ToastTarget> {
self.init(vm, initializer: nil) self.init(vm, initializer: nil)
} }
/// Target
/// - Parameter text:
@discardableResult @objc public convenience init(_ text: String) { @discardableResult @objc public convenience init(_ text: String) {
self.init(.message(text), initializer: nil) self.init(.message(text), initializer: nil)
} }