0
我已经在ios4中实现了ALAssetsLibraryChangedNotification
,它工作得很完美,但是现在在ios5中它似乎被忽略了。我补充一下:ALAssetsLibraryChangedNotification没有在ios5中被触发?
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(ALAssetsLibraryChangedNotification) name: ALAssetsLibraryChangedNotification object:self.library];
在我的视图控制器初始化
,并在dealloc中我把:
[[NSNotificationCenter defaultCenter] removeObserver:self name:ALAssetsLibraryChangedNotification object:nil];
然后methdod实现本身是:
- (void) ALAssetsLibraryChangedNotification
{
//doSomeStuff
}
我需要将其添加在初始化并在dealloc中将其删除,以便在用户更改应用程序之外的库时更新它。任何人都知道这个很好的解决方案?
这是一个[iOS5中的bug(http://www.openradar.me/10484334)。因此,我们必须在我写的链接中描述解决方法。 – KatokichiSoft 2012-02-26 08:59:03