Skip to content
プロジェクト

概要

CYRTextView は UITextView のサブクラスで、シンタックス表示やコード用テキストビューに役立つさまざまな機能を実装しています。

Web・アプリ開発

この数値の測り方

計測したスター増加

24時間
0
7日間
0
15日間
0
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

CYRTextView

Version License Platform

by Illya Busigin

Purpose

CYRTextView is a UITextView subclass that implements a variety of features that are relevant to a syntax or code text view. There are many subclasses of UITextView out there with the release of TextKit but none that are specifically tailored towards a code/syntax view. CYRTextView aims to change this. Features include:

  • Regular expression based text highlighting with support for multiple text attributes for each expression
  • Line numbers
  • Gesture based navigation

Long term, I would like to turn CYRTextView into a full fledged code editor component with code folding, markers, annotation, and more.

Screenshot

Requirements

iOS 7.0 or later (with ARC) for iPhone, iPad and iPod touch

Installation

To use CYRTextView, just drag the class files into your project and add the CoreText framework. You can create CYRTextView instances programatically, or create them in Interface Builder by dragging an ordinary UITextView into your view and setting its class to CYRTextView.

If you are using Interface Builder, to set the custom properties of CYRTextView (ones that are not supported by regular UIViews) either create an IBOutlet for your view and set the properties in code, or use the User Defined Runtime Attributes feature in Interface Builder (introduced in Xcode 4.2 for iOS 5+).

NOTE: The current version (0.4.0) is alpha quality at best. Use at your own risk!

Example

CYRTextView includes an example project that demonstrates how to subclass CYRTextView to provide highlighting behavior for multiple attributes with a default set of normal, bold, and italic fonts.

Bugs & Feature Requests

There is no support offered with this component. If you would like a feature or find a bug, please submit a feature request through the GitHub issue tracker.

Pull-requests for bug-fixes and features are welcome!

Attribution

CYRTextView uses portions of code from the following sources.

Component Description License
NLTextView A UITextView with Syntax Highlighting and Pan-Gesture Navigation / Selection MIT
TextKit_LineNumbers iOS7 Text Kit - Text View with Line Numbers MIT

関連プロジェクトを探す

読み込み中…