ggghub / reader Goto Github PK
View Code? Open in Web Editor NEWiOS基于CoreText实现的电子书阅读器,支持txt,epub格式
Home Page: https://github.com/GGGHub/Reader
iOS基于CoreText实现的电子书阅读器,支持txt,epub格式
Home Page: https://github.com/GGGHub/Reader
翻了差不多400多页左右的时候会提示CoreAnimation: failed to allocate xxxx bytes,然后页面上面就空白了,尝试了好多办法无法解决,
一般情况是第一次编译程序可以正常显示,之后如果不删除应用重新编译会出现图片不显示或者不能读取epub文件。这是因为重新编译后解压的文件路径会发生变化会导致找不到相关的文件造成的。我直接存的是文件的绝对路径。这点后续会更改成保存相对路径。这种情况会影响调试但不会影响正常使用。
有些书本目录显示空白 (epub格式书本,有一种opf文件里面没有目录,直接从ncx里面读取的)、 但可以点击。大神求解
When i open a big Epub file,it'll crash with message:
Terminated due to memory issue
Did you met the same problems?
怎么处理css样式与epub自带的本地图片
当我保存了一个书签,改变文字大小后,书签无法准确的定位!你是根据什么机制来确定这个文字的位置的?
你好,epub 格式还是不能显示图片吗?
阅读界面偶尔卡死,没有crash,只是无论怎么操作,屏幕都没有反应,不响应事件了,调试多次未能解决,楼主遇到过类似的吗
epub添加笔记,或者做了修改之后;重新进入,显示不了阅读内容,再次点击或者滑动,闪退
epub 格式 自带的图片和CSS样式怎么用那,请楼主不吝赐教
iOS 11掉不出来菜单
貌似只有iPhone X才能显示菜单,其他机型都不显示
作者你好,非常感谢你这个demo
在LSYReadUtilites.m这个文件里,有一个“解压文件路径”方法
#pragma mark - 解压文件路径 +(NSString *)unZip:(NSString *)path { ZipArchive *zip = [[ZipArchive alloc] init]; NSString *zipFile = [[path stringByDeletingPathExtension] lastPathComponent]; if ([zip UnzipOpenFile:path]) { NSString *zipPath = [NSString stringWithFormat:@"%@/%@",NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject,zipFile]; NSFileManager *filemanager=[[NSFileManager alloc] init]; if ([filemanager fileExistsAtPath:zipPath]) { NSError *error; return zipPath; } if ([zip UnzipFileTo:[NSString stringWithFormat:@"%@/",zipPath] overWrite:YES]) { return zipPath; } } return nil; }
我想知道为什么判断解压路径已经存在的话,为什么要remove掉呢?为什么不直接返回呢?
麻烦大神有时间做一下css样式的更新
一直滑动一本书几百页以后会卡死,黑屏现象
你好,从竖屏切换到横屏的时候,发现右边有一大片空白,在iPad上,然后我再LSYReadViewController里加了一个函数,结果发现字体拉伸了,求问怎么解决呢?
我加的代码:`-(void)viewDidLayoutSubviews
{
[super viewDidLayoutSubviews];
_readView.frame = CGRectMake(LeftSpacing,TopSpacing, self.view.frame.size.width-LeftSpacing-RightSpacing,self.view.frame.size.height-TopSpacing-BottomSpacing);
LSYReadConfig *config = [LSYReadConfig shareInstance];
_readView.frameRef = [LSYReadParser parserContent:_content config:config bouds:CGRectMake(0,0, _readView.frame.size.width, _readView.frame.size.height)];
_readView.content = _content;
}
`
还有再切换到横屏的时候,点击翻页的区域怎么增大呢?好像跟竖屏的区域是一样的。。。
当我导入后,添加libz.tdb后'libxml/tree.h' file not found, 之后我导入libxml.tdb, 然后又设置了Header search Path中${SDK_ROOT}/usr/include/libxml2添加后,然后整个工程就红了。
iOS 11 点击中间不显示操作栏
关于如何改变书籍的字体 请问有相关接口吗?
按照READ ME 操作,莫名报红,各种红
文本之间可以设置行间距吗?可以的话是如何设置的?
大神 项目中有些图片不显示 在不同的字体下 position和图片的位置对应不上 导致图片不显示
楼主 有时间图片问题修复一下
epub 的样式用Core Text 来实现, 是不是很复杂?
现在主流的阅读器(多看, 掌阅) 应该是使用了js, html 来做的, 这样iOS, Android就可以通用一套了.
epub格式的书籍,连续点击,会出现黑屏,必须退出再进恢复正常,高频复现。
epub格式的书籍,连续点击,如果出现了空白页,则往后翻一直是空白页。
求问这是什么问题呢
编译运行,打开epub直接崩溃
LSYReadUtilites方法parseOPF加载每章的内容时,如果chapHref的值包含@号时,@"@test",如上,原因是使用了valueForKey的KVC的方法取值,正确方法是objectForKey取值,具体原因valueForKey会去掉@符号并且sendMsg [super valueForKey]。
楼主,你好,导入框架之后报了许多错,按照你redame的提示操作的,项目本身有pch文件,我复制你demo中的下面部分,lztb也导入了
作者你好,既然适配了iPhone x,那么是不是也修复一下,放大字号,出现上文不接下文的bug呢?
谢谢。
书籍点开过一次后,在Xcode中再次运行时,已经点开过的书籍就变为空白了。这样导致我上架过的APP,如果更新版本的话,用户点开过一次的书籍就会变成空白,只能是把原来的删掉,再次重新下载才可以出现,请问这个问题怎么解决?
你好,一直在关注这个仓库的更新,是否可以考虑制作成一个pod库么
页面点击事件,调不出菜单栏
您好,就是epub格式的,文章里面图片多了,有些不显示,请问有啥好的方法可以解决,切换字体大小后,显示的图片也有可能不显示了,
我是在LSYReadViewController.m中打印的如下数据不准确,另外,点击某一章时,跳转没有问题,但是打印的模型数据依然不准确的。左翻页和右翻页的页码处理也有问题。
NSLog(@"readview界面 chapter= %ld recodepage = %ld pagecount = %ld",self.recordModel.chapter,self.recordModel.page,self.recordModel.chapterModel.pageCount);
Undefined symbols for architecture arm64:
"_xmlFreeNode", referenced from:
-[CXMLNode(CXMLNode_PrivateExtensions) invalidate] in CXMLNode_PrivateExtensions.o
"_xmlNewPI", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) processingInstructionWithName:stringValue:] in CXMLNode_CreationExtensions.o
"_xmlNewNs", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:URI:] in CXMLNode_CreationExtensions.o
"_xmlNewNode", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:] in CXMLNode_CreationExtensions.o
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:URI:] in CXMLNode_CreationExtensions.o
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:stringValue:] in CXMLNode_CreationExtensions.o
"_xmlNewText", referenced from:
-[CXMLElement(CXMLElement_CreationExtensions) setStringValue:] in CXMLElement_CreationExtensions.o
"_xmlSetNs", referenced from:
-[CXMLElement(CXMLElement_CreationExtensions) addNamespace:] in CXMLElement_CreationExtensions.o
"_xmlNodeDumpOutput", referenced from:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
"_xmlOutputBufferFlush", referenced from:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
"_xmlGetCharEncodingName", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
"_xmlDocSetRootElement", referenced from:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
+[CXMLNode(CXMLNode_CreationExtensions) documentWithRootElement:] in CXMLNode_CreationExtensions.o
"_xmlAddChild", referenced from:
-[CXMLDocument(CXMLDocument_CreationExtensions) addChild:] in CXMLDocument_CreationExtensions.o
-[CXMLElement(CXMLElement_CreationExtensions) addChild:] in CXMLElement_CreationExtensions.o
-[CXMLElement(CXMLElement_CreationExtensions) setStringValue:] in CXMLElement_CreationExtensions.o
"_xmlAddPrevSibling", referenced from:
-[CXMLDocument(CXMLDocument_CreationExtensions) insertChild:atIndex:] in CXMLDocument_CreationExtensions.o
"_htmlReadMemory", referenced from:
-[CXHTMLDocument initWithXHTMLData:encoding:options:error:] in CXHTM
请问大神项目支持epub3.0吗?
1、保存书签和没保存过书签,右上角的图片如果有区分就好了,翻到相关页面,可以明确看到当前页面是否存储过书签
2、书签可以重复保存
请问可以设置上下滑动翻页吗?
一本书有很多图片在滑动的时候就会非常卡顿,还有图片的宽高计算也有问题
有的txt文件显示不了文字 是什么情况
add library libxml2.2
Other Linker Flags
-lxml2
Header Search Paths
/usr/include/libxml2 -non-require
XXXXXXHTML(3 documents) and
ZipArchive.mm
need -fno-objc-arc work on mrc
可以新增读取PDF吗
先放大字体,翻几页后, 再缩小字体,往回翻,然后数组就越界了,我暂时加了个判断,不崩了,但根本问题还是没有解决
txt文件的分页有问题,上页不接下页,epub格式的不知道是本来就有空白还是什么问题
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.