第10行出现2个错误:
预期类型
和
预期;方法原型之后
在编译我的应用程序时。
显示错误的名为NSBundle+NYTPhotoViewer.m
的文件具有以下代码-
#import "NSBundle+NYTPhotoViewer.h"
#import "NYTPhotosViewController.h" // This is line 10
@implementation NSBundle (NYTPhotoViewer)
+ (instancetype)nyt_photoViewerResourceBundle {
static NSBundle *resourceBundle = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSString *resourceBundlePath = [[NSBundle bundleForClass:[NYTPhotosViewController class]] pathForResource:@"NYTPhotoViewer" ofType:@"bundle"];
resourceBundle = [self bundleWithPath:resourceBundlePath];
});
return resourceBundle;
}
@end