简体   繁体   English

按下主屏幕按钮后视图消失

[英]The View has Disappear when press home button

I am develop IOS App ,and run the App on my iPhone. 我正在开发IOS App,并在iPhone上运行该App。

I press the Home Button on iPhone , but when I click twice for Home button and turn to my App , it show the View like the following picture. 我按了iPhone上的“主页”按钮,但是当我两次单击“主页”按钮并转到我的App时,它显示的视图如下图所示。 The View is Disappear when I went back. 当我回去时,视图消失了。

在此处输入图片说明

But I don't close the view at the viewDidDisappear or viewWillDisappear . 但是我不会在viewDidDisappearviewWillDisappear处关闭视图。 And then when I click the App , it show the blank View like the following picture. 然后,当我单击App时,它显示blank View ,如下图所示。

在此处输入图片说明

I have no idea about this...Can someone help me ? 我对此一无所知...有人可以帮我吗?

I think yu didn't use the following functions 1.applicationWillResignActive & 2.applicationWillEnterForeground in your Application. 我认为您在应用程序中没有使用以下功能1.applicationWillResignActive和2.applicationWillEnterForeground。 so please use this following functions in AppDelegate.m - (void)applicationWillResignActive:(UIApplication *)application { } -(void)applicationWillEnterForeground:(UIApplication *)application{ } 因此请在AppDelegate.m中使用以下功能- (void)applicationWillResignActive:(UIApplication *)application { } -(void)applicationWillEnterForeground:(UIApplication *)application{ }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM