All Projects → ChimeHQ → TextStory

ChimeHQ / TextStory

Licence: BSD-3-Clause License
Happier, more flexible NSTextStorage

Programming Languages

swift
15916 projects
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to TextStory

WebPKit
A framework that extends a variety of Cocoa APIs with capabilities for encoding and decoding WebP files for all of Apple's platforms.
Stars: ✭ 29 (-51.67%)
Mutual labels:  uikit, appkit
NativeMarkKit
NativeMark is a flavor of Markdown designed to be rendered by native apps.
Stars: ✭ 36 (-40%)
Mutual labels:  uikit, appkit
AppUIKit
iOS interface design for macOS app
Stars: ✭ 25 (-58.33%)
Mutual labels:  uikit, appkit
Invalidating
Backports the new @invalidating property wrapper to older platforms
Stars: ✭ 53 (-11.67%)
Mutual labels:  uikit, appkit
ikyle.me-code-examples
Smaller code examples from my blog posts on ikyle.me
Stars: ✭ 29 (-51.67%)
Mutual labels:  uikit, appkit
TextViewPlus
Collection of useful extensions when working with NSTextView
Stars: ✭ 28 (-53.33%)
Mutual labels:  appkit, nstextview
Driftwood
Driftwood is a DSL to make Auto Layout easy on iOS, tvOS and macOS.
Stars: ✭ 14 (-76.67%)
Mutual labels:  uikit, appkit
Selector-Closure
A light way to convert objc target-action style to closure
Stars: ✭ 14 (-76.67%)
Mutual labels:  uikit
Texture
Smooth asynchronous user interfaces for iOS apps.
Stars: ✭ 7,512 (+12420%)
Mutual labels:  uikit
iakit
无依赖 mini 组件库,只封装了 alert, toast, loading, actionSheet 等使用频率较高的组件。适用于类似 H5 活动页的简单移动端项目,不必为了使用这些组件而引入一个大而全的 UI 库和框架。
Stars: ✭ 38 (-36.67%)
Mutual labels:  uikit
Generic-Network-Layer iOS
Generic Network Layer created using Swift.
Stars: ✭ 32 (-46.67%)
Mutual labels:  uikit
AndroidUIKit
UIKit for Android
Stars: ✭ 45 (-25%)
Mutual labels:  uikit
ng-sq-ui
Flexible and easily customizable UI-kit for Angular 11+
Stars: ✭ 99 (+65%)
Mutual labels:  uikit
ColorUp
An easy way to generate strongly typed Swift extensions for either UIColor or Color based off of your colors within the project's asset catalog.
Stars: ✭ 16 (-73.33%)
Mutual labels:  uikit
SectionKit
♻️ Reusable sections for UICollectionView
Stars: ✭ 47 (-21.67%)
Mutual labels:  uikit
column-text-view-ui
📄 Column Text View is an adaptive UI component that renders text in columns, horizontally [iOS 12, UIKit, TextKit, SwiftUI].
Stars: ✭ 11 (-81.67%)
Mutual labels:  uikit
TableViewKit
Empowering UITableView with painless multi-type cell support and built-in automatic state transition animations
Stars: ✭ 105 (+75%)
Mutual labels:  uikit
JDToaster
🍞 Toasty iOS alerts
Stars: ✭ 25 (-58.33%)
Mutual labels:  uikit
qi-design-vue
This is a design standard with an implement for web UI components library based on Vue.
Stars: ✭ 26 (-56.67%)
Mutual labels:  uikit
ocean-web
Blu's Design System
Stars: ✭ 25 (-58.33%)
Mutual labels:  uikit

Build Status License Platforms

TextStory

TextStory is a small set of classes and protocols for easier work with NSTextStorage and associated systems. iOS and macOS are supported.

Integration

Swift Package Manager:

dependencies: [
    .package(url: "https://github.com/ChimeHQ/TextStory")
]

TSYTextStorage

A minimal NSTextStorage subclass that provides hooks for much more powerful delegate behavior. Great for separating logic/behavior from your storage object. Because it is built to wrap another NSTextStorage instance, it is more easily composable.

Unfortunately, to date I've not been able to figure out a way to build this class in Swift. If you have experience working with NSTextStorage and Swift/ObjC automatic NSString/String bridging, I'd love to hear from you.

- (void)textStorage:(TSYTextStorage *)textStorage willReplaceCharactersInRange:(NSRange)range withString:(NSString *)string;
- (void)textStorage:(TSYTextStorage *)textStorage didReplaceCharactersInRange:(NSRange)range withString:(NSString *)string;
- (void)textStorageProcessEditingComplete:(TSYTextStorage *)textStorage;

// available for macOS only
- (NSRange)textStorage:(TSYTextStorage *)textStorage doubleClickRangeForLocation:(NSUInteger)location;
- (NSUInteger)textStorage:(TSYTextStorage *)textStorage nextWordIndexFromLocation:(NSUInteger)location direction:(BOOL)forward;

BufferingTextStorage

An NSTextStorage subclass that maintains a history of text changes with low memory and performance overhead. This class makes it possible to decouple text change processing from them Cocoa text display system, making them asynchronous with respect to each other. Very useful for keeping your UI fast and responsive even if the processing of changes can be slow.

// interact with the buffered view of text
func bufferedSubstring(from range: NSRange) -> String
var bufferedLength: Int

// commit one change in the queue, allowing precise control over how the buffered view changes
func applyNextChange()

TextStoring

A simple protocol that abstracts string storage. This is very useful for standardizing behavior across NSTextStorage, NSTextView and other objects you may use for text manipulation. Particularly handy for testing and decoupling systems from Apple's classes behaviors/APIs.

TextStoringMonitor

Standard interface for systems that need to observe and react to changes in a TextStoring instance.

LazyTextStoringMonitor

A concrete TextStoringMonitor class that implements progressive, on-demand access to a wrapped TextStoringMonitor. This makes it easy to add lazy semantics on top of an existing TextStoringMonitor, which can be very helpful for handling large documents.

CompositeTextStoringMonitor

An easy way to group together a collection of TextStoringMonitor instances and tread them as a single unit.

TextMutationEventRouter

This class can accept and route TSYTextStorage delegate callbacks to multiple TextStoringMonitor instances. This is super handy for faning-out these calls.

Suggestions or Feedback

We'd love to hear from you! Get in touch via twitter, an issue, or a pull request.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].