pikacode/EBBannerView

iOS 12 beta 闪退

eric0815 opened this issue · 4 comments

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/eagle/Library/Developer/CoreSimulator/Devices/07D4020A-3F02-4401-8F6C-7CBE2F9CB6FB/data/Containers/Bundle/Application/66A18A55-B7B2-4483-9530-B03C9746EB2F/demo.app> (loaded)' with name 'EBBannerViewController''

没有iOS 12的样式, 可以使用make.style = EBBannerViewStyleiOS11;

楼上说的很对

NSArray *arr = [[NSBundle bundleForClass:self.class] loadNibNamed:@"EBBannerView" owner:nil options:nil]
bannerView = ((style-9) >= arr.count) ? arr.lastObject : arr[style - 9];