我正在检查来自 github 的示例项目,我收到此错误,在其中一个类中,其中有很多类,但我只在此类中找到了门。错误是“接收器类型视图控制器例如消息没有使用选择器“loadChapter:forBook”声明方法
错误出现在这种方法中,
- (void)displayBook: (int)theBook andChapter: (int)theChapter andVerse: (int)theVerse
{
[((PKRootViewController *)self.parentViewController.parentViewController ) showWaitingIndicator];
PKWait(//here i got this error
[self loadChapter:theChapter forBook:theBook];
//[self.tableView reloadData];
[self reloadTableCache];
[(PKHistory *)[PKHistory instance] addPassagewithBook:theBook andChapter:theChapter andVerse:theVerse];
[self notifyChangedHistory];
((PKSettings *)[PKSettings instance]).topVerse = theVerse;
if (theVerse>1)
{
[self.tableView scrollToRowAtIndexPath: [NSIndexPath indexPathForRow:theVerse-1 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO];
}
else
{
[self.tableView scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:NO];
}
UITabBarController *tbc = (UITabBarController *)self.parentViewController.parentViewController;
tbc.selectedIndex = 0;
);
}
而且这个方法也有这个错误
- (void)loadChapter: (int)theChapter forBook: (int)theBook
{
// clear selectedVerses
selectedVerses = [[NSMutableDictionary alloc] init];
PKSettings *theSettings = [PKSettings instance];
theSettings.currentBook = theBook;
theSettings.currentChapter = theChapter;
//[theSettings saveCurrentReference]; -- removed for speed
[self loadChapter];//here i got the error,,in this case after selector'loadChapter;
}
这个错误的原因是什么,错误显示它显示的窗口,自动引用计数问题