├── MarkdownSyntaxEditor ├── en.lproj │ └── InfoPlist.strings ├── EditorViewController.h ├── AppDelegate.h ├── main.m ├── MarkdownSyntaxEditor-Prefix.pch ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── EditorViewController.m ├── MarkdownSyntaxEditor-Info.plist ├── AppDelegate.m └── Base.lproj │ └── Main.storyboard ├── MarkdownSyntaxEditorTests ├── en.lproj │ └── InfoPlist.strings ├── MarkdownSyntaxEditorTests.m └── MarkdownSyntaxEditorTests-Info.plist ├── Lib ├── KOKeyBoard │ ├── resources │ │ ├── key.png │ │ ├── key@2x.png │ │ ├── key-blue.png │ │ ├── redo-black.png │ │ ├── redo-blue.png │ │ ├── undo-black.png │ │ ├── undo-blue.png │ │ ├── key-blue@2x.png │ │ ├── key-pressed.png │ │ ├── redo-blue@2x.png │ │ ├── undo-blue@2x.png │ │ ├── key-pressed@2x.png │ │ ├── redo-black@2x.png │ │ ├── trackpoint-blue.png │ │ ├── undo-black@2x.png │ │ ├── trackpoint-black.png │ │ ├── trackpoint-white.png │ │ ├── trackpoint-black@2x.png │ │ ├── trackpoint-blue@2x.png │ │ └── trackpoint-white@2x.png │ ├── KOSwipeButton.h │ ├── KOKeyboardRow.h │ ├── KOKeyboardRow.m │ └── KOSwipeButton.m ├── MarkdownTextView │ ├── MarkdownTextView.h │ └── MarkdownTextView.m └── MarkdownSyntax │ ├── MarkdownSyntaxGenerator.h │ ├── MarkdownSyntaxModel.m │ ├── MarkdownSyntaxModel.h │ └── MarkdownSyntaxGenerator.m ├── MarkdownSyntaxEditor.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── project.pbxproj ├── readme.md └── LICENSE /MarkdownSyntaxEditor/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | -------------------------------------------------------------------------------- /MarkdownSyntaxEditorTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/key.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/key@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/key@2x.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/key-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/key-blue.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/redo-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/redo-black.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/redo-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/redo-blue.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/undo-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/undo-black.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/undo-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/undo-blue.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/key-blue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/key-blue@2x.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/key-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/key-pressed.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/redo-blue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/redo-blue@2x.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/undo-blue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/undo-blue@2x.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/key-pressed@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/key-pressed@2x.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/redo-black@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/redo-black@2x.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/trackpoint-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/trackpoint-blue.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/undo-black@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/undo-black@2x.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/trackpoint-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/trackpoint-black.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/trackpoint-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/trackpoint-white.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/trackpoint-black@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/trackpoint-black@2x.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/trackpoint-blue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/trackpoint-blue@2x.png -------------------------------------------------------------------------------- /Lib/KOKeyBoard/resources/trackpoint-white@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/azu/MarkdownSyntaxEditor/HEAD/Lib/KOKeyBoard/resources/trackpoint-white@2x.png -------------------------------------------------------------------------------- /MarkdownSyntaxEditor/EditorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by azu on 2013/10/26. 3 | // 4 | 5 | 6 | #import 7 | 8 | 9 | @interface EditorViewController : UIViewController{} 10 | 11 | @end -------------------------------------------------------------------------------- /MarkdownSyntaxEditor.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Lib/MarkdownTextView/MarkdownTextView.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by azu on 2013/10/26. 3 | // 4 | 5 | 6 | #import 7 | 8 | @class MarkdownSyntaxGenerator; 9 | 10 | 11 | @interface MarkdownTextView : UITextView 12 | @end -------------------------------------------------------------------------------- /MarkdownSyntaxEditor/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // MarkdownSyntaxEditor 4 | // 5 | // Created by azu on 2013/10/26. 6 | // Copyright (c) 2013 azu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end -------------------------------------------------------------------------------- /MarkdownSyntaxEditor/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MarkdownSyntaxEditor 4 | // 5 | // Created by azu on 2013/10/26. 6 | // Copyright (c) 2013 azu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /MarkdownSyntaxEditor/MarkdownSyntaxEditor-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | 16 | #import 17 | 18 | #endif -------------------------------------------------------------------------------- /Lib/MarkdownSyntax/MarkdownSyntaxGenerator.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by azu on 2013/10/26. 3 | // 4 | 5 | 6 | #import 7 | #import "MarkdownSyntaxModel.h" 8 | 9 | 10 | extern NSRegularExpression* NSRegularExpressionFromMarkdownSyntaxType(MarkdownSyntaxType v); 11 | extern NSDictionary* AttributesFromMarkdownSyntaxType(MarkdownSyntaxType v); 12 | 13 | @interface MarkdownSyntaxGenerator : NSObject 14 | - (NSArray *)syntaxModelsForText:(NSString *) text; 15 | @end -------------------------------------------------------------------------------- /MarkdownSyntaxEditor/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /MarkdownSyntaxEditor/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /MarkdownSyntaxEditor/EditorViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by azu on 2013/10/26. 3 | // 4 | 5 | 6 | #import "EditorViewController.h" 7 | #import "MarkdownTextView.h" 8 | 9 | 10 | @implementation EditorViewController { 11 | __weak IBOutlet MarkdownTextView *editorTextView; 12 | } 13 | 14 | - (void)viewDidLoad { 15 | [super viewDidLoad]; 16 | } 17 | 18 | - (void)textViewDidEndEditing:(UITextView *) textView { 19 | [self.navigationController setNavigationBarHidden:NO]; 20 | } 21 | 22 | - (void)textViewDidBeginEditing:(UITextView *) textView { 23 | [self.navigationController setNavigationBarHidden:YES]; 24 | 25 | } 26 | 27 | 28 | @end -------------------------------------------------------------------------------- /Lib/MarkdownSyntax/MarkdownSyntaxModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by azu on 2013/10/26. 3 | // 4 | 5 | 6 | #import "MarkdownSyntaxModel.h" 7 | 8 | 9 | 10 | 11 | @implementation MarkdownSyntaxModel { 12 | 13 | } 14 | - (instancetype)initWithType:(enum MarkdownSyntaxType) type range:(NSRange) range { 15 | self = [super init]; 16 | if (self == nil) { 17 | return nil; 18 | } 19 | 20 | self.type = type; 21 | self.range = range; 22 | 23 | return self; 24 | } 25 | 26 | + (instancetype)modelWithType:(enum MarkdownSyntaxType) type range:(NSRange) range { 27 | return [[self alloc] initWithType:type range:range]; 28 | } 29 | 30 | 31 | @end -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # MarkdownSyntaxEditor 2 | 3 | NSAttributedString + UITextView + Markdown Syntax highlighting. 4 | 5 | ![Capture](http://gyazo.com/b5619abe667f0061997ef2a715d3e713.gif) 6 | 7 | ![Screenshot](https://www.monosnap.com/image/fxcjssMHQfPX7dqGwjRVip2Ns.png) 8 | 9 | ## Contributing 10 | 11 | 1. Fork it! 12 | 2. Create your feature branch: `git checkout -b my-new-feature` 13 | 3. Commit your changes: `git commit -am 'Add some feature'` 14 | 4. Push to the branch: `git push origin my-new-feature` 15 | 5. Submit a pull request :D 16 | 17 | ## License 18 | 19 | MIT 20 | 21 | Contain [adamhoracek/KOKeyboard](https://github.com/adamhoracek/KOKeyboard "adamhoracek/KOKeyboard") -------------------------------------------------------------------------------- /MarkdownSyntaxEditorTests/MarkdownSyntaxEditorTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // MarkdownSyntaxEditorTests.m 3 | // MarkdownSyntaxEditorTests 4 | // 5 | // Created by azu on 2013/10/26. 6 | // Copyright (c) 2013 azu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MarkdownSyntaxEditorTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation MarkdownSyntaxEditorTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /MarkdownSyntaxEditorTests/MarkdownSyntaxEditorTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CFBundleIdentifier 7 | info.efcl.${PRODUCT_NAME:rfc1034identifier} 8 | 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleShortVersionString 14 | 1.0 15 | CFBundleVersion 16 | 1 17 | CFBundleDevelopmentRegion 18 | en 19 | CFBundlePackageType 20 | BNDL 21 | CFBundleSignature 22 | ???? 23 | 24 | 25 | -------------------------------------------------------------------------------- /Lib/MarkdownSyntax/MarkdownSyntaxModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by azu on 2013/10/26. 3 | // 4 | 5 | 6 | #import 7 | 8 | typedef NS_ENUM(NSUInteger, MarkdownSyntaxType){ 9 | MarkdownSyntaxUnknown, 10 | MarkdownSyntaxHeaders, 11 | MarkdownSyntaxLinks, 12 | MarkdownSyntaxBold, 13 | MarkdownSyntaxEmphasis, 14 | MarkdownSyntaxDeletions, 15 | MarkdownSyntaxQuotes, 16 | MarkdownSyntaxInlineCode, 17 | MarkdownSyntaxCodeBlock, 18 | MarkdownSyntaxBlockquotes, 19 | MarkdownSyntaxULLists, 20 | MarkdownSyntaxOLLists, 21 | NumberOfMarkdownSyntax, 22 | }; 23 | 24 | @interface MarkdownSyntaxModel : NSObject 25 | @property(nonatomic) NSRange range; 26 | @property(nonatomic) MarkdownSyntaxType type; 27 | 28 | - (instancetype)initWithType:(enum MarkdownSyntaxType) type range:(NSRange) range; 29 | 30 | + (instancetype)modelWithType:(enum MarkdownSyntaxType) type range:(NSRange) range; 31 | 32 | @end -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 azu 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /Lib/KOKeyBoard/KOSwipeButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // SwipeButton.h 3 | // KeyboardTest 4 | // 5 | // Created by Kuba on 28.06.12. 6 | // Copyright (c) 2012 Adam Horacek, Kuba Brecka 7 | // 8 | // Website: http://www.becomekodiak.com/ 9 | // github: http://github.com/adamhoracek/KOKeyboard 10 | // Twitter: http://twitter.com/becomekodiak 11 | // Mail: adam@becomekodiak.com, kuba@becomekodiak.com 12 | // 13 | // Permission is hereby granted, free of charge, to any person 14 | // obtaining a copy of this software and associated documentation 15 | // files (the "Software"), to deal in the Software without 16 | // restriction, including without limitation the rights to use, 17 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 18 | // copies of the Software, and to permit persons to whom the 19 | // Software is furnished to do so, subject to the following 20 | // conditions: 21 | // 22 | // The above copyright notice and this permission notice shall be 23 | // included in all copies or substantial portions of the Software. 24 | // 25 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 27 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 29 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 30 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 31 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 32 | // OTHER DEALINGS IN THE SOFTWARE. 33 | // 34 | 35 | #import 36 | 37 | @interface KOSwipeButton : UIView 38 | 39 | @property(nonatomic, weak) id delegate; 40 | @property(nonatomic) NSArray *keys; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /MarkdownSyntaxEditor/MarkdownSyntaxEditor-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CFBundleIdentifier 7 | info.efcl.${PRODUCT_NAME:rfc1034identifier} 8 | 9 | CFBundleDevelopmentRegion 10 | en 11 | CFBundleExecutable 12 | ${EXECUTABLE_NAME} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | 22 | CFBundleDisplayName 23 | ${PRODUCT_NAME} 24 | CFBundleVersion 25 | 1.0 26 | CFBundleShortVersionString 27 | 1.0 28 | LSRequiresIPhoneOS 29 | 30 | UIRequiredDeviceCapabilities 31 | 32 | armv7 33 | 34 | UISupportedInterfaceOrientations 35 | 36 | UIInterfaceOrientationPortrait 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | 40 | UIMainStoryboardFile 41 | Main 42 | UIStatusBarTintParameters 43 | 44 | UINavigationBar 45 | 46 | Style 47 | UIBarStyleDefault 48 | Translucent 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /Lib/KOKeyBoard/KOKeyboardRow.h: -------------------------------------------------------------------------------- 1 | // 2 | // ExtraKeyboardRow.h 3 | // KeyboardTest 4 | // 5 | // Created by Kuba on 28.06.12. 6 | // Copyright (c) 2012 Adam Horacek, Kuba Brecka 7 | // 8 | // Website: http://www.becomekodiak.com/ 9 | // github: http://github.com/adamhoracek/KOKeyboard 10 | // Twitter: http://twitter.com/becomekodiak 11 | // Mail: adam@becomekodiak.com, kuba@becomekodiak.com 12 | // 13 | // Permission is hereby granted, free of charge, to any person 14 | // obtaining a copy of this software and associated documentation 15 | // files (the "Software"), to deal in the Software without 16 | // restriction, including without limitation the rights to use, 17 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 18 | // copies of the Software, and to permit persons to whom the 19 | // Software is furnished to do so, subject to the following 20 | // conditions: 21 | // 22 | // The above copyright notice and this permission notice shall be 23 | // included in all copies or substantial portions of the Software. 24 | // 25 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 27 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 29 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 30 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 31 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 32 | // OTHER DEALINGS IN THE SOFTWARE. 33 | // 34 | 35 | #import 36 | 37 | @interface KOKeyboardRow : UIView 38 | 39 | + (void)applyToTextView:(UITextView *)textView; 40 | - (void)trackPointMovedX:(NSInteger)xdiff Y:(NSInteger)ydiff selecting:(BOOL)selecting; 41 | - (void)trackPointStarted; 42 | - (void)undoAction; 43 | - (void)redoAction; 44 | @end 45 | -------------------------------------------------------------------------------- /Lib/MarkdownTextView/MarkdownTextView.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by azu on 2013/10/26. 3 | // 4 | 5 | 6 | #import "MarkdownTextView.h" 7 | #import "MarkdownSyntaxGenerator.h" 8 | #import "KOKeyboardRow.h" 9 | 10 | 11 | @interface MarkdownTextView () 12 | @property(nonatomic, strong) MarkdownSyntaxGenerator *markdownSyntaxGenerator; 13 | @end 14 | 15 | @implementation MarkdownTextView { 16 | 17 | } 18 | 19 | - (id)initWithCoder:(NSCoder *) coder { 20 | self = [super initWithCoder:coder]; 21 | if (self == nil) { 22 | return nil; 23 | } 24 | [[NSNotificationCenter defaultCenter] 25 | addObserver:self selector:@selector(didTextChangeText:) name:UITextViewTextDidChangeNotification object:nil]; 26 | [self updateSyntax]; 27 | [KOKeyboardRow applyToTextView:self]; 28 | return self; 29 | } 30 | 31 | - (void)dealloc { 32 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 33 | } 34 | 35 | - (void)didTextChangeText:(id)sender{ 36 | [self updateSyntax]; 37 | } 38 | 39 | - (MarkdownSyntaxGenerator *)markdownSyntaxGenerator { 40 | if (_markdownSyntaxGenerator == nil) { 41 | _markdownSyntaxGenerator = [[MarkdownSyntaxGenerator alloc] init]; 42 | } 43 | return _markdownSyntaxGenerator; 44 | } 45 | 46 | - (void)updateSyntax { 47 | NSArray *models = [self.markdownSyntaxGenerator syntaxModelsForText:self.text]; 48 | NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:self.text]; 49 | for (MarkdownSyntaxModel *model in models) { 50 | [attributedString addAttributes:AttributesFromMarkdownSyntaxType( 51 | model.type) range:model.range]; 52 | } 53 | [self updateAttributedText:attributedString]; 54 | } 55 | 56 | - (void)updateAttributedText:(NSAttributedString *) attributedString { 57 | self.scrollEnabled = NO; 58 | NSRange selectedRange = self.selectedRange; 59 | self.attributedText = attributedString; 60 | self.selectedRange = selectedRange; 61 | self.scrollEnabled = YES; 62 | } 63 | 64 | 65 | @end -------------------------------------------------------------------------------- /MarkdownSyntaxEditor/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // MarkdownSyntaxEditor 4 | // 5 | // Created by azu on 2013/10/26. 6 | // Copyright (c) 2013 azu. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *) application didFinishLaunchingWithOptions:(NSDictionary *) launchOptions { 14 | // Override point for customization after application launch. 15 | return YES; 16 | } 17 | 18 | - (void)applicationWillResignActive:(UIApplication *) application { 19 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 20 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 21 | 22 | } 23 | 24 | - (void)applicationDidEnterBackground:(UIApplication *) application { 25 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 26 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 27 | 28 | } 29 | 30 | - (void)applicationWillEnterForeground:(UIApplication *) application { 31 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 32 | 33 | } 34 | 35 | - (void)applicationDidBecomeActive:(UIApplication *) application { 36 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 37 | 38 | } 39 | 40 | - (void)applicationWillTerminate:(UIApplication *) application { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | 43 | } 44 | 45 | @end -------------------------------------------------------------------------------- /Lib/MarkdownSyntax/MarkdownSyntaxGenerator.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by azu on 2013/10/26. 3 | // 4 | 5 | 6 | #import "MarkdownSyntaxGenerator.h" 7 | 8 | 9 | #define regexp(reg,option) [NSRegularExpression regularExpressionWithPattern:@reg options:option error:NULL] 10 | 11 | NSRegularExpression *NSRegularExpressionFromMarkdownSyntaxType(MarkdownSyntaxType v) { 12 | switch (v) { 13 | case MarkdownSyntaxUnknown: 14 | return nil; 15 | case MarkdownSyntaxHeaders: 16 | return regexp("(#+)(.*)", NSRegularExpressionAnchorsMatchLines); 17 | case MarkdownSyntaxLinks: 18 | return regexp("\\[([^\\[]+)\\]\\(([^\\)]+)\\)", 0); 19 | case MarkdownSyntaxBold: 20 | return regexp("(\\*\\*|__)(.*?)\\1", 0); 21 | case MarkdownSyntaxEmphasis: 22 | return regexp("\\s(\\*|_)(.*?)\\1\\s", 0); 23 | case MarkdownSyntaxDeletions: 24 | return regexp("\\~\\~(.*?)\\~\\~", 0); 25 | case MarkdownSyntaxQuotes: 26 | return regexp("\\:\\\"(.*?)\\\"\\:", 0); 27 | case MarkdownSyntaxInlineCode: 28 | return regexp("`(.*?)`", 0); 29 | case MarkdownSyntaxCodeBlock: 30 | return regexp("```([\\s\\S]*?)```", 0); 31 | case MarkdownSyntaxBlockquotes: 32 | return regexp("\n(>|\\>)(.*)",0); 33 | case MarkdownSyntaxULLists: 34 | return regexp("^\\*([^\\*]*)", NSRegularExpressionAnchorsMatchLines); 35 | case MarkdownSyntaxOLLists: 36 | return regexp("^[0-9]+\\.(.*)", NSRegularExpressionAnchorsMatchLines); 37 | case NumberOfMarkdownSyntax: 38 | break; 39 | } 40 | return nil; 41 | } 42 | 43 | NSDictionary *AttributesFromMarkdownSyntaxType(MarkdownSyntaxType v) { 44 | switch (v) { 45 | case MarkdownSyntaxUnknown: 46 | return @{}; 47 | case MarkdownSyntaxHeaders: 48 | if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) { 49 | return @{ 50 | NSFontAttributeName : [UIFont boldSystemFontOfSize:[UIFont buttonFontSize]] 51 | }; 52 | } else { 53 | return @{ 54 | NSFontAttributeName : [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline] 55 | }; 56 | } 57 | case MarkdownSyntaxLinks: 58 | return @{NSForegroundColorAttributeName : [UIColor blueColor]}; 59 | case MarkdownSyntaxBold: 60 | return @{NSFontAttributeName : [UIFont boldSystemFontOfSize:[UIFont systemFontSize]]}; 61 | case MarkdownSyntaxEmphasis: 62 | return @{NSFontAttributeName : [UIFont boldSystemFontOfSize:[UIFont systemFontSize]]}; 63 | case MarkdownSyntaxDeletions: 64 | return @{NSStrikethroughStyleAttributeName : @(NSUnderlineStyleSingle)}; 65 | case MarkdownSyntaxQuotes: 66 | return @{NSForegroundColorAttributeName : [UIColor lightGrayColor]}; 67 | case MarkdownSyntaxInlineCode: 68 | return @{NSForegroundColorAttributeName : [UIColor brownColor]}; 69 | case MarkdownSyntaxCodeBlock: 70 | return @{ 71 | NSBackgroundColorAttributeName : [UIColor colorWithRed:0.98 green:0.98 blue:0.98 alpha:1.0] 72 | }; 73 | case MarkdownSyntaxBlockquotes: 74 | return @{NSBackgroundColorAttributeName : [UIColor lightGrayColor]}; 75 | case MarkdownSyntaxULLists: 76 | return @{}; 77 | case MarkdownSyntaxOLLists: 78 | return @{}; 79 | case NumberOfMarkdownSyntax: 80 | break; 81 | } 82 | return nil; 83 | } 84 | 85 | 86 | @implementation MarkdownSyntaxGenerator { 87 | 88 | } 89 | - (NSArray *)syntaxModelsForText:(NSString *) text { 90 | NSMutableArray *markdownSyntaxModels = [NSMutableArray array]; 91 | for (MarkdownSyntaxType i = MarkdownSyntaxUnknown; i < NumberOfMarkdownSyntax; i++) { 92 | NSRegularExpression *expression = NSRegularExpressionFromMarkdownSyntaxType(i); 93 | NSArray *matches = [expression matchesInString:text 94 | options:0 95 | range:NSMakeRange(0, [text length])]; 96 | for (NSTextCheckingResult *result in matches) { 97 | [markdownSyntaxModels addObject:[MarkdownSyntaxModel modelWithType:i range:result.range]]; 98 | } 99 | } 100 | return markdownSyntaxModels; 101 | } 102 | @end -------------------------------------------------------------------------------- /Lib/KOKeyBoard/KOKeyboardRow.m: -------------------------------------------------------------------------------- 1 | // 2 | // ExtraKeyboardRow.m 3 | // KeyboardTest 4 | // 5 | // Created by Kuba on 28.06.12. 6 | // Copyright (c) 2012 Adam Horacek, Kuba Brecka 7 | // 8 | // Website: http://www.becomekodiak.com/ 9 | // github: http://github.com/adamhoracek/KOKeyboard 10 | // Twitter: http://twitter.com/becomekodiak 11 | // Mail: adam@becomekodiak.com, kuba@becomekodiak.com 12 | // 13 | // Permission is hereby granted, free of charge, to any person 14 | // obtaining a copy of this software and associated documentation 15 | // files (the "Software"), to deal in the Software without 16 | // restriction, including without limitation the rights to use, 17 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 18 | // copies of the Software, and to permit persons to whom the 19 | // Software is furnished to do so, subject to the following 20 | // conditions: 21 | // 22 | // The above copyright notice and this permission notice shall be 23 | // included in all copies or substantial portions of the Software. 24 | // 25 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 27 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 29 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 30 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 31 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 32 | // OTHER DEALINGS IN THE SOFTWARE. 33 | // 34 | 35 | #import "KOKeyboardRow.h" 36 | #import "KOSwipeButton.h" 37 | 38 | @interface KOKeyboardRow () 39 | 40 | @property(nonatomic, retain) UITextView *textView; 41 | @property(nonatomic, assign) CGRect startLocation; 42 | 43 | @end 44 | 45 | @implementation KOKeyboardRow 46 | 47 | @synthesize textView, startLocation; 48 | 49 | + (void)applyToTextView:(UITextView *) t { 50 | int barHeight = 44; 51 | int barWidth = 320; 52 | 53 | KOKeyboardRow *v = [[KOKeyboardRow alloc] initWithFrame:CGRectMake(0, 0, barWidth, barHeight)]; 54 | v.backgroundColor = [UIColor colorWithRed:156 / 255. green:155 / 255. blue:166 / 255. alpha:1.]; 55 | v.autoresizingMask = UIViewAutoresizingFlexibleHeight; 56 | v.textView = t; 57 | 58 | UIView *border1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, barWidth, 1)]; 59 | border1.backgroundColor = [UIColor colorWithRed:51 / 255. green:51 / 255. blue:51 / 255. alpha:1.]; 60 | border1.autoresizingMask = UIViewAutoresizingFlexibleWidth; 61 | [v addSubview:border1]; 62 | 63 | UIView *border2 = [[UIView alloc] initWithFrame:CGRectMake(0, 1, barWidth, 1)]; 64 | border2.backgroundColor = [UIColor colorWithRed:191 / 255. green:191 / 255. blue:191 / 255. alpha:1.]; 65 | border2.autoresizingMask = UIViewAutoresizingFlexibleWidth; 66 | [v addSubview:border2]; 67 | 68 | int buttonHeight = 40; 69 | int leftMargin = 1; 70 | int topMargin = 1; 71 | int buttonSpacing = 1; 72 | 73 | 74 | NSArray *keys = @[ 75 | @"TTTTT", 76 | @"()-[]", 77 | @"<>*#+", 78 | @"◉◉◉◉◉", 79 | @"'\"`_.", 80 | @"UUUUU", 81 | @"RRRRR" 82 | ]; 83 | 84 | int buttonCount = [keys count]; 85 | int buttonWidth = (barWidth - 2 * leftMargin - (buttonCount - 1) * buttonSpacing) / buttonCount; 86 | leftMargin = (barWidth - buttonWidth * buttonCount - buttonSpacing * (buttonCount - 1)) / 2; 87 | for (NSUInteger i = 0; i < buttonCount; i++) { 88 | KOSwipeButton *b = [[KOSwipeButton alloc] initWithFrame:CGRectMake( 89 | leftMargin + i * (buttonSpacing + buttonWidth), 90 | topMargin + (barHeight - buttonHeight) / 2, buttonWidth, buttonHeight)]; 91 | b.keys = [self splitByCharacter:keys[i]]; 92 | b.delegate = v; 93 | b.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; 94 | [v addSubview:b]; 95 | } 96 | 97 | t.inputAccessoryView = v; 98 | } 99 | 100 | + (NSArray *)splitByCharacter:(NSString *) str { 101 | NSMutableArray *array = [NSMutableArray array]; 102 | unichar unicodeChar; 103 | NSString *rune; 104 | for (int i = 0; i < str.length; ++i) { 105 | unicodeChar = [str characterAtIndex:i]; 106 | 107 | if (unicodeChar >= 0xD800 && unicodeChar <= 0xDBFF) { 108 | rune = [str substringWithRange:NSMakeRange(i, 2)]; 109 | ++i; 110 | } else { 111 | rune = [str substringWithRange:NSMakeRange(i, 1)]; 112 | } 113 | [array addObject:rune]; 114 | } 115 | NSAssert([array count] <= 5, @"Max is 5"); 116 | return array; 117 | } 118 | 119 | - (void)insertText:(NSString *) text { 120 | if (textView.delegate && [textView.delegate respondsToSelector:@selector(textView:shouldChangeTextInRange:replacementText:)]) { 121 | if ([textView.delegate textView:textView 122 | shouldChangeTextInRange:textView.selectedRange 123 | replacementText:text]) { 124 | [textView insertText:text]; 125 | } 126 | } else { 127 | [textView insertText:text]; 128 | } 129 | } 130 | 131 | - (void)trackPointStarted { 132 | startLocation = [textView caretRectForPosition:textView.selectedTextRange.start]; 133 | } 134 | 135 | - (void)undoAction { 136 | [[textView undoManager] undo]; 137 | } 138 | 139 | - (void)redoAction { 140 | [[textView undoManager] redo]; 141 | } 142 | 143 | 144 | - (void)trackPointMovedX:(NSInteger) xdiff Y:(NSInteger) ydiff selecting:(BOOL) selecting { 145 | CGRect loc = startLocation; 146 | 147 | loc.origin.y -= textView.contentOffset.y; 148 | 149 | UITextPosition *p1 = [textView closestPositionToPoint:loc.origin]; 150 | 151 | loc.origin.x -= xdiff; 152 | loc.origin.y -= ydiff; 153 | 154 | UITextPosition *p2 = [textView closestPositionToPoint:loc.origin]; 155 | 156 | if (!selecting) { 157 | p1 = p2; 158 | } 159 | UITextRange *r = [textView textRangeFromPosition:p1 toPosition:p2]; 160 | 161 | textView.selectedTextRange = r; 162 | } 163 | 164 | @end 165 | -------------------------------------------------------------------------------- /MarkdownSyntaxEditor/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | # Code - コードの挿入 44 | 45 | ```ruby:qiita.rb 46 | puts 'The best way to log and share programmers knowledge.' 47 | ``` 48 | 49 | puts 'The best way to log and share programmers knowledge.' 50 | 51 | また、コードをインライン表示することも可能です。 52 | 53 | ` puts 'Qiita'` はプログラマのための技術情報共有サービスです。 54 | 55 | # Format Text - テキストの装飾 56 | ## Headers - 見出し 57 | 58 | # これはH1タグです 59 | ## これはH2タグです 60 | ###### これはH6タグです 61 | 62 | # Emphasis - 強調 63 | 64 | *これはイタリック体です* 65 | 66 | _これもイタリック体です_ 67 | 68 | _これは_イタリック体になりません 69 | 70 | **これは太字です** 71 | 72 | __これも太字です__ 73 | 74 | # Lists - リスト 75 | Disc型 76 | 77 | * 文頭に「*」「+」「-」のいずれかを入れるとDisc型リストになります 78 | + 要点をまとめる際に便利です 79 | - リストを挿入する際は、リストの上下に空行がないと正しく表示されません 80 | 81 | Decimal型 82 | 83 | 1. 文頭に「数字.」を入れるとDecimal型リストになります 84 | 2. 1.2.3.と入れていくといい具合です 85 | 3. リストを挿入する際は、リストの上下に空行がないと正しく表示されません 86 | 87 | Blockquotes - 引用 88 | 89 | > 文頭に>を置くことで引用になります。 90 | > 複数行にまたがる場合、改行のたびにこの記号を置く必要があります。 91 | > 引用の上下にはリストと同じく空行がないと正しく表示されません 92 | > 引用の中に別のMarkdownを使用することも可能です。 93 | 94 | これはネストされた引用です。 95 | 96 | # Horizontal rules - 水平線 97 | 98 | 下記は全て水平線として表示されます 99 | 100 | * * * 101 | *** 102 | ***** 103 | - - - 104 | --------------------------------------- 105 | 106 | # Links - リンク 107 | 108 | [リンクテキスト](URL "タイトル") 109 | 110 | タイトル付きのリンクを投稿できます。 111 | 112 | 113 | # Images - 画像埋め込み 114 | 115 | ![代替テキスト](画像のURL) 116 | 117 | タイトル無しの画像を埋め込む 118 | 119 | ![代替テキスト](画像のURL "画像タイトル") 120 | 121 | ![Qiita](http://qiita.com/system/icons/1/medium/favicon.png "Qiita") 122 | 123 | タイトル有りの画像を埋め込む 124 | 125 | # その他 126 | 127 | バックスラッシュ[\]をMarkdownの前に挿入することで、Markdownをエスケープ(無効化)することができます。 128 | 129 | \# H1 130 | 131 | エスケープされています 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /Lib/KOKeyBoard/KOSwipeButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // SwipeButton.m 3 | // KeyboardTest 4 | // 5 | // Created by Kuba on 28.06.12. 6 | // Copyright (c) 2012 Adam Horacek, Kuba Brecka 7 | // 8 | // Website: http://www.becomekodiak.com/ 9 | // github: http://github.com/adamhoracek/KOKeyboard 10 | // Twitter: http://twitter.com/becomekodiak 11 | // Mail: adam@becomekodiak.com, kuba@becomekodiak.com 12 | // 13 | // Permission is hereby granted, free of charge, to any person 14 | // obtaining a copy of this software and associated documentation 15 | // files (the "Software"), to deal in the Software without 16 | // restriction, including without limitation the rights to use, 17 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 18 | // copies of the Software, and to permit persons to whom the 19 | // Software is furnished to do so, subject to the following 20 | // conditions: 21 | // 22 | // The above copyright notice and this permission notice shall be 23 | // included in all copies or substantial portions of the Software. 24 | // 25 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 27 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 29 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 30 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 31 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 32 | // OTHER DEALINGS IN THE SOFTWARE. 33 | // 34 | 35 | #import "KOSwipeButton.h" 36 | #import "KOKeyboardRow.h" 37 | 38 | @interface KOSwipeButton () 39 | 40 | @property(nonatomic, retain) NSMutableArray *labels; 41 | @property(nonatomic, assign) CGPoint touchBeginPoint; 42 | @property(nonatomic, retain) UILabel *selectedLabel; 43 | @property(nonatomic, retain) UIImageView *bgView; 44 | @property(nonatomic, retain) UIImageView *foregroundView; 45 | @property(nonatomic, retain) NSDate *firstTapDate; 46 | @property(nonatomic, assign) BOOL selecting; 47 | @property(nonatomic, retain) UIImage *blueImage; 48 | @property(nonatomic, retain) UIImage *pressedImage; 49 | @property(nonatomic, retain) UIImage *blueFgImage; 50 | @property(nonatomic, retain) UIImage *pressedFgImage; 51 | 52 | @property(nonatomic, strong) UILabel *leftTopLabel; 53 | @property(nonatomic, strong) UILabel *rightTopLabel; 54 | @property(nonatomic, strong) UILabel *centerLabel; 55 | @property(nonatomic, strong) UILabel *leftBottomLabel; 56 | @property(nonatomic, strong) UILabel *rightBottomLabel; 57 | @end 58 | 59 | #define TIME_INTERVAL_FOR_DOUBLE_TAP 0.4 60 | 61 | @implementation KOSwipeButton 62 | 63 | @synthesize labels, touchBeginPoint, selectedLabel, delegate, bgView, selecting, firstTapDate, blueImage, pressedImage, foregroundView, blueFgImage, pressedFgImage; 64 | 65 | - (void)setFrame:(CGRect) frame { 66 | [super setFrame:frame]; 67 | } 68 | 69 | - (id)initWithFrame:(CGRect) frame { 70 | self = [super initWithFrame:frame]; 71 | 72 | UIImage *bgImg1 = [[UIImage imageNamed:@"key.png"] resizableImageWithCapInsets:UIEdgeInsetsMake( 73 | 9, 9, 9, 9)]; 74 | UIImage *bgImg2 = [[UIImage imageNamed:@"key-pressed.png"] resizableImageWithCapInsets:UIEdgeInsetsMake( 75 | 9, 9, 9, 9)]; 76 | bgView = [[UIImageView alloc] initWithFrame:self.bounds]; 77 | [bgView setImage:bgImg1]; 78 | [bgView setHighlightedImage:bgImg2]; 79 | bgView.autoresizingMask = UIViewAutoresizingFlexibleWidth; 80 | [self addSubview:bgView]; 81 | 82 | CGFloat labelWidth = 8; 83 | CGFloat labelHeight = 15; 84 | CGFloat leftInset = 9; 85 | CGFloat rightInset = 9; 86 | CGFloat topInset = 3; 87 | CGFloat bottomInset = 8; 88 | 89 | self.labels = [[NSMutableArray alloc] init]; 90 | 91 | UIFont *font = [UIFont systemFontOfSize:[self labelFontSize]]; 92 | 93 | self.leftTopLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftInset, topInset, labelWidth, 94 | labelHeight)]; 95 | self.leftTopLabel.textAlignment = NSTextAlignmentLeft; 96 | self.leftTopLabel.hidden = YES; 97 | self.leftTopLabel.text = @"↖"; 98 | self.leftTopLabel.font = font; 99 | [self addSubview:self.leftTopLabel]; 100 | [self.leftTopLabel setHighlightedTextColor:[UIColor blueColor]]; 101 | self.leftTopLabel.backgroundColor = [UIColor clearColor]; 102 | [labels addObject:self.leftTopLabel]; 103 | 104 | self.rightTopLabel = [[UILabel alloc] initWithFrame:CGRectMake( 105 | self.frame.size.width - labelWidth - rightInset, 106 | topInset, labelWidth, labelHeight)]; 107 | self.rightTopLabel.textAlignment = NSTextAlignmentRight; 108 | self.rightTopLabel.hidden = YES; 109 | self.rightTopLabel.text = @"↗"; 110 | self.rightTopLabel.font = font; 111 | self.rightTopLabel.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin; 112 | [self addSubview:self.rightTopLabel]; 113 | [self.rightTopLabel setHighlightedTextColor:[UIColor blueColor]]; 114 | self.rightTopLabel.backgroundColor = [UIColor clearColor]; 115 | [labels addObject:self.rightTopLabel]; 116 | 117 | self.centerLabel = [[UILabel alloc] initWithFrame:CGRectIntegral( 118 | CGRectMake((self.frame.size.width - labelWidth - leftInset - rightInset) / 2 + leftInset, 119 | (self.frame.size.height - labelHeight - topInset - bottomInset) / 2 + topInset, 120 | labelWidth, labelHeight))]; 121 | self.centerLabel.textAlignment = NSTextAlignmentCenter; 122 | self.centerLabel.hidden = YES; 123 | self.centerLabel.text = @"Center"; 124 | self.centerLabel.font = font; 125 | self.centerLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth; 126 | [self addSubview:self.centerLabel]; 127 | [self.centerLabel setHighlightedTextColor:[UIColor blueColor]]; 128 | self.centerLabel.backgroundColor = [UIColor clearColor]; 129 | [labels addObject:self.centerLabel]; 130 | 131 | self.leftBottomLabel = [[UILabel alloc] initWithFrame:CGRectMake(leftInset, 132 | (self.frame.size.height - labelHeight - bottomInset), labelWidth, labelHeight)]; 133 | self.leftBottomLabel.textAlignment = NSTextAlignmentLeft; 134 | self.leftBottomLabel.hidden = YES; 135 | self.leftBottomLabel.text = @"↙"; 136 | self.leftBottomLabel.font = font; 137 | [self addSubview:self.leftBottomLabel]; 138 | [self.leftBottomLabel setHighlightedTextColor:[UIColor blueColor]]; 139 | self.leftBottomLabel.backgroundColor = [UIColor clearColor]; 140 | [labels addObject:self.leftBottomLabel]; 141 | 142 | 143 | self.rightBottomLabel = [[UILabel alloc] initWithFrame:CGRectMake( 144 | self.frame.size.width - labelWidth - rightInset, 145 | (self.frame.size.height - labelHeight - bottomInset), labelWidth, labelHeight)]; 146 | self.rightBottomLabel.textAlignment = NSTextAlignmentRight; 147 | self.rightBottomLabel.hidden = YES; 148 | self.rightBottomLabel.text = @"↘"; 149 | self.rightBottomLabel.font = font; 150 | self.rightBottomLabel.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin; 151 | [self addSubview:self.rightBottomLabel]; 152 | [self.rightBottomLabel setHighlightedTextColor:[UIColor blueColor]]; 153 | self.rightBottomLabel.backgroundColor = [UIColor clearColor]; 154 | [labels addObject:self.rightBottomLabel]; 155 | 156 | firstTapDate = [NSDate distantPast]; 157 | 158 | return self; 159 | } 160 | 161 | - (void)setKeys:(NSArray *) newKeys { 162 | _keys = newKeys; 163 | [self updateLabels:newKeys]; 164 | } 165 | 166 | - (void)updateLabels:(NSArray *) newKeys { 167 | if ([self isTabButton]) { 168 | [self.centerLabel setHidden:NO]; 169 | [self.centerLabel setText:@"TAB"]; 170 | [self.centerLabel setFrame:self.bounds]; 171 | return; 172 | } else if ([self isTrackPoint]) { 173 | [self insertImage:@"trackpoint"]; 174 | return; 175 | } else if ([self isUndoButton]) { 176 | [self insertImage:@"undo"]; 177 | return; 178 | } else if ([self isRedoButton]) { 179 | [self insertImage:@"redo"]; 180 | return; 181 | } else { 182 | for (int i = 0; i < [newKeys count]; i++) { 183 | UILabel *label = [labels objectAtIndex:i]; 184 | label.hidden = NO; 185 | [label setText:newKeys[i]]; 186 | } 187 | } 188 | 189 | } 190 | 191 | - (void)insertImage:(NSString *) buttonName { 192 | blueImage = [UIImage imageNamed:@"key-blue.png"]; 193 | pressedImage = [UIImage imageNamed:@"key-pressed.png"]; 194 | UIImage *bgImg1 = [UIImage imageNamed:[NSString stringWithFormat:@"%@-black.png", buttonName]]; 195 | UIImage *bgImg2 = [UIImage imageNamed:[NSString stringWithFormat:@"%@-blue.png", buttonName]]; 196 | blueFgImage = [UIImage imageNamed:@"trackpoint-white.png"]; 197 | pressedFgImage = bgImg2; 198 | CGFloat imageSize = 8; 199 | foregroundView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 200 | imageSize, imageSize)]; 201 | foregroundView.frame = CGRectMake( 202 | (int)((self.frame.size.width - foregroundView.frame.size.width) / 2), 203 | (int)((self.frame.size.height - foregroundView.frame.size.height) / 2), 204 | imageSize, imageSize); 205 | [foregroundView setImage:bgImg1]; 206 | [foregroundView setHighlightedImage:bgImg2]; 207 | foregroundView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; 208 | [self addSubview:foregroundView]; 209 | } 210 | 211 | - (BOOL)isTabButton { 212 | return [self.keys containsObject:@"T"]; 213 | } 214 | 215 | - (BOOL)isTrackPoint { 216 | return [self.keys containsObject:@"◉"]; 217 | } 218 | 219 | - (BOOL)isUndoButton { 220 | return [self.keys containsObject:@"U"]; 221 | } 222 | 223 | - (BOOL)isRedoButton { 224 | return [self.keys containsObject:@"R"]; 225 | } 226 | 227 | - (CGFloat)labelFontSize { 228 | return 13.0f; 229 | } 230 | 231 | - (void)selectLabel:(int) idx { 232 | selectedLabel = nil; 233 | for (int i = 0; i < labels.count; i++) { 234 | UILabel *label = [labels objectAtIndex:i]; 235 | label.highlighted = (idx == i); 236 | label.font = [UIFont systemFontOfSize:[self labelFontSize]]; 237 | if (idx == i) { 238 | label.font = [UIFont boldSystemFontOfSize:[self labelFontSize]]; 239 | selectedLabel = label; 240 | } 241 | } 242 | bgView.highlighted = selectedLabel != nil; 243 | foregroundView.highlighted = selectedLabel != nil; 244 | } 245 | 246 | - (void)touchesBegan:(NSSet *) touches withEvent:(UIEvent *) event { 247 | UITouch *t = [touches anyObject]; 248 | touchBeginPoint = [t locationInView:self]; 249 | 250 | if ([self isTrackPoint]) { 251 | if (fabs([firstTapDate timeIntervalSinceNow]) < TIME_INTERVAL_FOR_DOUBLE_TAP) { 252 | bgView.highlightedImage = blueImage; 253 | foregroundView.highlightedImage = blueFgImage; 254 | selecting = YES; 255 | } else { 256 | bgView.highlightedImage = pressedImage; 257 | foregroundView.highlightedImage = pressedFgImage; 258 | selecting = NO; 259 | } 260 | firstTapDate = [NSDate date]; 261 | 262 | [delegate trackPointStarted]; 263 | } 264 | 265 | [self selectLabel:2]; 266 | } 267 | 268 | - (void)touchesMoved:(NSSet *) touches withEvent:(UIEvent *) event { 269 | UITouch *anyObject = [touches anyObject]; 270 | CGPoint touchMovePoint = [anyObject locationInView:self]; 271 | 272 | CGFloat xdiff = touchBeginPoint.x - touchMovePoint.x; 273 | CGFloat ydiff = touchBeginPoint.y - touchMovePoint.y; 274 | CGFloat distance = (CGFloat)sqrt(xdiff * xdiff + ydiff * ydiff); 275 | 276 | if ([self isTrackPoint]) { 277 | [delegate trackPointMovedX:xdiff Y:ydiff selecting:selecting]; 278 | return; 279 | } 280 | if (distance > 250) { 281 | [self selectLabel:-1]; 282 | } else if (![self isTabButton] && (distance > 20)) { 283 | CGFloat angle = (CGFloat)atan2(xdiff, ydiff); 284 | if (angle >= 0 && angle < M_PI_2) { 285 | [self selectLabel:0]; 286 | } else if (angle >= 0 && angle >= M_PI_2) { 287 | [self selectLabel:3]; 288 | } else if (angle < 0 && angle > -M_PI_2) { 289 | [self selectLabel:1]; 290 | } else if (angle < 0 && angle <= -M_PI_2) { 291 | [self selectLabel:4]; 292 | } 293 | } else { 294 | [self selectLabel:2]; 295 | } 296 | } 297 | 298 | - (void)touchesEnded:(NSSet *) touches withEvent:(UIEvent *) event { 299 | if (selectedLabel != nil) { 300 | if ([self isTabButton]) { 301 | [delegate insertText:@"\t"]; 302 | } else if ([self isTrackPoint]) { 303 | // noAction 304 | } else if ([self isUndoButton] || [selectedLabel.text isEqualToString:@"↩"]) { 305 | [self.delegate undoAction]; 306 | } else if ([self isRedoButton] || [selectedLabel.text isEqualToString:@"↪"]) { 307 | [self.delegate redoAction]; 308 | } else { 309 | [delegate insertText:selectedLabel.text]; 310 | } 311 | } 312 | 313 | [self selectLabel:-1]; 314 | } 315 | 316 | 317 | - (void)touchesCancelled:(NSSet *) touches withEvent:(UIEvent *) event { 318 | [self selectLabel:-1]; 319 | } 320 | 321 | @end 322 | -------------------------------------------------------------------------------- /MarkdownSyntaxEditor.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 17B5C02AD0DA98BA3FEE03D5 /* undo-blue.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C665874250B4ED6F8E6A /* undo-blue.png */; }; 11 | 17B5C05FEC8FD14B5B881E99 /* KOKeyboardRow.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B5C7E48D7AC7CD7FD2115A /* KOKeyboardRow.m */; }; 12 | 17B5C06769621759331A754B /* undo-blue@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C97A03EBB74A912C3E80 /* undo-blue@2x.png */; }; 13 | 17B5C072E253F29BA5E6B019 /* MarkdownSyntaxModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B5C6343549C35A4E747F80 /* MarkdownSyntaxModel.m */; }; 14 | 17B5C0D17AE20200B6870728 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B5CB2CDEF8D61F0C94C612 /* AppDelegate.m */; }; 15 | 17B5C10907673629E021B1A7 /* EditorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B5C5A7F1D704B0532DD559 /* EditorViewController.m */; }; 16 | 17B5C11CC50BA86B58584A19 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B5C77538EBB3930A9FD325 /* main.m */; }; 17 | 17B5C15EB3CA6A4ADC826C3A /* MarkdownSyntaxGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B5CC2F7969FC11ADFA5E77 /* MarkdownSyntaxGenerator.m */; }; 18 | 17B5C1632B2A97942F02C616 /* MarkdownSyntaxGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B5CC2F7969FC11ADFA5E77 /* MarkdownSyntaxGenerator.m */; }; 19 | 17B5C195566E417FCB70DA63 /* MarkdownTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B5CE9F808C4DF8C3BF927A /* MarkdownTextView.m */; }; 20 | 17B5C220CF866FFED51EBEB3 /* key-blue.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C35163219DC2FD928AE1 /* key-blue.png */; }; 21 | 17B5C22F690FC74B77E1EF23 /* trackpoint-blue.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C00965FFB0BE2B440AE8 /* trackpoint-blue.png */; }; 22 | 17B5C265B27908DC21F6079F /* trackpoint-blue@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C3E06D74CFFCED17822F /* trackpoint-blue@2x.png */; }; 23 | 17B5C28FAC774FEADE9A7609 /* undo-black@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5CFD2CD2F6B374FF81913 /* undo-black@2x.png */; }; 24 | 17B5C2D8CB40DA6E49D917B5 /* MarkdownTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B5CE9F808C4DF8C3BF927A /* MarkdownTextView.m */; }; 25 | 17B5C350EC9F6AAEE5A20C7A /* trackpoint-white@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C0AD9D7917D5B47B6DD2 /* trackpoint-white@2x.png */; }; 26 | 17B5C3A453973596044380AE /* key@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5CDE41F54164717ECDB77 /* key@2x.png */; }; 27 | 17B5C3AEA77AA7F8C139731C /* redo-blue.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C0B204B5FE80F137F5B0 /* redo-blue.png */; }; 28 | 17B5C415C6DE26E03260944F /* trackpoint-white@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C0AD9D7917D5B47B6DD2 /* trackpoint-white@2x.png */; }; 29 | 17B5C418274D50607EF1B0E7 /* undo-black.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5CB758D7D01883A8A8BB4 /* undo-black.png */; }; 30 | 17B5C4203127891B76E56259 /* trackpoint-black.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5CE99A04E2A8DFE8733EC /* trackpoint-black.png */; }; 31 | 17B5C43758C5ADBDC96684E0 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17B5CA1AE333F95F979F16BD /* UIKit.framework */; }; 32 | 17B5C4F51FC3844AC1605D9B /* EditorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B5C5A7F1D704B0532DD559 /* EditorViewController.m */; }; 33 | 17B5C532C4C7B6AF3B9B7F4F /* trackpoint-black@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C65B549523DD9AEEE5A0 /* trackpoint-black@2x.png */; }; 34 | 17B5C54EDCCA70EA5580E293 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C733582B11BDFE959EA5 /* InfoPlist.strings */; }; 35 | 17B5C5747D9C2EAF03EE9BBB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C0F811232E001557F481 /* Main.storyboard */; }; 36 | 17B5C5BD101F22FB296A7876 /* redo-black.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5CDBB347EA59ED11A2C66 /* redo-black.png */; }; 37 | 17B5C6772599FAF5C32B8542 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17B5C27ABAA634734167F0B3 /* Foundation.framework */; }; 38 | 17B5C67AB36DB7134C37425B /* KOSwipeButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B5C8AB004FFA1F07A81C1B /* KOSwipeButton.m */; }; 39 | 17B5C6F68FEE372C15060E16 /* trackpoint-black.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5CE99A04E2A8DFE8733EC /* trackpoint-black.png */; }; 40 | 17B5C73588B565ECF08A2E5F /* trackpoint-white.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C840892724A19182500C /* trackpoint-white.png */; }; 41 | 17B5C76A316A068C8A62FFB0 /* trackpoint-black@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C65B549523DD9AEEE5A0 /* trackpoint-black@2x.png */; }; 42 | 17B5C7A8DEBDA6C56D8F4F26 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17B5CA1AE333F95F979F16BD /* UIKit.framework */; }; 43 | 17B5C7C3DF4878BCF5E50176 /* MarkdownSyntaxModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B5C6343549C35A4E747F80 /* MarkdownSyntaxModel.m */; }; 44 | 17B5C7DACC64C8C50D38FFA7 /* trackpoint-blue.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C00965FFB0BE2B440AE8 /* trackpoint-blue.png */; }; 45 | 17B5C8410029FA75F927DB6C /* undo-blue@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C97A03EBB74A912C3E80 /* undo-blue@2x.png */; }; 46 | 17B5C89B4A73C672051950AC /* key-pressed.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5CECCAFB5CD02F0964643 /* key-pressed.png */; }; 47 | 17B5C8AE11D2299675E382E8 /* redo-blue.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C0B204B5FE80F137F5B0 /* redo-blue.png */; }; 48 | 17B5C8B56818D017719C1E57 /* trackpoint-blue@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C3E06D74CFFCED17822F /* trackpoint-blue@2x.png */; }; 49 | 17B5C8E48225BBE34D483641 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17B5CC770BD3CF46497215F8 /* CoreGraphics.framework */; }; 50 | 17B5C917B2EE0D5889028A94 /* key-pressed@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C2194C5E79DA834EEF99 /* key-pressed@2x.png */; }; 51 | 17B5C97E7BCB9E28CA42A9D5 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C92ACA9C91A3DF514D45 /* Images.xcassets */; }; 52 | 17B5C9B747966AC5740481EF /* KOKeyboardRow.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B5C7E48D7AC7CD7FD2115A /* KOKeyboardRow.m */; }; 53 | 17B5C9D8FC97063C57B243FE /* redo-black.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5CDBB347EA59ED11A2C66 /* redo-black.png */; }; 54 | 17B5C9EBD2A296041B85B496 /* redo-black@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C03D180EB15D95614A61 /* redo-black@2x.png */; }; 55 | 17B5CA1E3560CFCFDD4031D7 /* trackpoint-white.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C840892724A19182500C /* trackpoint-white.png */; }; 56 | 17B5CA43B62DA7A3E77892A9 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 17B5CFB49D9EDF2FD5FC3F3B /* InfoPlist.strings */; }; 57 | 17B5CA6CDD71988402C448DC /* undo-blue.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C665874250B4ED6F8E6A /* undo-blue.png */; }; 58 | 17B5CAA24DD76D2F3E861FAC /* undo-black@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5CFD2CD2F6B374FF81913 /* undo-black@2x.png */; }; 59 | 17B5CB1D008EA768685AFAD8 /* redo-blue@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5CD9752795C5087B86A66 /* redo-blue@2x.png */; }; 60 | 17B5CB89F9AD13B5BDD13DB8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17B5C27ABAA634734167F0B3 /* Foundation.framework */; }; 61 | 17B5CB92A579F40288E703A8 /* key.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C4D6F04DDEC35701FB08 /* key.png */; }; 62 | 17B5CBDC5A3BDCF98164AB6A /* redo-black@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C03D180EB15D95614A61 /* redo-black@2x.png */; }; 63 | 17B5CC40A97ACF94DB22C8CB /* key-blue@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5C18C64DADD106573EF3D /* key-blue@2x.png */; }; 64 | 17B5CD41B3988C29043589B0 /* MarkdownSyntaxEditorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B5CC74F9FDD00A6110571B /* MarkdownSyntaxEditorTests.m */; }; 65 | 17B5CDFDEFDB10378D665129 /* KOSwipeButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 17B5C8AB004FFA1F07A81C1B /* KOSwipeButton.m */; }; 66 | 17B5CE146FA571ADE9DED003 /* undo-black.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5CB758D7D01883A8A8BB4 /* undo-black.png */; }; 67 | 17B5CE5D373CC1051F8BD7AD /* redo-blue@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17B5CD9752795C5087B86A66 /* redo-blue@2x.png */; }; 68 | 17B5CEF52A22C06B9F8F0F9E /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17B5CD7C3BEEC2E139D2AB42 /* XCTest.framework */; }; 69 | /* End PBXBuildFile section */ 70 | 71 | /* Begin PBXContainerItemProxy section */ 72 | 17B5C365462AF0131C9CE036 /* PBXContainerItemProxy */ = { 73 | isa = PBXContainerItemProxy; 74 | containerPortal = 17B5C91B7B17B6E1D0A7AF7D /* Project object */; 75 | proxyType = 1; 76 | remoteGlobalIDString = 17B5CDEF3837C4148DAA4C5D; 77 | remoteInfo = MarkdownSyntaxEditor; 78 | }; 79 | /* End PBXContainerItemProxy section */ 80 | 81 | /* Begin PBXFileReference section */ 82 | 17B5C00965FFB0BE2B440AE8 /* trackpoint-blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "trackpoint-blue.png"; sourceTree = ""; }; 83 | 17B5C03840A39B54687EB780 /* MarkdownSyntaxModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarkdownSyntaxModel.h; sourceTree = ""; }; 84 | 17B5C03D180EB15D95614A61 /* redo-black@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "redo-black@2x.png"; sourceTree = ""; }; 85 | 17B5C080A9C842D2B7CCCE2E /* MarkdownSyntaxEditor-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MarkdownSyntaxEditor-Prefix.pch"; sourceTree = ""; }; 86 | 17B5C0AD9D7917D5B47B6DD2 /* trackpoint-white@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "trackpoint-white@2x.png"; sourceTree = ""; }; 87 | 17B5C0B204B5FE80F137F5B0 /* redo-blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "redo-blue.png"; sourceTree = ""; }; 88 | 17B5C180E4DE32A5EAA4E41B /* MarkdownSyntaxEditorTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MarkdownSyntaxEditorTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 89 | 17B5C18C64DADD106573EF3D /* key-blue@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "key-blue@2x.png"; sourceTree = ""; }; 90 | 17B5C2194C5E79DA834EEF99 /* key-pressed@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "key-pressed@2x.png"; sourceTree = ""; }; 91 | 17B5C27ABAA634734167F0B3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 92 | 17B5C30DBF2F48DB019194B4 /* readme.md */ = {isa = PBXFileReference; lastKnownFileType = file.md; path = readme.md; sourceTree = ""; }; 93 | 17B5C35163219DC2FD928AE1 /* key-blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "key-blue.png"; sourceTree = ""; }; 94 | 17B5C3E06D74CFFCED17822F /* trackpoint-blue@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "trackpoint-blue@2x.png"; sourceTree = ""; }; 95 | 17B5C4D6F04DDEC35701FB08 /* key.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = key.png; sourceTree = ""; }; 96 | 17B5C57C7BAA8B33006B792B /* MarkdownSyntaxGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarkdownSyntaxGenerator.h; sourceTree = ""; }; 97 | 17B5C5A7F1D704B0532DD559 /* EditorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EditorViewController.m; sourceTree = ""; }; 98 | 17B5C6269CB4DB6EBDD976CC /* MarkdownSyntaxEditor-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = "MarkdownSyntaxEditor-Info.plist"; sourceTree = ""; }; 99 | 17B5C6343549C35A4E747F80 /* MarkdownSyntaxModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MarkdownSyntaxModel.m; sourceTree = ""; }; 100 | 17B5C65B549523DD9AEEE5A0 /* trackpoint-black@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "trackpoint-black@2x.png"; sourceTree = ""; }; 101 | 17B5C665874250B4ED6F8E6A /* undo-blue.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "undo-blue.png"; sourceTree = ""; }; 102 | 17B5C684075D185BFD38F681 /* MarkdownTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarkdownTextView.h; sourceTree = ""; }; 103 | 17B5C6BA46FFC1794603B639 /* KOSwipeButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KOSwipeButton.h; sourceTree = ""; }; 104 | 17B5C700302FA0810D2F1264 /* MarkdownSyntaxEditorTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.info; path = "MarkdownSyntaxEditorTests-Info.plist"; sourceTree = ""; }; 105 | 17B5C77538EBB3930A9FD325 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 106 | 17B5C7ADBB751193603FFC57 /* KOKeyboardRow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KOKeyboardRow.h; sourceTree = ""; }; 107 | 17B5C7E48D7AC7CD7FD2115A /* KOKeyboardRow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KOKeyboardRow.m; sourceTree = ""; }; 108 | 17B5C81383B769E6DD9DC514 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 109 | 17B5C840892724A19182500C /* trackpoint-white.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "trackpoint-white.png"; sourceTree = ""; }; 110 | 17B5C87A39BF48D640900AB6 /* EditorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EditorViewController.h; sourceTree = ""; }; 111 | 17B5C8AB004FFA1F07A81C1B /* KOSwipeButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KOSwipeButton.m; sourceTree = ""; }; 112 | 17B5C92ACA9C91A3DF514D45 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = MarkdownSyntaxEditor/Images.xcassets; sourceTree = ""; }; 113 | 17B5C97A03EBB74A912C3E80 /* undo-blue@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "undo-blue@2x.png"; sourceTree = ""; }; 114 | 17B5C9F0928E0E60277F4D47 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 115 | 17B5CA1AE333F95F979F16BD /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 116 | 17B5CB2CDEF8D61F0C94C612 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 117 | 17B5CB758D7D01883A8A8BB4 /* undo-black.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "undo-black.png"; sourceTree = ""; }; 118 | 17B5CBC26CFADEB00BE8F3E0 /* MarkdownSyntaxEditor.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MarkdownSyntaxEditor.app; sourceTree = BUILT_PRODUCTS_DIR; }; 119 | 17B5CC2F7969FC11ADFA5E77 /* MarkdownSyntaxGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MarkdownSyntaxGenerator.m; sourceTree = ""; }; 120 | 17B5CC74F9FDD00A6110571B /* MarkdownSyntaxEditorTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MarkdownSyntaxEditorTests.m; sourceTree = ""; }; 121 | 17B5CC770BD3CF46497215F8 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 122 | 17B5CD04463F0CF18E8215B2 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 123 | 17B5CD7C3BEEC2E139D2AB42 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 124 | 17B5CD9752795C5087B86A66 /* redo-blue@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "redo-blue@2x.png"; sourceTree = ""; }; 125 | 17B5CDBB347EA59ED11A2C66 /* redo-black.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "redo-black.png"; sourceTree = ""; }; 126 | 17B5CDE41F54164717ECDB77 /* key@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "key@2x.png"; sourceTree = ""; }; 127 | 17B5CE99A04E2A8DFE8733EC /* trackpoint-black.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "trackpoint-black.png"; sourceTree = ""; }; 128 | 17B5CE9F808C4DF8C3BF927A /* MarkdownTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MarkdownTextView.m; sourceTree = ""; }; 129 | 17B5CECCAFB5CD02F0964643 /* key-pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "key-pressed.png"; sourceTree = ""; }; 130 | 17B5CFD2CD2F6B374FF81913 /* undo-black@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "undo-black@2x.png"; sourceTree = ""; }; 131 | 17B5CFDF0F421D2DB702C26E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 132 | /* End PBXFileReference section */ 133 | 134 | /* Begin PBXFrameworksBuildPhase section */ 135 | 17B5C35162DB0CF1B558A1EA /* Frameworks */ = { 136 | isa = PBXFrameworksBuildPhase; 137 | buildActionMask = 2147483647; 138 | files = ( 139 | 17B5CEF52A22C06B9F8F0F9E /* XCTest.framework in Frameworks */, 140 | 17B5C6772599FAF5C32B8542 /* Foundation.framework in Frameworks */, 141 | 17B5C7A8DEBDA6C56D8F4F26 /* UIKit.framework in Frameworks */, 142 | ); 143 | runOnlyForDeploymentPostprocessing = 0; 144 | }; 145 | 17B5C9299AB7FE3E20063386 /* Frameworks */ = { 146 | isa = PBXFrameworksBuildPhase; 147 | buildActionMask = 2147483647; 148 | files = ( 149 | 17B5CB89F9AD13B5BDD13DB8 /* Foundation.framework in Frameworks */, 150 | 17B5C8E48225BBE34D483641 /* CoreGraphics.framework in Frameworks */, 151 | 17B5C43758C5ADBDC96684E0 /* UIKit.framework in Frameworks */, 152 | ); 153 | runOnlyForDeploymentPostprocessing = 0; 154 | }; 155 | /* End PBXFrameworksBuildPhase section */ 156 | 157 | /* Begin PBXGroup section */ 158 | 17B5C066CE6BCCF708A04083 /* resources */ = { 159 | isa = PBXGroup; 160 | children = ( 161 | 17B5C2194C5E79DA834EEF99 /* key-pressed@2x.png */, 162 | 17B5CECCAFB5CD02F0964643 /* key-pressed.png */, 163 | 17B5C18C64DADD106573EF3D /* key-blue@2x.png */, 164 | 17B5CDE41F54164717ECDB77 /* key@2x.png */, 165 | 17B5C4D6F04DDEC35701FB08 /* key.png */, 166 | 17B5C35163219DC2FD928AE1 /* key-blue.png */, 167 | 17B5CE99A04E2A8DFE8733EC /* trackpoint-black.png */, 168 | 17B5C0B204B5FE80F137F5B0 /* redo-blue.png */, 169 | 17B5C0AD9D7917D5B47B6DD2 /* trackpoint-white@2x.png */, 170 | 17B5C00965FFB0BE2B440AE8 /* trackpoint-blue.png */, 171 | 17B5C665874250B4ED6F8E6A /* undo-blue.png */, 172 | 17B5CD9752795C5087B86A66 /* redo-blue@2x.png */, 173 | 17B5CDBB347EA59ED11A2C66 /* redo-black.png */, 174 | 17B5CB758D7D01883A8A8BB4 /* undo-black.png */, 175 | 17B5C65B549523DD9AEEE5A0 /* trackpoint-black@2x.png */, 176 | 17B5C97A03EBB74A912C3E80 /* undo-blue@2x.png */, 177 | 17B5CFD2CD2F6B374FF81913 /* undo-black@2x.png */, 178 | 17B5C840892724A19182500C /* trackpoint-white.png */, 179 | 17B5C03D180EB15D95614A61 /* redo-black@2x.png */, 180 | 17B5C3E06D74CFFCED17822F /* trackpoint-blue@2x.png */, 181 | ); 182 | path = resources; 183 | sourceTree = ""; 184 | }; 185 | 17B5C0D888B7B3C552CF142D /* KOKeyBoard */ = { 186 | isa = PBXGroup; 187 | children = ( 188 | 17B5C6BA46FFC1794603B639 /* KOSwipeButton.h */, 189 | 17B5C7E48D7AC7CD7FD2115A /* KOKeyboardRow.m */, 190 | 17B5C8AB004FFA1F07A81C1B /* KOSwipeButton.m */, 191 | 17B5C7ADBB751193603FFC57 /* KOKeyboardRow.h */, 192 | 17B5C066CE6BCCF708A04083 /* resources */, 193 | ); 194 | path = KOKeyBoard; 195 | sourceTree = ""; 196 | }; 197 | 17B5C361AA0D64DA1F4D8A5E = { 198 | isa = PBXGroup; 199 | children = ( 200 | 17B5CD90347A35AEF37CC311 /* Products */, 201 | 17B5C7F4026EBAE1C4BADC64 /* Frameworks */, 202 | 17B5C69DBC00A14C454B4C77 /* MarkdownSyntaxEditor */, 203 | 17B5CB012827A69228D1588E /* MarkdownSyntaxEditorTests */, 204 | 17B5C570FA7E770139E60F7C /* Lib */, 205 | 17B5C30DBF2F48DB019194B4 /* readme.md */, 206 | ); 207 | sourceTree = ""; 208 | }; 209 | 17B5C570FA7E770139E60F7C /* Lib */ = { 210 | isa = PBXGroup; 211 | children = ( 212 | 17B5CAB51E2B9771ABBFCC05 /* MarkdownSyntax */, 213 | 17B5C7ED93B9954471D8EAFA /* MarkdownTextView */, 214 | 17B5C0D888B7B3C552CF142D /* KOKeyBoard */, 215 | ); 216 | path = Lib; 217 | sourceTree = ""; 218 | }; 219 | 17B5C69DBC00A14C454B4C77 /* MarkdownSyntaxEditor */ = { 220 | isa = PBXGroup; 221 | children = ( 222 | 17B5CE36C7EE8193A2FFCCBD /* Supporting Files */, 223 | 17B5CD04463F0CF18E8215B2 /* AppDelegate.h */, 224 | 17B5CB2CDEF8D61F0C94C612 /* AppDelegate.m */, 225 | 17B5C0F811232E001557F481 /* Main.storyboard */, 226 | 17B5C5A7F1D704B0532DD559 /* EditorViewController.m */, 227 | 17B5C87A39BF48D640900AB6 /* EditorViewController.h */, 228 | ); 229 | path = MarkdownSyntaxEditor; 230 | sourceTree = ""; 231 | }; 232 | 17B5C7ED93B9954471D8EAFA /* MarkdownTextView */ = { 233 | isa = PBXGroup; 234 | children = ( 235 | 17B5CE9F808C4DF8C3BF927A /* MarkdownTextView.m */, 236 | 17B5C684075D185BFD38F681 /* MarkdownTextView.h */, 237 | ); 238 | path = MarkdownTextView; 239 | sourceTree = ""; 240 | }; 241 | 17B5C7F4026EBAE1C4BADC64 /* Frameworks */ = { 242 | isa = PBXGroup; 243 | children = ( 244 | 17B5C27ABAA634734167F0B3 /* Foundation.framework */, 245 | 17B5CC770BD3CF46497215F8 /* CoreGraphics.framework */, 246 | 17B5CA1AE333F95F979F16BD /* UIKit.framework */, 247 | 17B5CD7C3BEEC2E139D2AB42 /* XCTest.framework */, 248 | ); 249 | name = Frameworks; 250 | sourceTree = ""; 251 | }; 252 | 17B5CAB51E2B9771ABBFCC05 /* MarkdownSyntax */ = { 253 | isa = PBXGroup; 254 | children = ( 255 | 17B5CC2F7969FC11ADFA5E77 /* MarkdownSyntaxGenerator.m */, 256 | 17B5C6343549C35A4E747F80 /* MarkdownSyntaxModel.m */, 257 | 17B5C03840A39B54687EB780 /* MarkdownSyntaxModel.h */, 258 | 17B5C57C7BAA8B33006B792B /* MarkdownSyntaxGenerator.h */, 259 | ); 260 | path = MarkdownSyntax; 261 | sourceTree = ""; 262 | }; 263 | 17B5CB012827A69228D1588E /* MarkdownSyntaxEditorTests */ = { 264 | isa = PBXGroup; 265 | children = ( 266 | 17B5CB5A7DD2E2697BB93A50 /* Supporting Files */, 267 | 17B5CC74F9FDD00A6110571B /* MarkdownSyntaxEditorTests.m */, 268 | ); 269 | path = MarkdownSyntaxEditorTests; 270 | sourceTree = ""; 271 | }; 272 | 17B5CB5A7DD2E2697BB93A50 /* Supporting Files */ = { 273 | isa = PBXGroup; 274 | children = ( 275 | 17B5C700302FA0810D2F1264 /* MarkdownSyntaxEditorTests-Info.plist */, 276 | 17B5C733582B11BDFE959EA5 /* InfoPlist.strings */, 277 | ); 278 | name = "Supporting Files"; 279 | sourceTree = ""; 280 | }; 281 | 17B5CD90347A35AEF37CC311 /* Products */ = { 282 | isa = PBXGroup; 283 | children = ( 284 | 17B5CBC26CFADEB00BE8F3E0 /* MarkdownSyntaxEditor.app */, 285 | 17B5C180E4DE32A5EAA4E41B /* MarkdownSyntaxEditorTests.xctest */, 286 | 17B5C92ACA9C91A3DF514D45 /* Images.xcassets */, 287 | ); 288 | name = Products; 289 | sourceTree = ""; 290 | }; 291 | 17B5CE36C7EE8193A2FFCCBD /* Supporting Files */ = { 292 | isa = PBXGroup; 293 | children = ( 294 | 17B5C6269CB4DB6EBDD976CC /* MarkdownSyntaxEditor-Info.plist */, 295 | 17B5CFB49D9EDF2FD5FC3F3B /* InfoPlist.strings */, 296 | 17B5C77538EBB3930A9FD325 /* main.m */, 297 | 17B5C080A9C842D2B7CCCE2E /* MarkdownSyntaxEditor-Prefix.pch */, 298 | ); 299 | name = "Supporting Files"; 300 | sourceTree = ""; 301 | }; 302 | /* End PBXGroup section */ 303 | 304 | /* Begin PBXNativeTarget section */ 305 | 17B5C5BEFFF55B5846F625E0 /* MarkdownSyntaxEditorTests */ = { 306 | isa = PBXNativeTarget; 307 | buildConfigurationList = 17B5C5D5EFD4E30AFA94D30B /* Build configuration list for PBXNativeTarget "MarkdownSyntaxEditorTests" */; 308 | buildPhases = ( 309 | 17B5CBA79222AC0BFF2774F4 /* Sources */, 310 | 17B5C35162DB0CF1B558A1EA /* Frameworks */, 311 | 17B5C20CB8057D0510B74772 /* Resources */, 312 | ); 313 | buildRules = ( 314 | ); 315 | dependencies = ( 316 | 17B5C1A89DDEB375D5454F5D /* PBXTargetDependency */, 317 | ); 318 | name = MarkdownSyntaxEditorTests; 319 | productName = MarkdownSyntaxEditorTests; 320 | productReference = 17B5C180E4DE32A5EAA4E41B /* MarkdownSyntaxEditorTests.xctest */; 321 | productType = "com.apple.product-type.bundle.unit-test"; 322 | }; 323 | 17B5CDEF3837C4148DAA4C5D /* MarkdownSyntaxEditor */ = { 324 | isa = PBXNativeTarget; 325 | buildConfigurationList = 17B5CE93A9D1F1F5C3A4149E /* Build configuration list for PBXNativeTarget "MarkdownSyntaxEditor" */; 326 | buildPhases = ( 327 | 17B5C2A3F959BC20068FEC8F /* Sources */, 328 | 17B5C9299AB7FE3E20063386 /* Frameworks */, 329 | 17B5CA0F21ED792ADF7B5359 /* Resources */, 330 | ); 331 | buildRules = ( 332 | ); 333 | dependencies = ( 334 | ); 335 | name = MarkdownSyntaxEditor; 336 | productName = MarkdownSyntaxEditor; 337 | productReference = 17B5CBC26CFADEB00BE8F3E0 /* MarkdownSyntaxEditor.app */; 338 | productType = "com.apple.product-type.application"; 339 | }; 340 | /* End PBXNativeTarget section */ 341 | 342 | /* Begin PBXProject section */ 343 | 17B5C91B7B17B6E1D0A7AF7D /* Project object */ = { 344 | isa = PBXProject; 345 | attributes = { 346 | ORGANIZATIONNAME = azu; 347 | }; 348 | buildConfigurationList = 17B5CB56116ACE6FE5247E35 /* Build configuration list for PBXProject "MarkdownSyntaxEditor" */; 349 | compatibilityVersion = "Xcode 3.2"; 350 | developmentRegion = English; 351 | hasScannedForEncodings = 0; 352 | knownRegions = ( 353 | en, 354 | ); 355 | mainGroup = 17B5C361AA0D64DA1F4D8A5E; 356 | productRefGroup = 17B5CD90347A35AEF37CC311 /* Products */; 357 | projectDirPath = ""; 358 | projectRoot = ""; 359 | targets = ( 360 | 17B5CDEF3837C4148DAA4C5D /* MarkdownSyntaxEditor */, 361 | 17B5C5BEFFF55B5846F625E0 /* MarkdownSyntaxEditorTests */, 362 | ); 363 | }; 364 | /* End PBXProject section */ 365 | 366 | /* Begin PBXResourcesBuildPhase section */ 367 | 17B5C20CB8057D0510B74772 /* Resources */ = { 368 | isa = PBXResourcesBuildPhase; 369 | buildActionMask = 2147483647; 370 | files = ( 371 | 17B5C54EDCCA70EA5580E293 /* InfoPlist.strings in Resources */, 372 | 17B5C6F68FEE372C15060E16 /* trackpoint-black.png in Resources */, 373 | 17B5C8AE11D2299675E382E8 /* redo-blue.png in Resources */, 374 | 17B5C350EC9F6AAEE5A20C7A /* trackpoint-white@2x.png in Resources */, 375 | 17B5C22F690FC74B77E1EF23 /* trackpoint-blue.png in Resources */, 376 | 17B5C02AD0DA98BA3FEE03D5 /* undo-blue.png in Resources */, 377 | 17B5CB1D008EA768685AFAD8 /* redo-blue@2x.png in Resources */, 378 | 17B5C9D8FC97063C57B243FE /* redo-black.png in Resources */, 379 | 17B5CE146FA571ADE9DED003 /* undo-black.png in Resources */, 380 | 17B5C76A316A068C8A62FFB0 /* trackpoint-black@2x.png in Resources */, 381 | 17B5C8410029FA75F927DB6C /* undo-blue@2x.png in Resources */, 382 | 17B5CAA24DD76D2F3E861FAC /* undo-black@2x.png in Resources */, 383 | 17B5C73588B565ECF08A2E5F /* trackpoint-white.png in Resources */, 384 | 17B5CBDC5A3BDCF98164AB6A /* redo-black@2x.png in Resources */, 385 | 17B5C8B56818D017719C1E57 /* trackpoint-blue@2x.png in Resources */, 386 | ); 387 | runOnlyForDeploymentPostprocessing = 0; 388 | }; 389 | 17B5CA0F21ED792ADF7B5359 /* Resources */ = { 390 | isa = PBXResourcesBuildPhase; 391 | buildActionMask = 2147483647; 392 | files = ( 393 | 17B5CA43B62DA7A3E77892A9 /* InfoPlist.strings in Resources */, 394 | 17B5C5747D9C2EAF03EE9BBB /* Main.storyboard in Resources */, 395 | 17B5C97E7BCB9E28CA42A9D5 /* Images.xcassets in Resources */, 396 | 17B5C917B2EE0D5889028A94 /* key-pressed@2x.png in Resources */, 397 | 17B5C89B4A73C672051950AC /* key-pressed.png in Resources */, 398 | 17B5CC40A97ACF94DB22C8CB /* key-blue@2x.png in Resources */, 399 | 17B5C3A453973596044380AE /* key@2x.png in Resources */, 400 | 17B5CB92A579F40288E703A8 /* key.png in Resources */, 401 | 17B5C220CF866FFED51EBEB3 /* key-blue.png in Resources */, 402 | 17B5C4203127891B76E56259 /* trackpoint-black.png in Resources */, 403 | 17B5C3AEA77AA7F8C139731C /* redo-blue.png in Resources */, 404 | 17B5C415C6DE26E03260944F /* trackpoint-white@2x.png in Resources */, 405 | 17B5C7DACC64C8C50D38FFA7 /* trackpoint-blue.png in Resources */, 406 | 17B5CA6CDD71988402C448DC /* undo-blue.png in Resources */, 407 | 17B5CE5D373CC1051F8BD7AD /* redo-blue@2x.png in Resources */, 408 | 17B5C5BD101F22FB296A7876 /* redo-black.png in Resources */, 409 | 17B5C418274D50607EF1B0E7 /* undo-black.png in Resources */, 410 | 17B5C532C4C7B6AF3B9B7F4F /* trackpoint-black@2x.png in Resources */, 411 | 17B5C06769621759331A754B /* undo-blue@2x.png in Resources */, 412 | 17B5C28FAC774FEADE9A7609 /* undo-black@2x.png in Resources */, 413 | 17B5CA1E3560CFCFDD4031D7 /* trackpoint-white.png in Resources */, 414 | 17B5C9EBD2A296041B85B496 /* redo-black@2x.png in Resources */, 415 | 17B5C265B27908DC21F6079F /* trackpoint-blue@2x.png in Resources */, 416 | ); 417 | runOnlyForDeploymentPostprocessing = 0; 418 | }; 419 | /* End PBXResourcesBuildPhase section */ 420 | 421 | /* Begin PBXSourcesBuildPhase section */ 422 | 17B5C2A3F959BC20068FEC8F /* Sources */ = { 423 | isa = PBXSourcesBuildPhase; 424 | buildActionMask = 2147483647; 425 | files = ( 426 | 17B5C11CC50BA86B58584A19 /* main.m in Sources */, 427 | 17B5C0D17AE20200B6870728 /* AppDelegate.m in Sources */, 428 | 17B5C10907673629E021B1A7 /* EditorViewController.m in Sources */, 429 | 17B5C1632B2A97942F02C616 /* MarkdownSyntaxGenerator.m in Sources */, 430 | 17B5C7C3DF4878BCF5E50176 /* MarkdownSyntaxModel.m in Sources */, 431 | 17B5C2D8CB40DA6E49D917B5 /* MarkdownTextView.m in Sources */, 432 | 17B5C05FEC8FD14B5B881E99 /* KOKeyboardRow.m in Sources */, 433 | 17B5CDFDEFDB10378D665129 /* KOSwipeButton.m in Sources */, 434 | ); 435 | runOnlyForDeploymentPostprocessing = 0; 436 | }; 437 | 17B5CBA79222AC0BFF2774F4 /* Sources */ = { 438 | isa = PBXSourcesBuildPhase; 439 | buildActionMask = 2147483647; 440 | files = ( 441 | 17B5CD41B3988C29043589B0 /* MarkdownSyntaxEditorTests.m in Sources */, 442 | 17B5C4F51FC3844AC1605D9B /* EditorViewController.m in Sources */, 443 | 17B5C15EB3CA6A4ADC826C3A /* MarkdownSyntaxGenerator.m in Sources */, 444 | 17B5C072E253F29BA5E6B019 /* MarkdownSyntaxModel.m in Sources */, 445 | 17B5C195566E417FCB70DA63 /* MarkdownTextView.m in Sources */, 446 | 17B5C9B747966AC5740481EF /* KOKeyboardRow.m in Sources */, 447 | 17B5C67AB36DB7134C37425B /* KOSwipeButton.m in Sources */, 448 | ); 449 | runOnlyForDeploymentPostprocessing = 0; 450 | }; 451 | /* End PBXSourcesBuildPhase section */ 452 | 453 | /* Begin PBXTargetDependency section */ 454 | 17B5C1A89DDEB375D5454F5D /* PBXTargetDependency */ = { 455 | isa = PBXTargetDependency; 456 | target = 17B5CDEF3837C4148DAA4C5D /* MarkdownSyntaxEditor */; 457 | targetProxy = 17B5C365462AF0131C9CE036 /* PBXContainerItemProxy */; 458 | }; 459 | /* End PBXTargetDependency section */ 460 | 461 | /* Begin PBXVariantGroup section */ 462 | 17B5C0F811232E001557F481 /* Main.storyboard */ = { 463 | isa = PBXVariantGroup; 464 | children = ( 465 | 17B5C81383B769E6DD9DC514 /* Base */, 466 | ); 467 | name = Main.storyboard; 468 | sourceTree = ""; 469 | }; 470 | 17B5C733582B11BDFE959EA5 /* InfoPlist.strings */ = { 471 | isa = PBXVariantGroup; 472 | children = ( 473 | 17B5CFDF0F421D2DB702C26E /* en */, 474 | ); 475 | name = InfoPlist.strings; 476 | sourceTree = ""; 477 | }; 478 | 17B5CFB49D9EDF2FD5FC3F3B /* InfoPlist.strings */ = { 479 | isa = PBXVariantGroup; 480 | children = ( 481 | 17B5C9F0928E0E60277F4D47 /* en */, 482 | ); 483 | name = InfoPlist.strings; 484 | sourceTree = ""; 485 | }; 486 | /* End PBXVariantGroup section */ 487 | 488 | /* Begin XCBuildConfiguration section */ 489 | 17B5C230E4251BD2FA44E0AE /* Release */ = { 490 | isa = XCBuildConfiguration; 491 | buildSettings = { 492 | FRAMEWORK_SEARCH_PATHS = ( 493 | "$(SDKROOT)/Developer/Library/Frameworks", 494 | "$(inherited)", 495 | ); 496 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 497 | GCC_PREFIX_HEADER = "MarkdownSyntaxEditor/MarkdownSyntaxEditor-Prefix.pch"; 498 | INFOPLIST_FILE = "MarkdownSyntaxEditorTests/MarkdownSyntaxEditorTests-Info.plist"; 499 | PRODUCT_NAME = "$(TARGET_NAME)"; 500 | WRAPPER_EXTENSION = xctest; 501 | }; 502 | name = Release; 503 | }; 504 | 17B5C3C94E33BE0831F1C19C /* Debug */ = { 505 | isa = XCBuildConfiguration; 506 | buildSettings = { 507 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 508 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 509 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 510 | GCC_PREFIX_HEADER = "MarkdownSyntaxEditor/MarkdownSyntaxEditor-Prefix.pch"; 511 | INFOPLIST_FILE = "MarkdownSyntaxEditor/MarkdownSyntaxEditor-Info.plist"; 512 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 513 | PRODUCT_NAME = "$(TARGET_NAME)"; 514 | WRAPPER_EXTENSION = app; 515 | }; 516 | name = Debug; 517 | }; 518 | 17B5C4DAE89B2DAA5C9F130A /* Debug */ = { 519 | isa = XCBuildConfiguration; 520 | buildSettings = { 521 | FRAMEWORK_SEARCH_PATHS = ( 522 | "$(SDKROOT)/Developer/Library/Frameworks", 523 | "$(inherited)", 524 | ); 525 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 526 | GCC_PREFIX_HEADER = "MarkdownSyntaxEditor/MarkdownSyntaxEditor-Prefix.pch"; 527 | INFOPLIST_FILE = "MarkdownSyntaxEditorTests/MarkdownSyntaxEditorTests-Info.plist"; 528 | PRODUCT_NAME = "$(TARGET_NAME)"; 529 | WRAPPER_EXTENSION = xctest; 530 | }; 531 | name = Debug; 532 | }; 533 | 17B5C966F5C3795ABEA418B8 /* Release */ = { 534 | isa = XCBuildConfiguration; 535 | buildSettings = { 536 | ALWAYS_SEARCH_USER_PATHS = NO; 537 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 538 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 539 | CLANG_CXX_LIBRARY = "libc++"; 540 | CLANG_ENABLE_MODULES = YES; 541 | CLANG_ENABLE_OBJC_ARC = YES; 542 | CLANG_WARN_BOOL_CONVERSION = YES; 543 | CLANG_WARN_CONSTANT_CONVERSION = YES; 544 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 545 | CLANG_WARN_EMPTY_BODY = YES; 546 | CLANG_WARN_ENUM_CONVERSION = YES; 547 | CLANG_WARN_INT_CONVERSION = YES; 548 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 549 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 550 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 551 | COPY_PHASE_STRIP = YES; 552 | ENABLE_NS_ASSERTIONS = NO; 553 | GCC_C_LANGUAGE_STANDARD = gnu99; 554 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 555 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 556 | GCC_WARN_UNDECLARED_SELECTOR = YES; 557 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 558 | GCC_WARN_UNUSED_FUNCTION = YES; 559 | GCC_WARN_UNUSED_VARIABLE = YES; 560 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 561 | SDKROOT = iphoneos; 562 | VALIDATE_PRODUCT = YES; 563 | }; 564 | name = Release; 565 | }; 566 | 17B5CC4F20D0E2F6CCDB9A47 /* Debug */ = { 567 | isa = XCBuildConfiguration; 568 | buildSettings = { 569 | ALWAYS_SEARCH_USER_PATHS = NO; 570 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 571 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 572 | CLANG_CXX_LIBRARY = "libc++"; 573 | CLANG_ENABLE_MODULES = YES; 574 | CLANG_ENABLE_OBJC_ARC = YES; 575 | CLANG_WARN_BOOL_CONVERSION = YES; 576 | CLANG_WARN_CONSTANT_CONVERSION = YES; 577 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 578 | CLANG_WARN_EMPTY_BODY = YES; 579 | CLANG_WARN_ENUM_CONVERSION = YES; 580 | CLANG_WARN_INT_CONVERSION = YES; 581 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 582 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 583 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 584 | COPY_PHASE_STRIP = NO; 585 | GCC_C_LANGUAGE_STANDARD = gnu99; 586 | GCC_DYNAMIC_NO_PIC = NO; 587 | GCC_OPTIMIZATION_LEVEL = 0; 588 | GCC_PREPROCESSOR_DEFINITIONS = ( 589 | "DEBUG=1", 590 | "$(inherited)", 591 | ); 592 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 593 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 594 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 595 | GCC_WARN_UNDECLARED_SELECTOR = YES; 596 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 597 | GCC_WARN_UNUSED_FUNCTION = YES; 598 | GCC_WARN_UNUSED_VARIABLE = YES; 599 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 600 | ONLY_ACTIVE_ARCH = YES; 601 | SDKROOT = iphoneos; 602 | }; 603 | name = Debug; 604 | }; 605 | 17B5CF1E6790F8E3907F5D3D /* Release */ = { 606 | isa = XCBuildConfiguration; 607 | buildSettings = { 608 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 609 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 610 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 611 | GCC_PREFIX_HEADER = "MarkdownSyntaxEditor/MarkdownSyntaxEditor-Prefix.pch"; 612 | INFOPLIST_FILE = "MarkdownSyntaxEditor/MarkdownSyntaxEditor-Info.plist"; 613 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 614 | PRODUCT_NAME = "$(TARGET_NAME)"; 615 | WRAPPER_EXTENSION = app; 616 | }; 617 | name = Release; 618 | }; 619 | /* End XCBuildConfiguration section */ 620 | 621 | /* Begin XCConfigurationList section */ 622 | 17B5C5D5EFD4E30AFA94D30B /* Build configuration list for PBXNativeTarget "MarkdownSyntaxEditorTests" */ = { 623 | isa = XCConfigurationList; 624 | buildConfigurations = ( 625 | 17B5C230E4251BD2FA44E0AE /* Release */, 626 | 17B5C4DAE89B2DAA5C9F130A /* Debug */, 627 | ); 628 | defaultConfigurationIsVisible = 0; 629 | defaultConfigurationName = Release; 630 | }; 631 | 17B5CB56116ACE6FE5247E35 /* Build configuration list for PBXProject "MarkdownSyntaxEditor" */ = { 632 | isa = XCConfigurationList; 633 | buildConfigurations = ( 634 | 17B5C966F5C3795ABEA418B8 /* Release */, 635 | 17B5CC4F20D0E2F6CCDB9A47 /* Debug */, 636 | ); 637 | defaultConfigurationIsVisible = 0; 638 | defaultConfigurationName = Release; 639 | }; 640 | 17B5CE93A9D1F1F5C3A4149E /* Build configuration list for PBXNativeTarget "MarkdownSyntaxEditor" */ = { 641 | isa = XCConfigurationList; 642 | buildConfigurations = ( 643 | 17B5CF1E6790F8E3907F5D3D /* Release */, 644 | 17B5C3C94E33BE0831F1C19C /* Debug */, 645 | ); 646 | defaultConfigurationIsVisible = 0; 647 | defaultConfigurationName = Release; 648 | }; 649 | /* End XCConfigurationList section */ 650 | }; 651 | rootObject = 17B5C91B7B17B6E1D0A7AF7D /* Project object */; 652 | } 653 | --------------------------------------------------------------------------------