나는 ios4에서 ALAssetsLibraryChangedNotification
을 구현했으며 완벽하게 작동했지만 지금은 iOS5에서 무시당하는 것처럼 보입니다. 내보기 컨트롤러 초기화에iOS5에서 ALAssetsLibraryChangedNotification이 트리거되지 않습니까?
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(ALAssetsLibraryChangedNotification) name: ALAssetsLibraryChangedNotification object:self.library];
및 할당 해제에 내가 넣어 : 나는 추가
[[NSNotificationCenter defaultCenter] removeObserver:self name:ALAssetsLibraryChangedNotification object:nil];
그런 다음 methdod 구현 자체는 다음과 같습니다
- (void) ALAssetsLibraryChangedNotification
{
//doSomeStuff
}
내가 이니셜에 추가해야 dealloc에서 제거하여 사용자가 앱에서 라이브러리를 변경하는 경우 업데이트합니다. 누구든지 이것에 대한 좋은 해결책을 알고 있습니까?
ALAssetsLibraryChangedNotification (되지 NSManagedObjectContextObjectsDidChangeNotification)를 관찰 (http://www.openradar.me/10484334). 따라서 필자가 작성한 링크에 설명 된 해결 방법을 수행해야합니다. – KatokichiSoft