-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
提示弹窗销毁时导致监听被提前释放 #97
Comments
有什么问题吗?
发自我的iPhone
… 在 2021年4月20日,15:53,李浪 ***@***.***> 写道:
(void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion
{
for (UIViewController *childVC in self.childViewControllers) {
if ([childVC ***@***.***(viewDidDealloc)]) {
[childVC ***@***.***(viewDidDealloc)];
}
}
[super dismissViewControllerAnimated:flag completion:completion];
}
(void)viewDidDealloc
{
LFImagePickerController *imagePickerVc = (LFImagePickerController *)self.navigationController;
if (imagePickerVc.syncAlbum) {
[[PHPhotoLibrary sharedPhotoLibrary] unregisterChangeObserver:self]; //移除监听者
}
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
(void)dealloc
{
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
再次拍摄后,列表就监听不到相册变化了呀,就显示不出来了呀,就虽然选中了,但是看不见。 |
不是很明白,触发LFImagePickerController的dismissViewControllerAnimated:completion:
意味着相册已经关闭了。怎么还有拍摄的?
… 2021年4月22日 上午11:33,李浪 ***@***.***> 写道:
再次拍摄后,列表就监听不到相册变化了呀,就显示不出来了呀,就虽然选中了,但是看不见。
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#97 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACNOL4TE3XFIEKOPT6K23FLTJ6KKPANCNFSM43HTLUDA>.
|
LFImagePickerController(UINavigationController)上弹出的 UIAlertController 在销毁时也触发了 LFImagePickerController 的 dismissViewControllerAnimated:completion哦,彩蛋不。而且 dismiss 只是代表暂时不显示,不代表销毁了呀。 |
久等了。暂时这样解决。
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion
{
for (UIViewController *childVC in self.childViewControllers) {
if ([childVC respondsToSelector:@selector(viewDidDealloc)]) {
[childVC performSelector:@selector(viewDidDealloc)];
}
}
[super dismissViewControllerAnimated:flag completion:completion];
}
(void)viewDidDealloc
{
LFImagePickerController *imagePickerVc = (LFImagePickerController *)self.navigationController;
if (imagePickerVc.syncAlbum) {
[[PHPhotoLibrary sharedPhotoLibrary] unregisterChangeObserver:self]; //移除监听者
}
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
(void)dealloc
{
}
The text was updated successfully, but these errors were encountered: