Latest 0.4.1
Homepage https://github.com/GuessEver/CodeEditorView
License MIT
Platforms ios 8.0, requires ARC
Dependencies RFKeyboardToolbar
Frameworks Foundation, UIKit
Authors

Build Status
[CocoaPods]()
[CocoaPods]()
[CocoaPods]()

Code Editor UITextView

Introduction

You can use it to edit code with highlight and auto indent

Useage

  1. import main header #import "CodeEditorView.h"
  2. create a view to your view
    CodeEditorView* codeView = [[CodeEditorView alloc] initWithLanguage:CodeEditorLanguageCpp];
    [codeView setFrame:self.view.frame];
    [self.view addSubview:codeView];
  3. done!
  4. if you want to load code by code, use
    [codeView loadText:@"#include <cstdio>nint main() {ntprintf("hello world");ntreturn 0;n}"];

Installation

  1. Simply drag folder CodeEditorView to your project
  2. Install with pod pod install CodeEditorView

Language

We support C, Cpp, Pascal and Java grammar highlight now

typedef enum {
CodeEditorLanguageC = 0,
CodeEditorLanguageCpp,
CodeEditorLanguagePascal,
CodeEditorLanguageJava,
CodeEditorLanguagePlain
} CodeEditorLanguageType;

Theme

We just have one theme now just like Xcode. Hope for more in the future.

Thanks

Module Git License
TextKit_LineNumbers https://github.com/alldritt/TextKit_LineNumbers.git MIT
RFKeyboardToolbar https://github.com/ruddfawcett/RFKeyboardToolbar.git MIT

License

MIT

Latest podspec

{
    "name": "CodeEditorView",
    "version": "0.4.1",
    "summary": "A Code Editor TextView for iOS",
    "description": "You can edit code with CodeEditorView with highlight and autoIndent",
    "homepage": "https://github.com/GuessEver/CodeEditorView",
    "license": "MIT",
    "authors": {
        "GuessEver": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/GuessEver/CodeEditorView.git",
        "tag": "0.4.1"
    },
    "source_files": "CodeEditorView/*",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "requires_arc": true,
    "dependencies": {
        "RFKeyboardToolbar": [
            "~> 1.3"
        ]
    }
}

Pin It on Pinterest

Share This