提交 9746812f 编写于 作者: DCloud_iOS_XHY's avatar DCloud_iOS_XHY

修改 iOS插件引用的内置库名称

上级 e941620d
import { UIAlertController , UIAlertAction , UITextField } from "UIKit"
import { DCUTS } from "DCUTSFoundation"
import { UTSiOS } from "DCloudUTSFoundation"
import { DispatchQueue } from 'Dispatch';
export function showAlert(title: string|null, message: string|null, result: (index: Number) => void) {
export function showAlert(title: string|null, message: string|null, result: (index: Number) => void) {
// uts方法默认会在子线程中执行,涉及 UI 操作必须在主线程中运行,通过 DispatchQueue.main.async 方法可将代码在主线程中运行
DispatchQueue.main.async(execute=():void => {
......@@ -26,7 +26,7 @@ export function showAlert(title: string|null, message: string|null, result: (ind
alert.addAction(cancelAction)
// 打开 alert 弹窗
DCUTS.getCurrentViewController().present(alert, animated= true)
UTSiOS.getCurrentViewController().present(alert, animated= true)
})
}
......@@ -58,6 +58,6 @@ export function showPrompt(title: string|null, message: string|null,placeholder:
alert.addAction(okAction)
// 打开 alert 弹窗
DCUTS.getCurrentViewController().present(alert, animated= true)
UTSiOS.getCurrentViewController().present(alert, animated= true)
})
}
\ No newline at end of file
......@@ -4,5 +4,9 @@
<dict>
<key>TencentLBSAPIKey</key>
<string>您申请的Key</string>
<key>UIBackgroundModes</key>
<array>
<string>location</string>
</array>
</dict>
</plist>
\ No newline at end of file
import { DCUTS } from "DCUTSFoundation"
import { UTSiOS } from "DCloudUTSFoundation"
import "ToastSwiftFramework"
import { DispatchQueue } from 'Dispatch';
export function showToast():boolean{
// uts方法默认会在子线程中执行,涉及 UI 操作必须在主线程中运行,通过 DispatchQueue.main.async 方法可将代码在主线程中运行
DispatchQueue.main.async(execute=():void => {
DCUTS.getCurrentViewController().view.makeToast("这是一条提示信息")
// 在当前显示的控制器view上显示 toast 弹窗
UTSiOS.getCurrentViewController().view.makeToast("这是一条提示信息")
})
return true
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册