SVProgressHUD.m中
sharedView方法
修改为下面的代码:
+ (SVProgressHUD*)sharedView {
static dispatch_once_t once;
static SVProgressHUD *sharedView;
//#if !defined(SV_APP_EXTENSIONS)
// dispatch_once(&once, ^{
// dispatch_async(dispatch_get_main_queue(), ^{
// sharedView = [[self alloc] initWithFrame:[[[UIApplication sharedApplication] delegate] window].bounds];
// });
// });
//#else
dispatch_once(&once, ^{ sharedView = [[self alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; });
//#endif
return sharedView;
}