Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 2.17 KB

README.md

File metadata and controls

56 lines (35 loc) · 2.17 KB

HorizontalTextView

CI Status Version License Platform

Demo

demo

TODO

  • RTL
  • IB Integration
  • Selection
  • Asynchronous Rendering
  • Custom Page Transitions (built-in and/or through delegation)

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • iOS 10+
  • Swift 4.2

Installation

HorizontalTextView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'HorizontalTextView'

Author

ahmedk92, ahmedkhalaf.92@gmail.com

License

HorizontalTextView is available under the MIT license. See the LICENSE file for more info.

Idea

This is a straightforward implementation of the idea described here in the official docs.

An NSLayoutManager gradually lays out text (NSTextStorage) in a series of NSTextContainer objects (each representing a page of text). A separate UITextView is created for each NSTextContainer, and they take care of actual rendering. Then a UIScrollView wraps the text views for scrolling/paging.

Contribution

Contributions are welcome in the form of issues, but pull requests are preferred. Please consider the following when submitting code:

  1. Add documentation for public properties and functions.
  2. Make a separate pull request for each feature/bugfix.
  3. If new files are added, please make sure they're included in the podspec. For convenience, just add it in the Classes subfloder.