Latest 0.3.1
Homepage https://github.com/ahmedk92/HorizontalTextView
License MIT
Platforms ios 10.0
Authors

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, [email protected]

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.

Latest podspec

{
    "name": "HorizontalTextView",
    "version": "0.3.1",
    "summary": "A horizontal `UITextView` wrapper",
    "description": "`HorizontalTextView` is a `UIView` subclassnthat layouts text horizontally.nIt encapsulates a `UIScrollView` instance that contains ancollection of `UITextView` instances where each representsna page of text.",
    "homepage": "https://github.com/ahmedk92/HorizontalTextView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ahmedk92": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ahmedk92/HorizontalTextView.git",
        "tag": "0.3.1"
    },
    "platforms": {
        "ios": "10.0"
    },
    "swift_version": "4.2",
    "source_files": "HorizontalTextView/Classes/**/*"
}

Pin It on Pinterest

Share This