Comments (4)
txt文件的分页有问题,上页不接下页
from reader.
fix
from reader.
刚测试了下,修改字体导致闪退的问题还是存在的。
from reader.
`- (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)
- 严重问题 HOT 1
- txt文件不显示文字
- 可设置行间距吗
- 请问可以设置上下滑动翻页吗? HOT 1
- 为什么我的导入之后报错 HOT 3
- 书籍点开过一次后,在Xcode中再次运行时,书籍变为空白 HOT 2
- 对于有多图的epub图书,图片显示有问题。
- 导入报错
- 作者,有个bug好久没修复了 HOT 1
- pod
- 报错 HOT 1
- In Yourself WorkSpace Noticeerror(在自己工程报错的请注意)
- 图书打开为空白,无法阅读 HOT 2
- 有bug啊 HOT 2
- 打开电子书翻了几页之后把App不删除直接重装会出现闪退
- 开个群305889729,一起讨论
- 修复部分图片不显示问题,重复页面问题 HOT 2
- 为啥第一次点开书籍或者从目录中进去目录,会有两页重复的页显示 HOT 1
- 请教下在线阅读epub要怎么做呢 HOT 2
- 大佬还在维护更新吗
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reader.