Git Product home page Git Product logo

Comments (4)

LambentWu avatar LambentWu commented on July 21, 2024

txt文件的分页有问题,上页不接下页

from reader.

GGGHub avatar GGGHub commented on July 21, 2024

fix

from reader.

tyfinal avatar tyfinal commented on July 21, 2024

刚测试了下,修改字体导致闪退的问题还是存在的。

from reader.

tyfinal avatar tyfinal commented on July 21, 2024

`- (nullable UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController
{

if (_pageIsAnimating){
    return nil;
}

_pageChange = _page;
_chapterChange = _chapter;

if (_chapterChange==0 &&_pageChange == 0) {
    //当前页已经是第一章第一页
    return nil;
}

if (_pageChange==0) {
    _chapterChange--;
    _pageChange = _model.chapters[_chapterChange].pageCount-1;
}
else{ 
    _pageChange--;
}

return [self readViewWithChapter:_chapterChange page:_pageChange];

}`

这里的 _pageChange = _model.chapters[_chapterChange].pageCount-1; 这样写好像有点问题。字体放大以后,所有章节的页面数都会增加。然后在当前章节下减小字体,当向前翻页到_pageChange==0 执行时,_model.chapters[_chapterChange].pageCount-1 获取的值是字体缩小前该章节的最后一页。然后执行 [self readViewWithChapter:_chapterChange page:_pageChange],其中对章节进行了重新分页。此时的页面数目应该是小于字体减小前的页面总数的。所以导致了数组越界。不知道可看懂了,希望有时间可以看下。

from reader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.