Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

打开电子书翻了几页之后把App不删除直接重装会出现闪退 #59

Open
noahxinhao opened this issue Jul 27, 2018 · 0 comments

Comments

@noahxinhao
Copy link

if (_model.type == ReaderEpub) {
_readView.type = ReaderEpub;
if (!_model.chapters[chapter].epubframeRef) {
NSLog(@"%@",_model.chapters[chapter].chapterpath);
NSString* html = [[NSString alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL fileURLWithPath:_model.chapters[chapter].chapterpath]] encoding:NSUTF8StringEncoding];
_model.chapters[chapter].content = [html stringByConvertingHTMLToPlainText];
[_model.chapters[chapter] parserEpubToDictionary];
[_model.chapters[chapter] paginateEpubWithBounds:CGRectMake(0,0, [UIScreen mainScreen].bounds.size.width-LeftSpacing-RightSpacing, [UIScreen mainScreen].bounds.size.height-TopSpacing-BottomSpacing)];
}

    _readView.epubFrameRef = **_model.chapters[chapter].epubframeRef[page];**
    _readView.imageArray = _model.chapters[chapter].imageArray;
    _readView.content = _model.chapters[chapter].content;
    _readView.chapterModel=_model.chapters[chapter];
}

_model.chapters[chapter].epubframeRef[page]; 会在第二次打开图书的时候报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant