From c4d2fc14a04600a2f234dba3dc5e61e01b0fb3b8 Mon Sep 17 00:00:00 2001 From: XHY Date: Fri, 18 Nov 2022 11:40:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uni-memorywarning/readme.md | 2 +- uni_modules/uni-memorywarning/utssdk/app-ios/index.uts | 6 +++--- uni_modules/uni-usercapturescreen/utssdk/app-ios/index.uts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/uni_modules/uni-memorywarning/readme.md b/uni_modules/uni-memorywarning/readme.md index 56cf8f9..d39652e 100644 --- a/uni_modules/uni-memorywarning/readme.md +++ b/uni_modules/uni-memorywarning/readme.md @@ -11,7 +11,7 @@ 返回值说明: -**注意平台差异:仅Android平台有返回值,iOS平台无返回值** +**注意平台差异:仅Android平台有返回值,iOS平台返回为空对象** ```kotlin diff --git a/uni_modules/uni-memorywarning/utssdk/app-ios/index.uts b/uni_modules/uni-memorywarning/utssdk/app-ios/index.uts index 3295795..8931060 100644 --- a/uni_modules/uni-memorywarning/utssdk/app-ios/index.uts +++ b/uni_modules/uni-memorywarning/utssdk/app-ios/index.uts @@ -4,11 +4,11 @@ import { UIApplication } from "UIKit" class MemoryWarningTool { static listener: UTSCallback | null; - // 监听截屏 + // 监听内存警告 static listenMemoryWarning(callback: UTSCallback | null) { this.listener = callback - // 注册监听截屏事件及回调方法 + // 注册监听内存警告通知事件及设置回调方法 // target-action 回调方法需要通过 Selector("方法名") 构建 const method = Selector("receiveMemoryWarning") NotificationCenter.default.addObserver(this, selector = method, name = UIApplication.didReceiveMemoryWarningNotification, object = null) @@ -17,7 +17,7 @@ class MemoryWarningTool { // 内存警告回调的方法 // target-action 的方法前需要添加 @objc 前缀 @objc static receiveMemoryWarning() { - // 回调 + // 触发回调 this.listener?.({}) } diff --git a/uni_modules/uni-usercapturescreen/utssdk/app-ios/index.uts b/uni_modules/uni-usercapturescreen/utssdk/app-ios/index.uts index 18395aa..c579e82 100644 --- a/uni_modules/uni-usercapturescreen/utssdk/app-ios/index.uts +++ b/uni_modules/uni-usercapturescreen/utssdk/app-ios/index.uts @@ -11,7 +11,7 @@ class CaptureScreenTool { static listenCaptureScreen(callback: UTSCallback | null) { this.listener = callback - // 注册监听截屏事件及回调方法 + // 注册监听截屏通知事件及设置回调方法 // target-action 回调方法需要通过 Selector("方法名") 构建 const method = Selector("userDidTakeScreenshot") NotificationCenter.default.addObserver(this, selector = method, name = UIApplication.userDidTakeScreenshotNotification, object = null) @@ -20,7 +20,7 @@ class CaptureScreenTool { // 捕获截屏回调的方法 // target-action 的方法前需要添加 @objc 前缀 @objc static userDidTakeScreenshot() { - // 回调 + // 触发回调 this.listener?.({}) } -- GitLab