Open ijinmao opened 9 years ago
Thanks for the report!
Could you include which Xcode and iOS version you are using? Also if this happens on device only or in the simulator too.
Thanks for the reply~
Xcode version: 6.3 iOS version: 8.0 Test on iPhone 5c and iPad air
My app running process is:
When a user deletes his/her photo, app request to server, CRToast is showing "Deleting..." on statusBar before server responses(I set kCRToastTimeIntervalKey to DBL_MAX).
When request responses, app calls [CRToastManager dismissNotification:YES] in the response completion block, and then(next line of codes) app calls CRToast to show "deleted"(set kCRToastTimeIntervalKey to one sec).
But sometimes CRToastView is still showing "Deleting..." after server response.
Which version of CRToast
are you using by chance?
I copied the CRToast directory of master branch to my project.
@ijinmao are you sure you are calling the dismiss method on main thread? if your response completion block is in the background thread, any update ui is uncertain. may be you can try wrapping the call in a dispathc_async
block?
dispatch_async(dispatch_get_main_queue(), ^{
[CRToastManager dismissNotification:YES];
}];
I came across this instance:
The toast notification is still showing after kCRToastTimeIntervalKey.
And [CRToastManager isShowingNotification] returns NO, but statusBar is covered by toast View.