Code Monkey home page Code Monkey logo

Comments (4)

liuqingtong avatar liuqingtong commented on June 26, 2024

你指的是哪种翻页模式?

from dzmebookread.

xiguagaga avatar xiguagaga commented on June 26, 2024

你指的是哪种翻页模式?

(我没有实际写过)我初步的想法是:无论是横向翻页还是垂直阅读方式,直接采用textView都会更加方便呀!

首先,横向(仿真、水平)翻页可以直接使用NSTextStorage类为textview的文本做分页处理,很方便。
其次,垂直阅读方式的话,直接使用textView就更加简单了,因为textView自带滚动效果,所以不需要我们去拼接内容,所以不需要做额外处理就可以避免 #38 中提到的问题(有时候两行文字贴的很近,我猜测这个问题是cell与cell之间拼接造成的,当然,这个问题你已经解决。)

以上是我的初步想法。

当我在准备写一个阅读器时,我看到你已经写出了相当完善的阅读器,但是发现你没有使用textView,所以想请教一下你,不采用textView是否有其他我没有考虑到的缺点(换句话说就是采用自己绘制文本会更加方便实现某些功能)。

from dzmebookread.

dengzemiao avatar dengzemiao commented on June 26, 2024

@xiguagaga 可以使用textView做,只是我之前做小说阅读的时候最先接触的就是CoreText,所以用的是这个,你用UIKit里面的相关控件做阅读,都是一样的 只是CoreText底层一点吧,我是先接触到这个才用这个,以前我做笔记项目的时候也用过textview 但是后面做的时候已经用习惯这个ct的语法函数了,我就肯定会选择熟悉一点的用 uitextview 那么我还得去熟悉我忘记的属性东西。

from dzmebookread.

xiguagaga avatar xiguagaga commented on June 26, 2024

好的,感谢!

from dzmebookread.

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.