提交 4b595d93 编写于 作者: DCloud-yyl's avatar DCloud-yyl

开源:uni.showActionSheet、uni.showLoading、uni.showModal、uni.showToast、

上级 50845b46
{
"id": "uni-prompt",
"displayName": "uni-prompt",
"version": "1.0.0",
"description": "uni-prompt",
"keywords": [
"uni-prompt"
],
"repository": "",
"engines": {
"HBuilderX": "^3.6.8"
},
"dcloudext": {
"type": "uts",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "",
"data": "",
"permissions": ""
},
"npmurl": ""
},
"uni_modules": {
"uni-ext-api": {
"uni": {
"showToast": {
"name": "showToast",
"app": {
"js": false,
"kotlin": true,
"swift": true
}
},
"hideToast": {
"name": "hideToast",
"app": {
"js": false,
"kotlin": true,
"swift": true
}
},
"showLoading": {
"name": "showLoading",
"app": {
"js": false,
"kotlin": true,
"swift": true
}
},
"hideLoading": {
"name": "hideLoading",
"app": {
"js": false,
"kotlin": true,
"swift": true
}
},
"showModal": {
"name": "showModal",
"app": {
"js": false,
"kotlin": true,
"swift": true
}
},
"showActionSheet": {
"name": "showActionSheet",
"app": {
"js": false,
"kotlin": true,
"swift": true
}
}
}
},
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "u",
"aliyun": "u"
},
"client": {
"Vue": {
"vue2": "u",
"vue3": "u"
},
"App": {
"app-android": "u",
"app-ios": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}
# uni-prompt
### 开发文档
[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html)
[UTS API插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html)
[UTS 组件插件](https://uniapp.dcloud.net.cn/plugin/uts-component.html)
[Hello UTS](https://gitcode.net/dcloud/hello-uts)
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
package="io.dcloud.uts.prompt">
</manifest>
// import Context from 'android.content.Context';
import LayoutInflater from 'android.view.LayoutInflater';
import R from 'io.dcloud.uts.prompt.R';
import ViewGroup from 'android.view.ViewGroup';
import LinearLayout from 'android.widget.LinearLayout';
import Activity from 'android.app.Activity';
import TextView from 'android.widget.TextView';
import PopupWindow from 'android.widget.PopupWindow';
import Build from 'android.os.Build';
import Gravity from 'android.view.Gravity';
import Color from 'android.graphics.Color';
import Handler from 'android.os.Handler';
import Looper from 'android.os.Looper';
import string from 'android.R.string';
import View from 'android.view.View';
import MotionEvent from 'android.view.MotionEvent';
import JSONObject from 'com.alibaba.fastjson.JSONObject';
import ProgressBar from 'android.widget.ProgressBar';
import BitmapFactory from 'android.graphics.BitmapFactory';
import bool from 'android.R.bool';
import Bitmap from 'android.graphics.Bitmap';
import ImageView from 'android.widget.ImageView';
import { UTSAndroid } from "io.dcloud.uts";
import FileInputStream from 'java.io.FileInputStream';
import File from 'java.io.File';
import ByteArrayOutputStream from 'java.io.ByteArrayOutputStream';
import InputStream from 'java.io.InputStream';
import array from 'android.R.array';
import Dialog from 'android.app.Dialog';
export class WaitingView extends Dialog{
private context?: Activity
private style: JSONObject
private waitingView: ViewGroup
private waitingRootView: LinearLayout
private textView: TextView
private mProgressBar: ProgressBar
private seaparatorView: View
private mImageView: ImageView
private height: Int = -2
private width: Int = -2
private mask: boolean = false
private title: string = ""
screenWidth: Int
ScreenHeight: Int
density: number = 0
// json数据
private padding: Int = 0
private textSize: Int = 0
private loadingdDisplay = ""
private loadingHeight = 0
private LoadingIcon: string = ""
private mBitmap: Bitmap | null = null;
constructor(context?: Activity, style: UTSJSONObject) {
super(context!,R.style.loadingDialog);
this.context = context;
this.style = style.toJSONObject() as JSONObject
this.screenWidth = context?.getResources()?.getDisplayMetrics()!.widthPixels
this.ScreenHeight = context?.getResources()?.getDisplayMetrics()!.heightPixels
this.density = context?.getResources()?.getDisplayMetrics()!.density
this.waitingView = LayoutInflater.from(context).inflate(R.layout.dcloud_loadingview, null, false) as ViewGroup
this.waitingRootView = this.waitingView.findViewById<LinearLayout>(R.id.dcloud_pd_root)
this.mProgressBar = this.waitingView.findViewById<ProgressBar>(R.id.dcloud_pb_loading)
this.textView = this.waitingView.findViewById<TextView>(R.id.dcloud_tv_loading)
this.seaparatorView = this.waitingView.findViewById<View>(R.id.dcloud_view_seaparator)
this.mImageView = this.waitingView.findViewById<ImageView>(R.id.dcloud_iv_loading)
this.textView.setMaxLines(2)
this.handlerArguments()
let llp = (this.waitingRootView).getLayoutParams() as LinearLayout.LayoutParams
llp.width = this.width > 0 ? (this.width * this.density).toInt() : this.width
llp.height = -2
this.waitingRootView.setLayoutParams(llp)
this.initView()
this.makeBitmap()
setContentView(waitingView)
}
handlerArguments() {
if (this.style["height"] != null) {
this.height = parseInt(this.style["height"] as string).toInt()
}
if (this.style["width"] != null) {
this.width = parseInt(this.style["width"] as string).toInt()
}
if (this.style["modal"] != null) {
this.mask = this.style["modal"] as boolean
}
this.title = this.style.get("name") as string
if (this.style["loading"] != null) {
let loading = this.style["loading"] as JSONObject
this.loadingdDisplay = loading["display"] as string
if (loading["icon"] != null) {
this.LoadingIcon = loading["icon"] as string
}
if (loading["height"] != null) {
this.loadingHeight = parseInt(loading["height"] as string).toInt()
}
}
if ("block" == this.loadingdDisplay) {
this.waitingRootView.setOrientation(LinearLayout.VERTICAL)
} else if ("inline" == this.loadingdDisplay) {
this.waitingRootView.setOrientation(LinearLayout.HORIZONTAL)
} else if ("none" == this.loadingdDisplay) {
this.seaparatorView.setVisibility(View.GONE)
this.mProgressBar.setVisibility(View.GONE)
}
}
initView() {
// 初始化默认参数
// this.textView.setTextColor(0xffffffff)
this.textView.setTextColor(Color.WHITE)
this.textView.setGravity(Gravity.CENTER)
this.textView.setText(this.title)
this.textView.setTextSize(0, (16 * this.density).toFloat())
if(this.title.length < 1){
// 没有文本需要展示
this.textView.setVisibility(View.GONE)
this.waitingRootView.setPadding((10 * this.density).toInt(), (40 * this.density).toInt(), (10 * this.density).toInt(), (30 * this.density).toInt())
}else{
// 既有loading,也有文本
this.waitingRootView.setPadding((10 * this.density).toInt(), (20 * this.density).toInt(), (10 * this.density).toInt(), (20 * this.density).toInt())
}
let drawable = this.context?.getResources()!!.getDrawable(R.drawable.uts_dcloud_circle_white_progress)
if (this.loadingHeight > 0) {
this.mProgressBar.setLayoutParams(new LinearLayout.LayoutParams((this.loadingHeight * this.density).toInt(), (this.loadingHeight * this.density).toInt()))
} else {
let height = (drawable.getIntrinsicHeight() * 0.3).toInt()
this.mProgressBar.setLayoutParams(new LinearLayout.LayoutParams(height, height))
}
this.mProgressBar.setIndeterminateDrawable(drawable)
this.waitingRootView.setFocusable(true)
this.waitingRootView.setAlpha(0.9.toFloat())
}
override onTouchEvent(ev: MotionEvent): Boolean{
if(this.mask){
/**
* 明确说明了要遮罩 拦截
*/
return super.onTouchEvent(ev)
}
let event=MotionEvent.obtain(ev.downTime, ev.eventTime, ev.action,
ev.rawX, ev.rawY,
ev.pressure, ev.size, ev.metaState, ev.xPrecision, ev.yPrecision, ev.deviceId, ev.edgeFlags)
return passThrough(event)
}
/**
* 决定是否要透传点击事件
*/
passThrough(ev: MotionEvent): Boolean{
if(this.context == null){
return false
}
return this.context!.dispatchTouchEvent(ev)
}
showWaiting() {
this.setCanceledOnTouchOutside(false)
this.show()
}
close() {
this.dismiss()
if (this.mBitmap != null) {
this.mBitmap = null;
}
}
makeBitmap() {
if (this.LoadingIcon != null) {
// let mBitmap: Bitmap | null = null;
let imageBytes: ByteArray | null = null
if (this.LoadingIcon == "successIcon") {
imageBytes = this.inputStreamToArray(this.context?.getResources()!!.getAssets().open("uniappsuccess_icon.png"))
} else if (this.LoadingIcon == "errorIcon") {
imageBytes = this.inputStreamToArray(this.context?.getResources()!!.getAssets().open("uniapperror_icon.png"))
} else if (this.LoadingIcon.length > 0) {
let path: string = ""
if (this.LoadingIcon.startsWith("file://")) {
path = this.LoadingIcon.replace("file://", "")
} else {
path = UTSAndroid.getResourcePath(this.LoadingIcon)
}
if (path != null && path.length > 0) {
try {
let fis: FileInputStream = new FileInputStream(new File(path));
imageBytes = this.inputStreamToArray(fis);
fis.close()
} catch (e: Throwable) {
}
}
} else {
return
}
if (imageBytes == null || imageBytes.size == 0) {
return
}
let option = new BitmapFactory.Options()
option.inJustDecodeBounds = true
BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.size, option)
let width = option.outWidth
let height = option.outHeight
option.inSampleSize = this.getBestScale(height)
option.inJustDecodeBounds = false;
this.mBitmap = BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.size, option)
this.mProgressBar.setVisibility(View.GONE)
this.mImageView.setVisibility(View.VISIBLE)
this.mImageView.setImageBitmap(this.mBitmap)
if (width % height != 0) {
return
}
var lp: ViewGroup.LayoutParams = this.mImageView.getLayoutParams()
if (lp != null) {
if (this.loadingHeight > 0) {
lp.height = (this.loadingHeight * this.density).toInt()
lp.width = (this.loadingHeight * this.density).toInt()
} else {
lp.width = this.mBitmap!!.getHeight()
lp.height = this.mBitmap!!.getHeight()
}
this.mImageView.setLayoutParams(lp)
}
}
}
getBestScale(height: Int): Int {
let sampleSize: Int = 1;
let maxEdge = Math.min(this.screenWidth, this.ScreenHeight) - 10 * 2 * this.density
if (maxEdge > 0 && height > maxEdge) {
sampleSize = (height / maxEdge).toInt()
}
return sampleSize
}
inputStreamToArray(inputStream: InputStream): ByteArray | null {
try {
let bos: ByteArrayOutputStream = new ByteArrayOutputStream()
let bytes: ByteArray = new ByteArray(1024)
do {
let length = inputStream.read(bytes)
if (length != -1) {
bos.write(bytes, 0, length)
} else {
break
}
} while (true)
bos.close()
return bos.toByteArray()
} catch (e: Throwable) {
return null;
}
}
}
class MainThreadRunnable implements Runnable {
pop: PopupWindow
constructor(pop: PopupWindow) {
this.pop = pop
}
override run() {
this.pop.dismiss()
}
}
class WaitingDismissListener implements PopupWindow.OnDismissListener {
override onDismiss() {
}
}
class TouchInterceptorListener implements View.OnTouchListener {
interceptor: boolean
constructor(interceptor: boolean) {
this.interceptor = interceptor
}
override onTouch(v: View, event: MotionEvent): boolean {
return this.interceptor
}
}
\ No newline at end of file
{
"dependencies": [
"androidx.recyclerview:recyclerview:1.0.0",
"androidx.appcompat:appcompat:1.0.0"
]
}
import { ShowLoadingOptions,ShowLoading,HideLoading} from "../interface.uts"
import { ShowToastOptions,ShowToast,HideToast} from "../interface.uts"
import { ShowActionSheetOptions,ShowActionSheet} from "../interface.uts"
import { ShowModalOptions,ShowModal} from "../interface.uts"
import * as ToastModule from "./showToast.uts"
import * as ModalModule from "./showModal.uts"
import * as ActionSheetModule from "./showActionSheet.uts"
import UTSAndroid from 'io.dcloud.uts.UTSAndroid';
export const showToast : ShowToast = function (options : ShowToastOptions) {
// 指定在ui线程执行
UTSAndroid.dispatchAsync('main',function(res){
ToastModule.showToastImpl(options)
},null)
}
export const hideToast : HideToast = function () {
UTSAndroid.dispatchAsync('main',function(res){
ToastModule.hideToastImpl()
},null)
}
export const showLoading : ShowLoading = function (options : ShowLoadingOptions) {
UTSAndroid.dispatchAsync('main',function(res){
ToastModule.showLoadingImpl(options)
},null)
}
export const hideLoading : HideLoading = function () {
UTSAndroid.dispatchAsync('main',function(res){
ToastModule.hideLoadingImpl()
},null)
}
export const showModal : ShowModal = function (options : ShowModalOptions) {
UTSAndroid.dispatchAsync('main',function(res){
ModalModule.showModalImpl(options)
},null)
}
export const showActionSheet : ShowActionSheet = function (options : ShowActionSheetOptions) {
UTSAndroid.dispatchAsync('main',function(res){
ActionSheetModule.actionSheetImpl(options)
},null)
}
<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="200"
android:fromYDelta="100%p" />
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="200"
android:toYDelta="100%p" />
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF" />
<corners
android:topLeftRadius="12dp" android:topRightRadius="12dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#272727" />
<corners
android:topLeftRadius="12dp" android:topRightRadius="12dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape
android:shape="rectangle">
<solid android:color="#efefef" />
</shape>
</item>
<item android:state_focused="true" >
<shape
android:shape="rectangle">
<solid android:color="#efefef" />
</shape>
</item>
<item >
<shape
android:shape="rectangle">
<solid android:color="#FFFFFF" />
</shape>
</item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape
android:shape="rectangle">
<solid android:color="#363636" />
</shape>
</item>
<item android:state_focused="true" >
<shape
android:shape="rectangle">
<solid android:color="#363636" />
</shape>
</item>
<item >
<shape
android:shape="rectangle">
<solid android:color="#272727" />
</shape>
</item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape
android:shape="rectangle">
<solid android:color="#363636" />
<corners
android:topLeftRadius="12dp" android:topRightRadius="12dp" />
</shape>
</item>
<item android:state_focused="true" >
<shape
android:shape="rectangle">
<solid android:color="#363636" />
<corners
android:topLeftRadius="12dp" android:topRightRadius="12dp" />
</shape>
</item>
<item >
<shape
android:shape="rectangle">
<solid android:color="#272727" />
<corners
android:topLeftRadius="12dp" android:topRightRadius="12dp" />
</shape>
</item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape
android:shape="rectangle">
<solid android:color="#efefef" />
<corners
android:topLeftRadius="12dp" android:topRightRadius="12dp" />
</shape>
</item>
<item android:state_focused="true" >
<shape
android:shape="rectangle">
<solid android:color="#efefef" />
<corners
android:topLeftRadius="12dp" android:topRightRadius="12dp" />
</shape>
</item>
<item >
<shape
android:shape="rectangle">
<solid android:color="#FFFFFF" />
<corners
android:topLeftRadius="12dp" android:topRightRadius="12dp" />
</shape>
</item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="10dip" >
</corners>
<solid android:color="#4c4c4c" >
</solid>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF" />
<stroke
android:width="3dp"
android:color="#ffffff" />
<corners android:radius="8dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#272727" />
<stroke
android:width="3dp"
android:color="#272727" />
<corners android:radius="8dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/shape_btn_bg_select_left" />
<item android:state_focused="true" android:drawable="@drawable/shape_btn_bg_select_left" />
<item android:drawable="@drawable/shape_btn_bg_normal_left"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/shape_btn_bg_select_left_night" />
<item android:state_focused="true" android:drawable="@drawable/shape_btn_bg_select_left_night" />
<item android:drawable="@drawable/shape_btn_bg_normal_left_night"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/shape_btn_bg_select_right" />
<item android:state_focused="true" android:drawable="@drawable/shape_btn_bg_select_right" />
<item android:drawable="@drawable/shape_btn_bg_normal_right"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/shape_btn_bg_select_right_night" />
<item android:state_focused="true" android:drawable="@drawable/shape_btn_bg_select_right_night" />
<item android:drawable="@drawable/shape_btn_bg_normal_right_night"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/shape_btn_bg_select_total" />
<item android:state_focused="true" android:drawable="@drawable/shape_btn_bg_select_total" />
<item android:drawable="@drawable/shape_btn_bg_normal_total"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/shape_btn_bg_select_total_night" />
<item android:state_focused="true" android:drawable="@drawable/shape_btn_bg_select_total_night" />
<item android:drawable="@drawable/shape_btn_bg_normal_total_night"/>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="#FFFFFF" />
<corners
android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomRightRadius="0dp"
android:bottomLeftRadius="8dp"
/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="#272727" />
<corners
android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomRightRadius="0dp"
android:bottomLeftRadius="8dp"
/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="#FFFFFF" />
<corners
android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomRightRadius="8dp"
android:bottomLeftRadius="0dp"
/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="#272727" />
<corners
android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomRightRadius="8dp"
android:bottomLeftRadius="0dp"
/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="#FFFFFF" />
<corners
android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomRightRadius="8dp"
android:bottomLeftRadius="8dp"
/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="#272727" />
<corners
android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomRightRadius="8dp"
android:bottomLeftRadius="8dp"
/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="#efefef" />
<corners
android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomRightRadius="0dp"
android:bottomLeftRadius="8dp"
/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="#1C1C1C" />
<corners
android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomRightRadius="0dp"
android:bottomLeftRadius="8dp"
/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="#efefef" />
<corners
android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomRightRadius="8dp"
android:bottomLeftRadius="0dp"
/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="#1C1C1C" />
<corners
android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomRightRadius="8dp"
android:bottomLeftRadius="0dp"
/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="#efefef" />
<corners
android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomRightRadius="8dp"
android:bottomLeftRadius="8dp"
/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="#1C1C1C" />
<corners
android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomRightRadius="8dp"
android:bottomLeftRadius="8dp"
/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:pivotX="50%"
android:pivotY="50%"
android:fromDegrees="0"
android:toDegrees="360">
<shape
android:shape="ring"
android:innerRadiusRatio="3"
android:thicknessRatio="12"
android:useLevel="false">
<size
android:width="120dip"
android:height="120dip" />
<gradient
android:type="sweep"
android:useLevel="false"
android:startColor="#EDEDED"
android:endColor="#00ffffff"
android:angle="0"/>
</shape>
</rotate>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/root_layout"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/line_bottom"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="@color/night_bg_hair_line"
android:orientation="vertical" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="17dp"
android:gravity="center"
android:textColor="@color/dialog_title_text"
android:background="@drawable/actionsheet_button_select_total"
android:textSize="16dp" />
</androidx.appcompat.widget.LinearLayoutCompat>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/root_layout"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/line_bottom"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:background="@color/night_bg_hair_line_night"
android:orientation="vertical" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="17dp"
android:gravity="center"
android:textColor="@color/dialog_title_text_night"
android:background="@drawable/actionsheet_button_select_total_night"
android:textSize="16dp" />
</androidx.appcompat.widget.LinearLayoutCompat>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/line_bottom"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/night_bg_hair_line"
android:orientation="vertical" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="17dp"
android:textColor="@color/dialog_title_text"
android:background="@drawable/actionsheet_button_select_total_top"
android:textSize="16dp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/line_bottom"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/night_bg_hair_line_night"
android:orientation="vertical" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/actionsheet_button_select_total_night_top"
android:gravity="center"
android:padding="17dp"
android:textColor="@color/dialog_title_text_night"
android:textSize="16dp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center">
<LinearLayout
android:id="@+id/dcloud_pd_root"
android:layout_width="wrap_content"
android:background="@drawable/dcloud_loading_bg"
android:gravity="center"
android:orientation="vertical"
android:layout_height="wrap_content">
<ProgressBar
android:id="@+id/dcloud_pb_loading"
android:layout_width="wrap_content"
android:minWidth="3dp"
android:minHeight="3dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:indeterminateDuration="1000"/>
<ImageView
android:id="@+id/dcloud_iv_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:visibility="gone" />
<View
android:id="@+id/dcloud_view_seaparator"
android:layout_width="10dp"
android:layout_height="10dp"/>
<TextView
android:id="@+id/dcloud_tv_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:paddingTop="30dp"
android:background="@drawable/dialog_bg_rounded"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_title"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/dialog_title_text"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:gravity="center"
/>
<TextView
android:id="@+id/tv_content"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="30dp"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:textColor="@color/dialog_sub_text"
android:gravity="center"
android:textSize="16sp"
/>
<EditText
android:id="@+id/et_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="30dp"
android:layout_height="wrap_content"
android:minLines="1"
android:maxLines="2"
android:padding="6dp"
android:visibility="gone"
android:background="@color/dialog_edit_text_bg"
android:layout_width="match_parent"
android:textColor="@color/dialog_edit_text_color"
android:textColorHint="@color/dialog_edit_text_hint"
android:gravity="left|center_vertical"
android:textSize="16sp"
/>
</LinearLayout>
<View
android:id="@+id/view_split_line_h"
android:layout_below="@+id/tv_content"
android:layout_width="match_parent"
android:background="@color/night_bg_hair_line"
android:layout_height="0.5dp"/>
<LinearLayout
android:id="@+id/line_cancel"
android:layout_width="match_parent"
android:layout_below="@+id/view_split_line_h"
android:layout_height="50dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tvCancelAction"
android:layout_width="0dp"
android:layout_height="50dp"
android:gravity="center"
android:layout_weight="1"
android:text="@string/prompt_model_cancel"
android:clickable="true"
android:background="@drawable/dialog_button_select_left"
android:textColor="@color/button_cancel_text_color"
android:textStyle="bold"
android:textSize="16sp" />
<View
android:id="@+id/view_split_line_v"
android:layout_width="0.5dp"
android:background="@color/night_bg_split"
android:layout_height="match_parent"/>
<TextView
android:id="@+id/tvSureAction"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/prompt_model_sure"
android:clickable="true"
android:background="@drawable/dialog_button_select_right"
android:textColor="@color/button_sure_text_color"
android:textStyle="bold"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout >
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:paddingTop="30dp"
android:background="@drawable/dialog_bg_rounded_night"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_title"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/dialog_title_text_night"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:gravity="center"
/>
<TextView
android:id="@+id/tv_content"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="30dp"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:textColor="@color/dialog_sub_text_night"
android:gravity="center"
android:textSize="16sp"
/>
<EditText
android:id="@+id/et_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_marginBottom="30dp"
android:layout_height="wrap_content"
android:minLines="1"
android:maxLines="2"
android:padding="6dp"
android:visibility="gone"
android:background="@color/dialog_edit_text_bg_night"
android:layout_width="match_parent"
android:textColor="@color/dialog_edit_text_color_night"
android:textColorHint="@color/dialog_edit_text_hint_night"
android:gravity="left|center_vertical"
android:textSize="16sp"
/>
</LinearLayout>
<View
android:id="@+id/view_split_line_h"
android:layout_below="@+id/tv_content"
android:layout_width="match_parent"
android:background="@color/night_bg_hair_line_night"
android:layout_height="0.5dp"/>
<LinearLayout
android:id="@+id/line_cancel"
android:layout_width="match_parent"
android:layout_below="@+id/view_split_line_h"
android:layout_height="50dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tvCancelAction"
android:layout_width="0dp"
android:layout_height="50dp"
android:gravity="center"
android:layout_weight="1"
android:text="@string/prompt_model_cancel"
android:clickable="true"
android:background="@drawable/dialog_button_select_left_night"
android:textColor="@color/button_cancel_text_color_night"
android:textStyle="bold"
android:textSize="16sp" />
<View
android:id="@+id/view_split_line_v"
android:layout_width="0.5dp"
android:background="@color/night_bg_split_night"
android:layout_height="match_parent"/>
<TextView
android:id="@+id/tvSureAction"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_weight="1"
android:gravity="center"
android:text="@string/prompt_model_sure"
android:clickable="true"
android:background="@drawable/dialog_button_select_right_night"
android:textColor="@color/button_sure_text_color_night"
android:textStyle="bold"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout >
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/line_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/line_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/actionsheet_bg_rounded"
android:orientation="vertical"
android:visibility="gone">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:gravity="center"
android:ellipsize="middle"
android:singleLine="true"
android:textColor="@color/dialog_sub_text"
android:textSize="14dp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/myRecyclerview"
android:overScrollMode="never"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="8dp"
android:background="#f7f7f7" />
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/line_cancel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/light_bg_main"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvCancelAction"
android:layout_width="match_parent"
android:layout_height="56dp"
android:gravity="center"
android:text="@string/cancel"
android:textColor="@color/dialog_title_text"
android:clickable="true"
android:background="@drawable/actionsheet_button_select_total"
android:textSize="16dp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/line_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/line_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/actionsheet_bg_rounded_night"
android:orientation="vertical"
android:visibility="gone">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:gravity="center"
android:ellipsize="middle"
android:singleLine="true"
android:textColor="@color/dialog_sub_text_night"
android:textSize="14dp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/myRecyclerview"
android:overScrollMode="never"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="8dp"
android:background="#1e1e1e" />
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/line_cancel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/night_bg_main"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvCancelAction"
android:layout_width="match_parent"
android:layout_height="56dp"
android:gravity="center"
android:text="@string/cancel"
android:clickable="true"
android:background="@drawable/actionsheet_button_select_total_night"
android:textColor="@color/dialog_title_text_night"
android:textSize="16dp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
\ No newline at end of file
<resources>
<string name="placement">Configuration</string>
<string name="cancel">取消</string>
<string name="prompt_model_sure">确定</string>
<string name="prompt_model_cancel">取消</string>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--primary color-->
<color name="white">#FFFFFF</color>
<color name="light_gray">#efefef</color>
<color name="light_bg">#DEDEDE</color>
<color name="light_bg_main">#FFFFFF</color>
<color name="night_bg">#1C1C1C</color>
<color name="night_bg_main">#272727</color>
<!--title-->
<color name="dialog_title_text">#000000</color>
<color name="dialog_title_text_night">#CFCFCF</color>
<!--sub title-->
<color name="dialog_sub_text">#747474</color>
<color name="dialog_sub_text_night">#909090</color>
<!--input background-->
<color name="dialog_edit_text_bg">#F6F6F6</color>
<color name="dialog_edit_text_bg_night">#3d3d3d</color>
<!--input text color-->
<color name="dialog_edit_text_color">#000000</color>
<color name="dialog_edit_text_color_night">#CFCFCF</color>
<!--input test hint-->
<color name="dialog_edit_text_hint">#808080</color>
<color name="dialog_edit_text_hint_night">#CFCFCF</color>
<!--row line-->
<color name="night_bg_hair_line">#E0E0E0</color>
<color name="night_bg_hair_line_night">#303030</color>
<!--column line-->
<color name="night_bg_split">#E3E3E3</color>
<color name="night_bg_split_night">#303030</color>
<!--sure button text-->
<color name="button_sure_text_color">#4A5E86</color>
<color name="button_sure_text_color_night">#7388a2</color>
<!--cancel button text-->
<color name="button_cancel_text_color">#000000</color>
<color name="button_cancel_text_color_night">#a5a5a5</color>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="placement">Configuration</string>
<string name="cancel">Cancel</string>
<string name="prompt_model_sure">Sure</string>
<string name="prompt_model_cancel">Cancel</string>
</resources>
\ No newline at end of file
<resources>
<style name="DialogAnimations" />
<style name="DialogAnimations.utsSmileWindow">
<item name="android:windowEnterAnimation">@anim/uts_as_slide_in_bottom</item>
<item name="android:windowExitAnimation">@anim/uts_as_slide_out_top</item>
</style>
<style name="actionsheetDialog" parent="android:style/Theme.Dialog">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFrame">@null</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">true</item>
</style>
<style name="loadingDialog" parent="android:style/Theme.Dialog">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFrame">@null</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:backgroundDimEnabled">false</item>
</style>
</resources>
import AlertDialog from 'android.app.AlertDialog';
import Dialog from 'android.app.Dialog';
import Activity from 'android.app.Activity';
import Gravity from 'android.view.Gravity';
import { UTSAndroid } from "io.dcloud.uts";
import ViewGroup from 'android.view.ViewGroup';
import View from 'android.view.View';
import Color from 'android.graphics.Color';
import ColorDrawable from 'android.graphics.drawable.ColorDrawable';
import R from 'io.dcloud.uts.prompt.R';
import TextView from 'android.widget.TextView';
import LayoutInflater from 'android.view.LayoutInflater';
import AppCompatTextView from 'androidx.appcompat.widget.AppCompatTextView';
import LinearLayoutCompat from 'androidx.appcompat.widget.LinearLayoutCompat';
import LinearLayoutManager from 'androidx.recyclerview.widget.LinearLayoutManager';
import RecyclerView from 'androidx.recyclerview.widget.RecyclerView';
import { ShowActionSheetOptions, ShowActionSheetSuccess,ShowActionSheetFail} from '../interface.uts'
import string from 'android.R.string';
import WindowManager from 'android.view.WindowManager';
let uniActionSheet:UniActionSheet|null = null
/**
* 弹出功能入口
*/
export function actionSheetImpl(style: ShowActionSheetOptions) {
/**
* 参数校验,itemList 不能为空
*/
if(style.itemList == null || style.itemList.length < 1){
let res = new UniError("uni-prompt",-1,"showActionSheet:fail parameter error: parameter.itemList should have at least 1 item");
style.fail?.(res)
style.complete?.(res)
return ;
}
/**
* 元素个数不能超过6个
*/
if(style.itemList.size > 6){
let res = new UniError("uni-prompt",-2,"showActionSheet:fail parameter error: itemList should not be large than 6");
style.fail?.(res)
style.complete?.(res)
return ;
}
if(uniActionSheet != null){
uniActionSheet?.dismiss()
}
uniActionSheet = new UniActionSheet(UTSAndroid.getUniActivity()!, style)
uniActionSheet?.show()
UTSAndroid.onAppActivityDestroy(function(){
uniActionSheet?.dismiss()
uniActionSheet = null
})
}
/**
* UniActionSheet
* 功能实现
*/
export class UniActionSheet extends Dialog{
/**
* 宿主activity
*/
hostActivity: Activity
/**
* 宿主样式
*/
hostStyle:ShowActionSheetOptions
/**
* 标题组件
*/
title: AppCompatTextView
/**
* 取消按钮
*/
cancel: AppCompatTextView
/**
* 列表 recycler
*/
myRecyclerView: RecyclerView
/**
* title 组件
*/
lineTitle: LinearLayoutCompat
/**
* 内容组件
*/
lineContent: LinearLayoutCompat
/**
* 取消组件
*/
lineCancel: LinearLayoutCompat
constructor(activity: Activity, style: ShowActionSheetOptions) {
super(activity,R.style.actionsheetDialog);
this.hostActivity = activity
this.hostStyle = style
/**
* 适配暗黑模式,配置不同的布局文件
*/
if(UTSAndroid.getAppDarkMode()){
setContentView(R.layout.uts_action_sheet_night)
}else{
setContentView(R.layout.uts_action_sheet)
}
this.title = findViewById(R.id.tvTitle)
this.cancel = findViewById(R.id.tvCancelAction)
this.lineTitle = findViewById(R.id.line_title)
this.lineContent = findViewById(R.id.line_content)
this.lineCancel = findViewById(R.id.line_cancel)
this.myRecyclerView = findViewById(R.id.myRecyclerview)
this.myRecyclerView.layoutManager = LinearLayoutManager(this.hostActivity)
this.cancel.setOnClickListener(new CancelClickListener(this,this.hostStyle));
let recyclerviewAdapter = new ItemAdapter(this,this.hostStyle)
this.myRecyclerView.adapter = recyclerviewAdapter
if(!style.title.isNullOrBlank()){
this.lineTitle.setVisibility(View.VISIBLE)
this.title.setText(style.title)
}
if(this.window != null){
this.window!.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT)
this.window!.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM);
if(this.window!.attributes != null){
this.window!.attributes!.windowAnimations = R.style.DialogAnimations_utsSmileWindow;
}
}
}
}
/**
* 列表选项点击事件监听
*/
class ItemClickListener extends View.OnClickListener{
host:Dialog
hostStyle:ShowActionSheetOptions
hostIndex:number
constructor(dialog:Dialog,style: ShowActionSheetOptions,index:number){
super()
this.host = dialog
this.hostStyle = style
this.hostIndex = index
}
override onClick(v?: View):void{
const res : ShowActionSheetSuccess = {
tapIndex: this.hostIndex
}
this.hostStyle.success?.(res)
this.hostStyle.complete?.(res)
this.host.dismiss()
}
}
/**
* 取消按钮点击事件
*/
class CancelClickListener extends View.OnClickListener{
host:Dialog
hostStyle:ShowActionSheetOptions
constructor(dialog:Dialog,style: ShowActionSheetOptions){
super()
this.host = dialog
this.hostStyle = style
}
override onClick(v?: View):void{
let res = new UniError("uni-prompt",1002,"showActionSheet:fail cancel");
this.hostStyle.fail?.(res)
this.hostStyle.complete?.(res)
this.host.dismiss()
}
}
/**
* 列表数据适配器
*/
class ItemAdapter extends RecyclerView.Adapter<ItemAdapter.ViewHolder>{
mItemList: Array<String>
hostStyle:ShowActionSheetOptions
hostDialog:Dialog
constructor(dialog:Dialog ,style: ShowActionSheetOptions){
super()
this.hostDialog = dialog
this.mItemList = style.itemList
this.hostStyle = style
}
/**
* view 持有容器
*/
ViewHolder = class extends RecyclerView.ViewHolder {
itemName:TextView;
constructor(view:View) {
super(view);
itemName = view.findViewById(R.id.tvName) as TextView;
}
}
override getItemViewType(position: Int): Int {
if(hostStyle.title.isNullOrBlank()){
// 无标题状态
if(position == 0){
return 1001
}
return 1002
}else{
// 有标题状态
return 1002
}
}
override onCreateViewHolder(
parent: ViewGroup,
viewType: Int
): ViewHolder {
let view: View
if(viewType == 1002){
if(UTSAndroid.getAppDarkMode()){
view =
LayoutInflater.from(parent.context).inflate(R.layout.ac_recyclerview_layout_night, parent, false)
}else{
view =
LayoutInflater.from(parent.context).inflate(R.layout.ac_recyclerview_layout, parent, false)
}
}else{
if(UTSAndroid.getAppDarkMode()){
view =
LayoutInflater.from(parent.context).inflate(R.layout.ac_recyclerview_layout_top_night, parent, false)
}else{
view =
LayoutInflater.from(parent.context).inflate(R.layout.ac_recyclerview_layout_top, parent, false)
}
}
return ViewHolder(view)
}
override onBindViewHolder(holder: ViewHolder, position: Int) {
let perContent: String = mItemList[position]
holder.itemName.setText(perContent)
if(this.hostStyle.itemColor != null && isValidColor(this.hostStyle.itemColor)){
holder.itemName.setTextColor(Color.parseColor(this.hostStyle.itemColor))
}
holder.itemName.setOnClickListener(new ItemClickListener(this.hostDialog,this.hostStyle,position));
}
override getItemCount(): Int {
return mItemList.size
}
}
/**
* 工具方法,判断一个color 字符串是否合法
*/
function isValidColor(colorStr?:string):boolean{
if(colorStr == null){
return false
}
if(colorStr.length != 7){
return false
}
if(!colorStr.startsWith("#")){
return false
}
return true
}
import Dialog from 'android.app.Dialog';
import Context from 'android.content.Context';
import R from 'io.dcloud.uts.prompt.R';
import TextView from 'android.widget.TextView';
import EditText from 'android.widget.EditText';
import View from 'android.view.View';
import Color from 'android.graphics.Color';
import UTSAndroid from 'io.dcloud.uts.UTSAndroid';
import Typeface from 'android.graphics.Typeface';
import { ShowModalOptions,ShowModalSuccess,ShowModalFail} from '../interface.uts'
import TextUtils from 'android.text.TextUtils';
class UTSDialog extends Dialog implements View.OnClickListener {
tv_title:TextView
tv_content:TextView
et_content:EditText
tvCancelAction:TextView
tvSureAction:TextView
view_split_line_v:View
constructor(context:Context){
super(context);
if(UTSAndroid.getAppDarkMode()){
this.setContentView(R.layout.modal_dialog_night);
}else{
this.setContentView(R.layout.modal_dialog);
}
this.getWindow()?.setBackgroundDrawableResource(android.R.color.transparent);
this.tv_title = this.findViewById<TextView>(R.id.tv_title)
this.tv_content = this.findViewById<TextView>(R.id.tv_content)
this.et_content = this.findViewById<EditText>(R.id.et_content)
this.tvCancelAction= this.findViewById<TextView>(R.id.tvCancelAction)
this.tvSureAction= this.findViewById<TextView>(R.id.tvSureAction)
this.view_split_line_v = findViewById(R.id.view_split_line_v)
}
hostStyle:ShowModalOptions|null = null
initStyle(style:ShowModalOptions){
this.hostStyle = style
this.setCanceledOnTouchOutside(false)
if(style.showCancel != null && style.showCancel == true){
this.tvCancelAction.setVisibility(View.VISIBLE)
this.view_split_line_v.setVisibility(View.VISIBLE)
this.tvSureAction.setVisibility(View.VISIBLE)
if(UTSAndroid.getAppDarkMode()){
this.tvSureAction.setBackgroundResource(R.drawable.dialog_button_select_right_night)
}else{
this.tvSureAction.setBackgroundResource(R.drawable.dialog_button_select_right)
}
}else{
this.tvCancelAction.setVisibility(View.GONE)
this.view_split_line_v.setVisibility(View.GONE)
this.tvSureAction.setVisibility(View.VISIBLE)
if(UTSAndroid.getAppDarkMode()){
this.tvSureAction.setBackgroundResource(R.drawable.dialog_button_select_total_night)
}else{
this.tvSureAction.setBackgroundResource(R.drawable.dialog_button_select_total)
}
}
if(style.editable != null && style.editable == true){
// 编辑模式
this.et_content.setVisibility(View.VISIBLE)
this.tv_content.setVisibility(View.GONE)
if(!TextUtils.isEmpty(style.content)){
this.et_content.setFocusable(true);
this.et_content.setFocusableInTouchMode(true);
this.et_content.requestFocus();
this.et_content.setText(style.content)
this.et_content.setSelection(this.et_content.getText().length);
}
if(style.placeholderText != null){
this.et_content.setHint(style.placeholderText)
}
if(!TextUtils.isEmpty(style.title)){
this.tv_title.setVisibility(View.VISIBLE)
this.tv_title.setText(style.title)
}else{
this.tv_title.setVisibility(View.GONE)
}
}else{
// 非编辑模式
this.et_content.setVisibility(View.GONE)
if(!TextUtils.isEmpty(style.title)){
// title 不为空
this.tv_title.setVisibility(View.VISIBLE)
this.tv_title.setText(style.title)
}else{
this.tv_title.setVisibility(View.GONE)
}
if(!TextUtils.isEmpty(style.content)){
// content 不为空
this.tv_content.setVisibility(View.VISIBLE)
this.tv_content.setText(style.content)
if(TextUtils.isEmpty(style.title)){
// 如果此时title 为空,需要修改文本颜色
if(UTSAndroid.getAppDarkMode()){
this.tv_content.setTextColor(UTSAndroid.getAppContext()!.getResources().getColor(R.color.dialog_title_text_night))
}else{
this.tv_content.setTextColor(UTSAndroid.getAppContext()!.getResources().getColor(R.color.dialog_title_text))
}
}
}else{
// 判断title 是否为空,如果不为空,则将title填充到content,并且修改文本颜色
if(!TextUtils.isEmpty(style.title)){
this.tv_title.setVisibility(View.GONE)
this.tv_content.setVisibility(View.VISIBLE)
this.tv_content.setText(style.title)
if(UTSAndroid.getAppDarkMode()){
this.tv_content.setTextColor(UTSAndroid.getAppContext()!.getResources().getColor(R.color.dialog_title_text_night))
}else{
this.tv_content.setTextColor(UTSAndroid.getAppContext()!.getResources().getColor(R.color.dialog_title_text))
}
}else{
this.tv_content.setVisibility(View.GONE)
}
}
}
if(style.cancelText != null){
this.tvCancelAction.setText(style.cancelText)
}
if(style.cancelColor != null){
try{
this.tvCancelAction.setTextColor(Color.parseColor(style.cancelColor))
}catch(e){
// 传入的格式异常,捕获
}
}
if(style.confirmText != null){
this.tvSureAction.setText(style.confirmText)
}
if(style.confirmColor != null){
try{
this.tvSureAction.setTextColor(Color.parseColor(style.confirmColor))
}catch(e){
// 传入的格式异常,捕获
}
}
this.tvCancelAction.setOnClickListener(this)
this.tvSureAction.setOnClickListener(this)
}
override onClick(view: View) {
const res: ShowModalSuccess = {
confirm: true,
cancel: false,
}
if(view.getId() == R.id.tvCancelAction){
// 取消
res.confirm = false
res.cancel = true
}else if(view.getId() == R.id.tvSureAction){
// 确定
let inputContent = this.et_content.getEditableText().toString()
if(TextUtils.isEmpty(inputContent)){
res.content = null
}
res.content = inputContent
}
this.hostStyle?.success?.(res)
this.hostStyle?.complete?.(res)
this.dismiss()
}
}
let utsDialog:UTSDialog|null = null
/**
* 弹出对话框的功能入口
*/
export function showModalImpl(style:ShowModalOptions){
if(utsDialog != null){
utsDialog?.dismiss()
}
utsDialog = new UTSDialog(UTSAndroid.getUniActivity()!);
utsDialog?.initStyle(style)
utsDialog?.show();
UTSAndroid.onAppActivityDestroy(function(){
utsDialog?.dismiss()
utsDialog = null
})
}
\ No newline at end of file
import { getUniActivity } from "io.dcloud.uts.android";
import Gravity from 'android.view.Gravity';
import Toast from "android.widget.Toast";
import { WaitingView } from "./WaitingView.uts"
import { ShowToastOptions, ShowLoadingOptions, ShowToastFail,ShowToastSuccess, ShowLoadingFail,ShowLoadingSuccess } from '../interface.uts'
type ToastStyle = {
title : string,
icon ?: string,
image ?: string,
mask ?: boolean,
duration ?: number,
position ?: string,
style ?: string,
success ?: (res : UTSJSONObject) => void,
fail ?: (res : UTSJSONObject) => void,
complete ?: (res : UTSJSONObject) => void
}
let timeout : number | null = null
let toast : WaitingView | null = null
let toastType : string | null = null
export function showToastImpl(style : ShowToastOptions) {
makeToast(style, 'toast', 'showToast')
}
export function hideToastImpl() {
closeToast("toast")
}
export function showLoadingImpl(option : ShowLoadingOptions) {
makeLoading(option, 'loading', 'showLoading')
}
export function hideLoadingImpl() {
closeToast("loading")
}
function closeToast(type : string | null) {
if (type != null && type !== toastType) {
return
}
if (timeout != null && (timeout as number) > 0) {
clearTimeout(timeout as number)
timeout = null
}
if (toast != null) {
(toast as WaitingView).close()
toast = null
}
if (toast != null) {
(toast as WaitingView).close()
toast = null
}
if (androidToast != null) {
androidToast!.cancel()
androidToast = null
}
toastType = null
}
function makeLoading(style : ShowLoadingOptions, type : string, errMsg : string) {
// 关闭之前的展示框
closeToast(null)
if (style.title == null) {
// 没有title 打回报错信息即可
let res = new UniError("uni-prompt",1001,"showLoading:title is null");
style.fail?.(res)
style.complete?.(res)
} else {
toastType = type
let options = {};
let icon = "success"
options = {
name: style.title,
modal: style.mask,
back: 'transmit',
padding: '10',
size: '16' // 固定字体大小
}
options["width"] = "140"
options["height"] = "112"
const alert = new WaitingView(getUniActivity(), options)
toast = alert
alert.showWaiting()
const res : ShowLoadingSuccess = {
}
style.success?.(res)
style.complete?.(res)
}
}
let androidToast:Toast| null = null
function makeToast(style : ShowToastOptions, type : string, errMsg : string) {
closeToast(null)
if (style.title == null || style.title.length == 0) {
let res = new UniError("uni-prompt",1001,"showLoading:title is null");
style.fail?.(res)
style.complete?.(res)
} else {
toastType = type
if (["top", "center", "bottom"].indexOf(style.position) >= 0) {
androidToast = Toast.makeText(getUniActivity(), style.title, Toast.LENGTH_SHORT);
switch (style.position) {
case "top": {
// 修复bottom/top 与 前端api位置不一致的问题
androidToast!.setGravity(Gravity.TOP, androidToast!.getXOffset(), androidToast!.getYOffset())
break
}
case "center": {
androidToast!.setGravity(Gravity.CENTER, 0, 0)
break
}
case "bottom": {
androidToast!.setGravity(Gravity.BOTTOM, androidToast!.getXOffset(), androidToast!.getYOffset())
break
}
}
androidToast!.show()
const res : ShowToastSuccess = {
}
style.success?.(res)
style.complete?.(res)
} else {
let options = {};
let icon = style.icon
if (icon == null || ["success", "loading", "error", "none"].indexOf(icon) < 0) {
icon = "success"
}
options = {
name: style.title,
modal: style.mask,
back: 'transmit',
padding: '10',
size: '16' // 固定字体大小
}
if ((style.image == null || style.image == '') && icon == "none") {
options["loading"] = {
display: "none"
}
} else {
options["width"] = "140"
options["height"] = "112"
}
if (style.image != null && style.image != '') {
options["loading"] = {
display: "block",
height: "55",
icon: style.image
}
} else {
if (['success', 'error'].indexOf(icon) >= 0) {
options["loading"] = {
display: 'block',
height: '36',
icon: icon == "success" ? "successIcon" : "errorIcon"
}
}
}
const alert = new WaitingView(getUniActivity(), options)
toast = alert
alert.showWaiting()
let duration : number | null = style.duration
if (duration == null || duration <= 0) {
duration = 1500
}
if (type !== "loading") {
timeout = setTimeout(() => {
alert.close()
}, duration)
}
const res : ShowToastSuccess = {
}
style.success?.(res)
style.complete?.(res)
}
}
}
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
#ifndef DCUNITOAST_SWIFT_H
#define DCUNITOAST_SWIFT_H
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if __has_attribute(ns_consumed)
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
#else
# define SWIFT_RELEASES_ARGUMENT
#endif
#if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
#else
# define SWIFT_NORETURN
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import ObjectiveC;
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="DCUniToast",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
SWIFT_CLASS("_TtC10DCUniToast7MCToast")
@interface MCToast : NSObject
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
SWIFT_CLASS("_TtC10DCUniToast13MCToastConfig")
@interface MCToastConfig : NSObject
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
#elif defined(__ARM_ARCH_7A__) && __ARM_ARCH_7A__
// Generated by Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
#ifndef DCUNITOAST_SWIFT_H
#define DCUNITOAST_SWIFT_H
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgcc-compat"
#if !defined(__has_include)
# define __has_include(x) 0
#endif
#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif
#if !defined(__has_feature)
# define __has_feature(x) 0
#endif
#if !defined(__has_warning)
# define __has_warning(x) 0
#endif
#if __has_include(<swift/objc-prologue.h>)
# include <swift/objc-prologue.h>
#endif
#pragma clang diagnostic ignored "-Wauto-import"
#include <Foundation/Foundation.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#if !defined(SWIFT_TYPEDEFS)
# define SWIFT_TYPEDEFS 1
# if __has_include(<uchar.h>)
# include <uchar.h>
# elif !defined(__cplusplus)
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
# endif
typedef float swift_float2 __attribute__((__ext_vector_type__(2)));
typedef float swift_float3 __attribute__((__ext_vector_type__(3)));
typedef float swift_float4 __attribute__((__ext_vector_type__(4)));
typedef double swift_double2 __attribute__((__ext_vector_type__(2)));
typedef double swift_double3 __attribute__((__ext_vector_type__(3)));
typedef double swift_double4 __attribute__((__ext_vector_type__(4)));
typedef int swift_int2 __attribute__((__ext_vector_type__(2)));
typedef int swift_int3 __attribute__((__ext_vector_type__(3)));
typedef int swift_int4 __attribute__((__ext_vector_type__(4)));
typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2)));
typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3)));
typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
#endif
#if !defined(SWIFT_PASTE)
# define SWIFT_PASTE_HELPER(x, y) x##y
# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y)
#endif
#if !defined(SWIFT_METATYPE)
# define SWIFT_METATYPE(X) Class
#endif
#if !defined(SWIFT_CLASS_PROPERTY)
# if __has_feature(objc_class_property)
# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__
# else
# define SWIFT_CLASS_PROPERTY(...)
# endif
#endif
#if __has_attribute(objc_runtime_name)
# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X)))
#else
# define SWIFT_RUNTIME_NAME(X)
#endif
#if __has_attribute(swift_name)
# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X)))
#else
# define SWIFT_COMPILE_NAME(X)
#endif
#if __has_attribute(objc_method_family)
# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X)))
#else
# define SWIFT_METHOD_FAMILY(X)
#endif
#if __has_attribute(noescape)
# define SWIFT_NOESCAPE __attribute__((noescape))
#else
# define SWIFT_NOESCAPE
#endif
#if __has_attribute(ns_consumed)
# define SWIFT_RELEASES_ARGUMENT __attribute__((ns_consumed))
#else
# define SWIFT_RELEASES_ARGUMENT
#endif
#if __has_attribute(warn_unused_result)
# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
# define SWIFT_WARN_UNUSED_RESULT
#endif
#if __has_attribute(noreturn)
# define SWIFT_NORETURN __attribute__((noreturn))
#else
# define SWIFT_NORETURN
#endif
#if !defined(SWIFT_CLASS_EXTRA)
# define SWIFT_CLASS_EXTRA
#endif
#if !defined(SWIFT_PROTOCOL_EXTRA)
# define SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_ENUM_EXTRA)
# define SWIFT_ENUM_EXTRA
#endif
#if !defined(SWIFT_CLASS)
# if __has_attribute(objc_subclassing_restricted)
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# else
# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA
# endif
#endif
#if !defined(SWIFT_RESILIENT_CLASS)
# if __has_attribute(objc_class_stub)
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME) __attribute__((objc_class_stub))
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_class_stub)) SWIFT_CLASS_NAMED(SWIFT_NAME)
# else
# define SWIFT_RESILIENT_CLASS(SWIFT_NAME) SWIFT_CLASS(SWIFT_NAME)
# define SWIFT_RESILIENT_CLASS_NAMED(SWIFT_NAME) SWIFT_CLASS_NAMED(SWIFT_NAME)
# endif
#endif
#if !defined(SWIFT_PROTOCOL)
# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA
#endif
#if !defined(SWIFT_EXTENSION)
# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__)
#endif
#if !defined(OBJC_DESIGNATED_INITIALIZER)
# if __has_attribute(objc_designated_initializer)
# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
# else
# define OBJC_DESIGNATED_INITIALIZER
# endif
#endif
#if !defined(SWIFT_ENUM_ATTR)
# if defined(__has_attribute) && __has_attribute(enum_extensibility)
# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility)))
# else
# define SWIFT_ENUM_ATTR(_extensibility)
# endif
#endif
#if !defined(SWIFT_ENUM)
# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# if __has_feature(generalized_swift_name)
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type
# else
# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility)
# endif
#endif
#if !defined(SWIFT_UNAVAILABLE)
# define SWIFT_UNAVAILABLE __attribute__((unavailable))
#endif
#if !defined(SWIFT_UNAVAILABLE_MSG)
# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg)))
#endif
#if !defined(SWIFT_AVAILABILITY)
# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__)))
#endif
#if !defined(SWIFT_WEAK_IMPORT)
# define SWIFT_WEAK_IMPORT __attribute__((weak_import))
#endif
#if !defined(SWIFT_DEPRECATED)
# define SWIFT_DEPRECATED __attribute__((deprecated))
#endif
#if !defined(SWIFT_DEPRECATED_MSG)
# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__)))
#endif
#if __has_feature(attribute_diagnose_if_objc)
# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning")))
#else
# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg)
#endif
#if !defined(IBSegueAction)
# define IBSegueAction
#endif
#if __has_feature(modules)
#if __has_warning("-Watimport-in-framework-header")
#pragma clang diagnostic ignored "-Watimport-in-framework-header"
#endif
@import ObjectiveC;
#endif
#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch"
#pragma clang diagnostic ignored "-Wduplicate-method-arg"
#if __has_warning("-Wpragma-clang-attribute")
# pragma clang diagnostic ignored "-Wpragma-clang-attribute"
#endif
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma clang diagnostic ignored "-Wnullability"
#if __has_attribute(external_source_symbol)
# pragma push_macro("any")
# undef any
# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="DCUniToast",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol))
# pragma pop_macro("any")
#endif
SWIFT_CLASS("_TtC10DCUniToast7MCToast")
@interface MCToast : NSObject
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
SWIFT_CLASS("_TtC10DCUniToast13MCToastConfig")
@interface MCToastConfig : NSObject
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
#endif
#pragma clang diagnostic pop
#endif
#endif
//
// DCUniToast.h
// DCUniToast
//
// Created by DCloud on 2023/2/23.
//
#import <Foundation/Foundation.h>
//! Project version number for DCUniToast.
FOUNDATION_EXPORT double DCUniToastVersionNumber;
//! Project version string for DCUniToast.
FOUNDATION_EXPORT const unsigned char DCUniToastVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <DCUniToast/PublicHeader.h>
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
// swift-module-flags: -target armv7-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DCUniToast
@_exported import DCUniToast
import Foundation
import Swift
import UIKit
import _Concurrency
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers public class MCToast : ObjectiveC.NSObject {
@objc deinit
}
extension DCUniToast.MCToast {
public typealias MCToastCallback = () -> Swift.Void
public enum MCToastRespond {
case `default`
case noRespond
case respond
case navBarRespond
public static func == (a: DCUniToast.MCToast.MCToastRespond, b: DCUniToast.MCToast.MCToastRespond) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension DCUniToast.MCToast {
public static func colorWithSystemStyle(_ darkColor: UIKit.UIColor, _ defaultColor: UIKit.UIColor) -> UIKit.UIColor
}
extension DCUniToast.MCToast {
public enum MCToastType {
case success
case failure
case warning
public static func == (a: DCUniToast.MCToast.MCToastType, b: DCUniToast.MCToast.MCToastType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
@discardableResult
public static func showStatus(_ type: DCUniToast.MCToast.MCToastType?, text: Swift.String, iconImage: UIKit.UIImage?, duration: CoreGraphics.CGFloat, respond: DCUniToast.MCToast.MCToastRespond, callback: DCUniToast.MCToast.MCToastCallback? = nil) -> (imageView: UIKit.UIImageView, label: UIKit.UILabel)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers public class MCToastConfig : ObjectiveC.NSObject {
public static let shared: DCUniToast.MCToastConfig
public var respond: DCUniToast.MCToast.MCToastRespond
public var background: DCUniToast.MCToastConfig.Background
public var icon: DCUniToast.MCToastConfig.Icon
public var text: DCUniToast.MCToastConfig.Text
public var spacing: DCUniToast.MCToastConfig.MainAreaSpacing
public var duration: CoreGraphics.CGFloat
@objc override dynamic public init()
@objc deinit
}
extension DCUniToast.MCToastConfig {
public struct Background {
public var color: UIKit.UIColor
public var size: CoreGraphics.CGSize
}
public struct Icon {
public var size: CoreGraphics.CGSize
public var successImage: UIKit.UIImage?
public var failureImage: UIKit.UIImage?
public var warningImage: UIKit.UIImage?
}
public struct Text {
public var textColor: UIKit.UIColor?
public var font: UIKit.UIFont
public var offset: (CoreGraphics.CGFloat)
}
public struct MainAreaSpacing {
public var margin: CoreGraphics.CGFloat
public var padding: CoreGraphics.CGFloat
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast.MCToastRespond : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastRespond : Swift.Hashable {}
extension DCUniToast.MCToast.MCToastType : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastType : Swift.Hashable {}
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
// swift-module-flags: -target arm64-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DCUniToast
@_exported import DCUniToast
import Foundation
import Swift
import UIKit
import _Concurrency
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers public class MCToast : ObjectiveC.NSObject {
@objc deinit
}
extension DCUniToast.MCToast {
public typealias MCToastCallback = () -> Swift.Void
public enum MCToastRespond {
case `default`
case noRespond
case respond
case navBarRespond
public static func == (a: DCUniToast.MCToast.MCToastRespond, b: DCUniToast.MCToast.MCToastRespond) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension DCUniToast.MCToast {
public static func colorWithSystemStyle(_ darkColor: UIKit.UIColor, _ defaultColor: UIKit.UIColor) -> UIKit.UIColor
}
extension DCUniToast.MCToast {
public enum MCToastType {
case success
case failure
case warning
public static func == (a: DCUniToast.MCToast.MCToastType, b: DCUniToast.MCToast.MCToastType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
@discardableResult
public static func showStatus(_ type: DCUniToast.MCToast.MCToastType?, text: Swift.String, iconImage: UIKit.UIImage?, duration: CoreGraphics.CGFloat, respond: DCUniToast.MCToast.MCToastRespond, callback: DCUniToast.MCToast.MCToastCallback? = nil) -> (imageView: UIKit.UIImageView, label: UIKit.UILabel)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers public class MCToastConfig : ObjectiveC.NSObject {
public static let shared: DCUniToast.MCToastConfig
public var respond: DCUniToast.MCToast.MCToastRespond
public var background: DCUniToast.MCToastConfig.Background
public var icon: DCUniToast.MCToastConfig.Icon
public var text: DCUniToast.MCToastConfig.Text
public var spacing: DCUniToast.MCToastConfig.MainAreaSpacing
public var duration: CoreGraphics.CGFloat
@objc override dynamic public init()
@objc deinit
}
extension DCUniToast.MCToastConfig {
public struct Background {
public var color: UIKit.UIColor
public var size: CoreGraphics.CGSize
}
public struct Icon {
public var size: CoreGraphics.CGSize
public var successImage: UIKit.UIImage?
public var failureImage: UIKit.UIImage?
public var warningImage: UIKit.UIImage?
}
public struct Text {
public var textColor: UIKit.UIColor?
public var font: UIKit.UIFont
public var offset: (CoreGraphics.CGFloat)
}
public struct MainAreaSpacing {
public var margin: CoreGraphics.CGFloat
public var padding: CoreGraphics.CGFloat
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast.MCToastRespond : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastRespond : Swift.Hashable {}
extension DCUniToast.MCToast.MCToastType : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastType : Swift.Hashable {}
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
// swift-module-flags: -target arm64-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DCUniToast
@_exported import DCUniToast
import Foundation
import Swift
import UIKit
import _Concurrency
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers public class MCToast : ObjectiveC.NSObject {
@objc deinit
}
extension DCUniToast.MCToast {
public typealias MCToastCallback = () -> Swift.Void
public enum MCToastRespond {
case `default`
case noRespond
case respond
case navBarRespond
public static func == (a: DCUniToast.MCToast.MCToastRespond, b: DCUniToast.MCToast.MCToastRespond) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension DCUniToast.MCToast {
public static func colorWithSystemStyle(_ darkColor: UIKit.UIColor, _ defaultColor: UIKit.UIColor) -> UIKit.UIColor
}
extension DCUniToast.MCToast {
public enum MCToastType {
case success
case failure
case warning
public static func == (a: DCUniToast.MCToast.MCToastType, b: DCUniToast.MCToast.MCToastType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
@discardableResult
public static func showStatus(_ type: DCUniToast.MCToast.MCToastType?, text: Swift.String, iconImage: UIKit.UIImage?, duration: CoreGraphics.CGFloat, respond: DCUniToast.MCToast.MCToastRespond, callback: DCUniToast.MCToast.MCToastCallback? = nil) -> (imageView: UIKit.UIImageView, label: UIKit.UILabel)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers public class MCToastConfig : ObjectiveC.NSObject {
public static let shared: DCUniToast.MCToastConfig
public var respond: DCUniToast.MCToast.MCToastRespond
public var background: DCUniToast.MCToastConfig.Background
public var icon: DCUniToast.MCToastConfig.Icon
public var text: DCUniToast.MCToastConfig.Text
public var spacing: DCUniToast.MCToastConfig.MainAreaSpacing
public var duration: CoreGraphics.CGFloat
@objc override dynamic public init()
@objc deinit
}
extension DCUniToast.MCToastConfig {
public struct Background {
public var color: UIKit.UIColor
public var size: CoreGraphics.CGSize
}
public struct Icon {
public var size: CoreGraphics.CGSize
public var successImage: UIKit.UIImage?
public var failureImage: UIKit.UIImage?
public var warningImage: UIKit.UIImage?
}
public struct Text {
public var textColor: UIKit.UIColor?
public var font: UIKit.UIFont
public var offset: (CoreGraphics.CGFloat)
}
public struct MainAreaSpacing {
public var margin: CoreGraphics.CGFloat
public var padding: CoreGraphics.CGFloat
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast.MCToastRespond : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastRespond : Swift.Hashable {}
extension DCUniToast.MCToast.MCToastType : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastType : Swift.Hashable {}
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
// swift-module-flags: -target armv7-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DCUniToast
@_exported import DCUniToast
import Foundation
import Swift
import UIKit
import _Concurrency
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers public class MCToast : ObjectiveC.NSObject {
@objc deinit
}
extension DCUniToast.MCToast {
public typealias MCToastCallback = () -> Swift.Void
public enum MCToastRespond {
case `default`
case noRespond
case respond
case navBarRespond
public static func == (a: DCUniToast.MCToast.MCToastRespond, b: DCUniToast.MCToast.MCToastRespond) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension DCUniToast.MCToast {
public static func colorWithSystemStyle(_ darkColor: UIKit.UIColor, _ defaultColor: UIKit.UIColor) -> UIKit.UIColor
}
extension DCUniToast.MCToast {
public enum MCToastType {
case success
case failure
case warning
public static func == (a: DCUniToast.MCToast.MCToastType, b: DCUniToast.MCToast.MCToastType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
@discardableResult
public static func showStatus(_ type: DCUniToast.MCToast.MCToastType?, text: Swift.String, iconImage: UIKit.UIImage?, duration: CoreGraphics.CGFloat, respond: DCUniToast.MCToast.MCToastRespond, callback: DCUniToast.MCToast.MCToastCallback? = nil) -> (imageView: UIKit.UIImageView, label: UIKit.UILabel)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers public class MCToastConfig : ObjectiveC.NSObject {
public static let shared: DCUniToast.MCToastConfig
public var respond: DCUniToast.MCToast.MCToastRespond
public var background: DCUniToast.MCToastConfig.Background
public var icon: DCUniToast.MCToastConfig.Icon
public var text: DCUniToast.MCToastConfig.Text
public var spacing: DCUniToast.MCToastConfig.MainAreaSpacing
public var duration: CoreGraphics.CGFloat
@objc override dynamic public init()
@objc deinit
}
extension DCUniToast.MCToastConfig {
public struct Background {
public var color: UIKit.UIColor
public var size: CoreGraphics.CGSize
}
public struct Icon {
public var size: CoreGraphics.CGSize
public var successImage: UIKit.UIImage?
public var failureImage: UIKit.UIImage?
public var warningImage: UIKit.UIImage?
}
public struct Text {
public var textColor: UIKit.UIColor?
public var font: UIKit.UIFont
public var offset: (CoreGraphics.CGFloat)
}
public struct MainAreaSpacing {
public var margin: CoreGraphics.CGFloat
public var padding: CoreGraphics.CGFloat
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast.MCToastRespond : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastRespond : Swift.Hashable {}
extension DCUniToast.MCToast.MCToastType : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastType : Swift.Hashable {}
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
// swift-module-flags: -target armv7-apple-ios9.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DCUniToast
@_exported import DCUniToast
import Foundation
import Swift
import UIKit
import _Concurrency
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers public class MCToast : ObjectiveC.NSObject {
@objc deinit
}
extension DCUniToast.MCToast {
public typealias MCToastCallback = () -> Swift.Void
public enum MCToastRespond {
case `default`
case noRespond
case respond
case navBarRespond
public static func == (a: DCUniToast.MCToast.MCToastRespond, b: DCUniToast.MCToast.MCToastRespond) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension DCUniToast.MCToast {
public static func colorWithSystemStyle(_ darkColor: UIKit.UIColor, _ defaultColor: UIKit.UIColor) -> UIKit.UIColor
}
extension DCUniToast.MCToast {
public enum MCToastType {
case success
case failure
case warning
public static func == (a: DCUniToast.MCToast.MCToastType, b: DCUniToast.MCToast.MCToastType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
@discardableResult
public static func showStatus(_ type: DCUniToast.MCToast.MCToastType?, text: Swift.String, iconImage: UIKit.UIImage?, duration: CoreGraphics.CGFloat, respond: DCUniToast.MCToast.MCToastRespond, callback: DCUniToast.MCToast.MCToastCallback? = nil) -> (imageView: UIKit.UIImageView, label: UIKit.UILabel)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers public class MCToastConfig : ObjectiveC.NSObject {
public static let shared: DCUniToast.MCToastConfig
public var respond: DCUniToast.MCToast.MCToastRespond
public var background: DCUniToast.MCToastConfig.Background
public var icon: DCUniToast.MCToastConfig.Icon
public var text: DCUniToast.MCToastConfig.Text
public var spacing: DCUniToast.MCToastConfig.MainAreaSpacing
public var duration: CoreGraphics.CGFloat
@objc override dynamic public init()
@objc deinit
}
extension DCUniToast.MCToastConfig {
public struct Background {
public var color: UIKit.UIColor
public var size: CoreGraphics.CGSize
}
public struct Icon {
public var size: CoreGraphics.CGSize
public var successImage: UIKit.UIImage?
public var failureImage: UIKit.UIImage?
public var warningImage: UIKit.UIImage?
}
public struct Text {
public var textColor: UIKit.UIColor?
public var font: UIKit.UIFont
public var offset: (CoreGraphics.CGFloat)
}
public struct MainAreaSpacing {
public var margin: CoreGraphics.CGFloat
public var padding: CoreGraphics.CGFloat
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast.MCToastRespond : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastRespond : Swift.Hashable {}
extension DCUniToast.MCToast.MCToastType : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastType : Swift.Hashable {}
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
// swift-module-flags: -target i386-apple-ios9.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DCUniToast
@_exported import DCUniToast
import Foundation
import Swift
import UIKit
import _Concurrency
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers public class MCToast : ObjectiveC.NSObject {
@objc deinit
}
extension DCUniToast.MCToast {
public typealias MCToastCallback = () -> Swift.Void
public enum MCToastRespond {
case `default`
case noRespond
case respond
case navBarRespond
public static func == (a: DCUniToast.MCToast.MCToastRespond, b: DCUniToast.MCToast.MCToastRespond) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension DCUniToast.MCToast {
public static func colorWithSystemStyle(_ darkColor: UIKit.UIColor, _ defaultColor: UIKit.UIColor) -> UIKit.UIColor
}
extension DCUniToast.MCToast {
public enum MCToastType {
case success
case failure
case warning
public static func == (a: DCUniToast.MCToast.MCToastType, b: DCUniToast.MCToast.MCToastType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
@discardableResult
public static func showStatus(_ type: DCUniToast.MCToast.MCToastType?, text: Swift.String, iconImage: UIKit.UIImage?, duration: CoreGraphics.CGFloat, respond: DCUniToast.MCToast.MCToastRespond, callback: DCUniToast.MCToast.MCToastCallback? = nil) -> (imageView: UIKit.UIImageView, label: UIKit.UILabel)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers public class MCToastConfig : ObjectiveC.NSObject {
public static let shared: DCUniToast.MCToastConfig
public var respond: DCUniToast.MCToast.MCToastRespond
public var background: DCUniToast.MCToastConfig.Background
public var icon: DCUniToast.MCToastConfig.Icon
public var text: DCUniToast.MCToastConfig.Text
public var spacing: DCUniToast.MCToastConfig.MainAreaSpacing
public var duration: CoreGraphics.CGFloat
@objc override dynamic public init()
@objc deinit
}
extension DCUniToast.MCToastConfig {
public struct Background {
public var color: UIKit.UIColor
public var size: CoreGraphics.CGSize
}
public struct Icon {
public var size: CoreGraphics.CGSize
public var successImage: UIKit.UIImage?
public var failureImage: UIKit.UIImage?
public var warningImage: UIKit.UIImage?
}
public struct Text {
public var textColor: UIKit.UIColor?
public var font: UIKit.UIFont
public var offset: (CoreGraphics.CGFloat)
}
public struct MainAreaSpacing {
public var margin: CoreGraphics.CGFloat
public var padding: CoreGraphics.CGFloat
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast.MCToastRespond : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastRespond : Swift.Hashable {}
extension DCUniToast.MCToast.MCToastType : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastType : Swift.Hashable {}
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
// swift-module-flags: -target i386-apple-ios9.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DCUniToast
@_exported import DCUniToast
import Foundation
import Swift
import UIKit
import _Concurrency
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers public class MCToast : ObjectiveC.NSObject {
@objc deinit
}
extension DCUniToast.MCToast {
public typealias MCToastCallback = () -> Swift.Void
public enum MCToastRespond {
case `default`
case noRespond
case respond
case navBarRespond
public static func == (a: DCUniToast.MCToast.MCToastRespond, b: DCUniToast.MCToast.MCToastRespond) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension DCUniToast.MCToast {
public static func colorWithSystemStyle(_ darkColor: UIKit.UIColor, _ defaultColor: UIKit.UIColor) -> UIKit.UIColor
}
extension DCUniToast.MCToast {
public enum MCToastType {
case success
case failure
case warning
public static func == (a: DCUniToast.MCToast.MCToastType, b: DCUniToast.MCToast.MCToastType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
@discardableResult
public static func showStatus(_ type: DCUniToast.MCToast.MCToastType?, text: Swift.String, iconImage: UIKit.UIImage?, duration: CoreGraphics.CGFloat, respond: DCUniToast.MCToast.MCToastRespond, callback: DCUniToast.MCToast.MCToastCallback? = nil) -> (imageView: UIKit.UIImageView, label: UIKit.UILabel)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers public class MCToastConfig : ObjectiveC.NSObject {
public static let shared: DCUniToast.MCToastConfig
public var respond: DCUniToast.MCToast.MCToastRespond
public var background: DCUniToast.MCToastConfig.Background
public var icon: DCUniToast.MCToastConfig.Icon
public var text: DCUniToast.MCToastConfig.Text
public var spacing: DCUniToast.MCToastConfig.MainAreaSpacing
public var duration: CoreGraphics.CGFloat
@objc override dynamic public init()
@objc deinit
}
extension DCUniToast.MCToastConfig {
public struct Background {
public var color: UIKit.UIColor
public var size: CoreGraphics.CGSize
}
public struct Icon {
public var size: CoreGraphics.CGSize
public var successImage: UIKit.UIImage?
public var failureImage: UIKit.UIImage?
public var warningImage: UIKit.UIImage?
}
public struct Text {
public var textColor: UIKit.UIColor?
public var font: UIKit.UIFont
public var offset: (CoreGraphics.CGFloat)
}
public struct MainAreaSpacing {
public var margin: CoreGraphics.CGFloat
public var padding: CoreGraphics.CGFloat
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast.MCToastRespond : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastRespond : Swift.Hashable {}
extension DCUniToast.MCToast.MCToastType : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastType : Swift.Hashable {}
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
// swift-module-flags: -target x86_64-apple-ios9.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DCUniToast
@_exported import DCUniToast
import Foundation
import Swift
import UIKit
import _Concurrency
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers public class MCToast : ObjectiveC.NSObject {
@objc deinit
}
extension DCUniToast.MCToast {
public typealias MCToastCallback = () -> Swift.Void
public enum MCToastRespond {
case `default`
case noRespond
case respond
case navBarRespond
public static func == (a: DCUniToast.MCToast.MCToastRespond, b: DCUniToast.MCToast.MCToastRespond) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension DCUniToast.MCToast {
public static func colorWithSystemStyle(_ darkColor: UIKit.UIColor, _ defaultColor: UIKit.UIColor) -> UIKit.UIColor
}
extension DCUniToast.MCToast {
public enum MCToastType {
case success
case failure
case warning
public static func == (a: DCUniToast.MCToast.MCToastType, b: DCUniToast.MCToast.MCToastType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
@discardableResult
public static func showStatus(_ type: DCUniToast.MCToast.MCToastType?, text: Swift.String, iconImage: UIKit.UIImage?, duration: CoreGraphics.CGFloat, respond: DCUniToast.MCToast.MCToastRespond, callback: DCUniToast.MCToast.MCToastCallback? = nil) -> (imageView: UIKit.UIImageView, label: UIKit.UILabel)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers public class MCToastConfig : ObjectiveC.NSObject {
public static let shared: DCUniToast.MCToastConfig
public var respond: DCUniToast.MCToast.MCToastRespond
public var background: DCUniToast.MCToastConfig.Background
public var icon: DCUniToast.MCToastConfig.Icon
public var text: DCUniToast.MCToastConfig.Text
public var spacing: DCUniToast.MCToastConfig.MainAreaSpacing
public var duration: CoreGraphics.CGFloat
@objc override dynamic public init()
@objc deinit
}
extension DCUniToast.MCToastConfig {
public struct Background {
public var color: UIKit.UIColor
public var size: CoreGraphics.CGSize
}
public struct Icon {
public var size: CoreGraphics.CGSize
public var successImage: UIKit.UIImage?
public var failureImage: UIKit.UIImage?
public var warningImage: UIKit.UIImage?
}
public struct Text {
public var textColor: UIKit.UIColor?
public var font: UIKit.UIFont
public var offset: (CoreGraphics.CGFloat)
}
public struct MainAreaSpacing {
public var margin: CoreGraphics.CGFloat
public var padding: CoreGraphics.CGFloat
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast.MCToastRespond : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastRespond : Swift.Hashable {}
extension DCUniToast.MCToast.MCToastType : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastType : Swift.Hashable {}
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
// swift-module-flags: -target x86_64-apple-ios9.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name DCUniToast
@_exported import DCUniToast
import Foundation
import Swift
import UIKit
import _Concurrency
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_text(_ text: Swift.String, offset: CoreGraphics.CGFloat? = nil, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_remove(callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers public class MCToast : ObjectiveC.NSObject {
@objc deinit
}
extension DCUniToast.MCToast {
public typealias MCToastCallback = () -> Swift.Void
public enum MCToastRespond {
case `default`
case noRespond
case respond
case navBarRespond
public static func == (a: DCUniToast.MCToast.MCToastRespond, b: DCUniToast.MCToast.MCToastRespond) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension DCUniToast.MCToast {
public static func colorWithSystemStyle(_ darkColor: UIKit.UIColor, _ defaultColor: UIKit.UIColor) -> UIKit.UIColor
}
extension DCUniToast.MCToast {
public enum MCToastType {
case success
case failure
case warning
public static func == (a: DCUniToast.MCToast.MCToastType, b: DCUniToast.MCToast.MCToastType) -> Swift.Bool
public func hash(into hasher: inout Swift.Hasher)
public var hashValue: Swift.Int {
get
}
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_success(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_failure(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_warning(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
@discardableResult
public static func showStatus(_ type: DCUniToast.MCToast.MCToastType?, text: Swift.String, iconImage: UIKit.UIImage?, duration: CoreGraphics.CGFloat, respond: DCUniToast.MCToast.MCToastRespond, callback: DCUniToast.MCToast.MCToastCallback? = nil) -> (imageView: UIKit.UIImageView, label: UIKit.UILabel)
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_statusBar(_ text: Swift.String, duration: CoreGraphics.CGFloat = MCToastConfig.shared.duration, font: UIKit.UIFont = MCToastConfig.shared.text.font, backgroundColor: UIKit.UIColor? = nil, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
@objc @_inheritsConvenienceInitializers public class MCToastConfig : ObjectiveC.NSObject {
public static let shared: DCUniToast.MCToastConfig
public var respond: DCUniToast.MCToast.MCToastRespond
public var background: DCUniToast.MCToastConfig.Background
public var icon: DCUniToast.MCToastConfig.Icon
public var text: DCUniToast.MCToastConfig.Text
public var spacing: DCUniToast.MCToastConfig.MainAreaSpacing
public var duration: CoreGraphics.CGFloat
@objc override dynamic public init()
@objc deinit
}
extension DCUniToast.MCToastConfig {
public struct Background {
public var color: UIKit.UIColor
public var size: CoreGraphics.CGSize
}
public struct Icon {
public var size: CoreGraphics.CGSize
public var successImage: UIKit.UIImage?
public var failureImage: UIKit.UIImage?
public var warningImage: UIKit.UIImage?
}
public struct Text {
public var textColor: UIKit.UIColor?
public var font: UIKit.UIFont
public var offset: (CoreGraphics.CGFloat)
}
public struct MainAreaSpacing {
public var margin: CoreGraphics.CGFloat
public var padding: CoreGraphics.CGFloat
}
}
extension UIKit.UIResponder {
@_Concurrency.MainActor(unsafe) public func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
@_Concurrency.MainActor(unsafe) public func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast {
public static func mc_loading(text: Swift.String = "正在加载中", duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
public static func mc_loading(imageNames: [UIKit.UIImage?], animationSpeed: CoreGraphics.CGFloat = 0.1, duration: CoreGraphics.CGFloat = 0, respond: DCUniToast.MCToast.MCToastRespond = MCToastConfig.shared.respond, callback: DCUniToast.MCToast.MCToastCallback? = nil)
}
extension DCUniToast.MCToast.MCToastRespond : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastRespond : Swift.Hashable {}
extension DCUniToast.MCToast.MCToastType : Swift.Equatable {}
extension DCUniToast.MCToast.MCToastType : Swift.Hashable {}
framework module DCUniToast {
umbrella header "DCUniToast.h"
export *
module * { export * }
}
module DCUniToast.Swift {
header "DCUniToast-Swift.h"
requires objc
}
//
// DCloudAlertController.h
// DCloudAlertController
//
// Created by lizhongyi on 2023/3/7.
//
#import <Foundation/Foundation.h>
//! Project version number for DCloudAlertController.
FOUNDATION_EXPORT double DCloudAlertControllerVersionNumber;
//! Project version string for DCloudAlertController.
FOUNDATION_EXPORT const unsigned char DCloudAlertControllerVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <DCloudAlertController/PublicHeader.h>
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册