CodeEditorView
CodeEditorView copied to clipboard
Code Editor UITextView
CodeEditorView
Code Editor UITextView
Introduction
You can use it to edit code with highlight and auto indent

Useage
- import main header
#import "CodeEditorView.h"
- create a view to your view
CodeEditorView* codeView = [[CodeEditorView alloc] initWithLanguage:CodeEditorLanguageCpp];
[codeView setFrame:self.view.frame];
[self.view addSubview:codeView];
- done!
- if you want to load code by code, use
[codeView loadText:@"#include <cstdio>\nint main() {\n\tprintf(\"hello world\");\n\treturn 0;\n}"];
Installation
- Simply drag folder
CodeEditorView
to your project - 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