## uni.onUserCaptureScreen(callback?) @onusercapturescreen <!-- UTSAPIJSON.onUserCaptureScreen.description --> <!-- UTSAPIJSON.onUserCaptureScreen.compatibility --> <!-- UTSAPIJSON.onUserCaptureScreen.param --> <!-- UTSAPIJSON.onUserCaptureScreen.returnValue --> <!-- UTSAPIJSON.onUserCaptureScreen.tutorial --> ## uni.offUserCaptureScreen(callback?) @offusercapturescreen <!-- UTSAPIJSON.offUserCaptureScreen.description --> <!-- UTSAPIJSON.offUserCaptureScreen.compatibility --> <!-- UTSAPIJSON.offUserCaptureScreen.param --> <!-- UTSAPIJSON.offUserCaptureScreen.returnValue --> <!-- UTSAPIJSON.offUserCaptureScreen.tutorial --> <!-- UTSAPIJSON.general_type.name --> <!-- UTSAPIJSON.general_type.param --> ## tips
- 本文的截屏指手机自带的截屏事件的监听和取消监听,由用户操作手机按键触发。App平台如需通过代码对view截屏,另见API [takeSnapshot](../dom/unielement.md#takesnapshot)
- 如果想防止截屏,一般是监听到截屏事件后,立即修改当前界面内容,这样即便截屏也截不到你想要保护的内容