diff --git a/uni_modules/uni-memorywarning/readme.md b/uni_modules/uni-memorywarning/readme.md index 56cf8f9b3f657dde750a29dbbadde61a47522843..d39652e335ed84415911fef1619baa8f83ba858f 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 329579533b81d0cbd09719b55bd88e6326eb3ffb..8931060f792e3d4f7170a2ac184b6a794e310837 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 18395aa6b4937d9a8ffd6889b731e79bd5fb4f5d..c579e82558e065a223ea3d6299557304104ea4e6 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?.({}) }