안녕하세요, 저는 이것이 아주 솔직한 것이라고 확신하지만 어디에서나 정보를 찾을 수 없습니다. 배경에서 열 때 일부 정보를 다시로드하려면 앱이 필요합니다 (새로 열지는 않음). 어떤 아이디어로 그렇게 할 수 있습니까? 잠자기에서 앱 가져 오기 기능 실행
는
3
A
답변
4
UIApplicationDelegate
프로토콜에 applicationDidBecomeActive
및 applicationWillEnterForeground
의 설명서를 살펴 보자 감사합니다 http://developer.apple.com/library/ios/#documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html
5
앱이 UIApplicationDelegate
에 - (void)applicationWillEnterForeground:(UIApplication *)application
을 대체 할 수 있습니다.
또한 컨트롤러를 UIApplicationWillEnterForegroundNotification의 옵서버로 설정하십시오. Apple Docs에 따르면 : 응용 프로그램이 활성 상태가되는 도중에 백그라운드 상태를 떠나기 직전에 게시됩니다. NIB 파일에서 컨트롤러
샘플 코드, 그렇지 않으면 - (id)init
를 오버라이드 (override) : 완벽한 소리
- (void)awakeFromNib {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(wakeUp:) name:UIApplicationWillEnterForegroundNotification object:nil];
}
- (void)wakeUp:(NSNotification *)pNotification {
NSLog(@"Name: %@", [pNotification name]);
NSLog(@"Object: %@", [pNotification object]);
NSLog(@"I am waking up");
}
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
관련 문제
- 1. 가져 오기 기능
- 2. 실행 코드가있는 디렉토리 가져 오기
- 3. 코드 실행 시간 가져 오기
- 4. iOS에서 "실행"시간 가져 오기
- 5. 파일 가져 오기 절차 실행
- 6. 기존 앱 가져 오기 또는 새로운 앱 엔진 생성하기
- 7. Magento 모델 목록/가져 오기 기능
- 8. 프로토 타입 태그로 가져 오기 기능
- 9. iPhone - 앱 데이터 가져 오기/내보내기?
- 10. iPhone 앱 : 웹 API없이 데이터 가져 오기
- 11. 웹 서비스를 사용하는 앱 가져 오기
- 12. 앱 엔진 URL 가져 오기 문제
- 13. 자바 스크립트에서 앱 사용자 가져 오기
- 14. 구글 앱 엔진 (파이썬) 가져 오기
- 15. Android : 인 텐트에서 앱 이름 가져 오기
- 16. 다른 앱 (특히 iPhone의 Phone 앱)에서 정보 가져 오기
- 17. 무료 앱 DB에서 유료 앱 데이터베이스로 데이터 가져 오기
- 18. unittest에 대한 앱 엔진 앱 상위 디렉토리 가져 오기
- 19. Java j2me 실행 결과 가져 오기 스레드
- 20. FileUtils에서 실행 된 명령 가져 오기?
- 21. 원격 실행 프로세스에서 상태 가져 오기
- 22. 외부 실행 프로그램에서 문자열 가져 오기
- 23. 실행 후 프로그램의 파이썬 변수 가져 오기
- 24. 스레드의 실행 시간 가져 오기 java
- 25. 부가 기능 Android 앱
- 26. Android 앱 -보기 기능
- 27. 실행 파일이 아닌 실행 파일에서 버전 가져 오기
- 28. PHP 파일의 실행/실행 후 내용 가져 오기
- 29. 가져 오기 배열 가져 오기
- 30. SystemEvents 및 잠자기에서 다시 시작
. 어떤 아이디어를 어떻게 내 View Controller에서 실행시킬 수 있습니까? – Rob