当(之前)应用程序进入后台时,iOS拍摄的屏幕截图? [英] Screenshot that taken by iOS when (before) application go into background?

查看:206
本文介绍了当(之前)应用程序进入后台时,iOS拍摄的屏幕截图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望大家都知道, iOS 在应用程序进入后台之前先获取屏幕截图。

I hope that you all know about it, iOS takes screenshot before your application goes to background.

我从正式文件。


在移至背景之前,先从视图中删除敏感信息。 ::当应用程序过渡到后台时,系统会为应用程序的主窗口拍摄快照,然后在将应用程序过渡回前台时短暂显示该快照。从applicationDidEnterBackground:方法返回之前,您应该隐藏或遮盖可能会在快照中捕获的密码和其他敏感个人信息。

Remove sensitive information from views before moving to the background: When an app transitions to the background, the system takes a snapshot of the app’s main window, which it then presents briefly when transitioning your app back to the foreground. Before returning from your applicationDidEnterBackground: method, you should hide or obscure passwords and other sensitive personal information that might be captured as part of the snapshot.

因此,在这里我们可以隐藏我们的敏感个人信息 ,并且系统会对应用程序主窗口进行快照,因此我们无法更改其功能。

So, Here We can hide our "sensitive personal information" and the system takes a snapshot of the app’s main window, so we can not change its feature.

但是我想知道。。

1)如果在我的应用程序中我处于4th View,应用程序进入后台,然后系统拍摄哪个视图/页面的屏幕截图?应用程序的第一个视图(是应用程序的启动视图?)还是第四个视图/页面? (这对我来说有点混乱)。

1) If in my application I'm at 4th View, and my app goes to background then system takes screen shot of which view/page? first one (start up view of apps?) or 4th view/page of the app ?? (here is little confusion for me).

2)我们可以在系统正在截取屏幕截图或有任何可用的通知时触发任何操作吗?通知我们有关系统截图的信息??

2) Can we fire any action when system is taking screenshot or any notification is available that will inform us of system taking screenshot ??

3)我只想知道,是否可以进行屏幕截图(以编程方式)在我的应用程序启动之前?如果,请给我建议。如果,那么在什么地方/什么时候可以截取屏幕截图(em)(我的意思是在应用程序的哪个最小阶段可以截取屏幕截图?) ?

3) I just want to know, is it possible to take screen shot (programmatically) before my application launch ?? If YES then give me suggestion for how to do it. And if NO then where/when I'm able to take screenshot (I mean at which minimum stage of application we'll be able to take screenshot ?) ?

推荐答案


  1. 实际上,屏幕顶视图最远

  2. 不,没有通知该屏幕快照将要或正在拍摄。您应该只在 applicationDidEnterBackground; 方法中处理该句柄。

  3. 这是不可能的,您想如何在应用运行之前执行任何代码?操作系统将进行屏幕截图,只需确保将所有内容隐藏在 applicationDidEnterBackground; 中即可。最低状态是您的应用已启动并正在运行。

  1. It will take a screen short of the top most view, actually it is taking a screen shot of the window which is displaying your app.
  2. No there is no notification that the screen shot is going to or being taken. You should just handle the handle it in the applicationDidEnterBackground; method. Just a stated in the documentation
  3. No this is not possible, how do you want to execute any code before you app is running? The OS will make the screen shot, just be sure to have everything hidden in the applicationDidEnterBackground;. The minimum state is that your app is up and running.

我对应用所做的工作是应用程序被推送到后台,在我的 UIWindow 上放置了一个额外的视图。因此,当进行屏幕截图时,将捕获该视图。

What I've done is on of my apps is as soon as my app gets pushed to the background place an extra view on my UIWindow. Thus when the screen shot is made this view is captured.

这篇关于当(之前)应用程序进入后台时,iOS拍摄的屏幕截图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆