사용자가 집 버튼을 클릭하여 응용 프로그램으로 돌아 오는 경우 응용 프로그램에서 해당 작업을 인식하고 사용자가 볼 수 있도록 메시지를 생성하도록 (예 : 다시 돌아올 수 있도록) 설계하고 싶습니다. 나는 이것을 위해 appdelegate를 수정해야한다고 생각하지만 코딩하는 법을 모른다. 누구든지 손을 빌릴 수 있을까?내 앱이 홈 버튼을 감지하도록하려면 어떻게합니까?
4
A
답변
5
배경에서 응용 프로그램 웨이크 업 .. 그것은 응용 프로그램 대리인이 위임에 올 때마다 -
- 당신은 또한이 대표를 확인이 위임에 사용자에게 MSG를 표시 할 수 있습니다
- (void)applicationWillEnterForeground:(UIApplication *)application
{
/*
Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
*/
}
- (void)applicationWillResignActive:(UIApplication *)application
{
/*
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
*/
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
/*
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
*/
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
/*
Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
*/
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
/*
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
*/
}
- (void)applicationWillTerminate:(UIApplication *)application
{
/*
Called when the application is about to terminate.
Save data if appropriate.
See also applicationDidEnterBackground:.
*/
}
관련 문제
- 1. 홈 버튼을 눌러도 내 앱이 종료되지 않습니다.
- 2. iPhone의 홈 버튼을 누르면 내 앱이 닫히지 않고 최소화
- 3. GIT를 내 홈 폴더로 기본 설정하려면 어떻게합니까?
- 4. UIActionSheet의 버튼을 클릭하면 내 앱이 충돌합니다.
- 5. 내 앱이 봇 요청을보기로 추적하지 않게하려면 어떻게합니까?
- 6. 홈 버튼이 내 앱으로 돌아갑니다
- 7. 홈 버튼을 눌러 홈 화면 응용 프로그램을 다시 만들지 못하게하려면 어떻게합니까?
- 8. AIR 2.7 iOS 앱이 iPhone 홈 버튼을 눌렀을 때 앱이 종료되지 않습니다
- 9. MouseMotionListener가 드래그의 끝을 감지하도록하려면 어떻게해야합니까?
- 10. 홈 버튼을 눌러서 iPhone을 누르십시오.
- 11. 홈 버튼을 캡처하는 방법을 눌렀습니까?
- 12. 사용자가 홈 버튼을 눌렀을 때 방해되는 방법?
- 13. iOS에서 푸시되는 홈 버튼을 관찰하는 방법이 있습니까?
- 14. onStop을 호출하지 않습니다 ... 홈 버튼을 누름
- 15. 홈 버튼을 누를 때까지 화면이 업데이트되지 않습니다.
- 16. 홈 버튼을 추가하는 코드 수정
- 17. 뒤로 버튼을 재정의 홈 버튼처럼 사용하십시오.
- 18. 안드로이드에서 뒤로 버튼을 홈 버튼으로 작동시키는 방법
- 19. 홈 버튼을 눌렀을 때 내 활동이 중단되는 이유는 무엇입니까?
- 20. 앱이 이미 메모리에있는 경우 스플래시 화면을로드하지 않으려면 어떻게합니까?
- 21. 홈 버튼을 눌렀을 때 활동이 닫힙니다.
- 22. 앱이 홈 화면에서 시작되었는지 확인 하시겠습니까?
- 23. 왜 내 앱이 더 반복적으로 열리는가
- 24. UINavigationBar에서 버튼을 연결하려면 어떻게합니까?
- 25. 앱이 홈 페이지로 리디렉션되는 이유는 무엇입니까?
- 26. 앱이 Android 홈 화면을 변경할 수 있습니까?
- 27. 태블릿 또는 모바일에서 홈 버튼을 클릭하면 홈 메뉴로 이동하는 방법?
- 28. 내 홈 네트워크
- 29. 버튼을 누를 때 앱이 종료됩니다.
- 30. 홈 버튼을 누르거나 전화가 연결되어 앱이 비활성 상태가 된 경우를 구별합니다.
이 iOS 또는 Mac OS X입니까? 그에 따라 질문에 태그를 달아야합니다. – millimoose
나는 홈 버튼이 iOS 장치에만 존재한다고 생각한다. – Saurabh