ACEView - 在Cocoa应用中嵌入ACE编程器

分享到:
在您的Cocoa应用程序中使用带劲的ACE编辑器。

ACEView - 在Cocoa应用中嵌入ACE编程器

#import "Cocoa/Cocoa.h"
#import "ACEView/ACEView.h"
@interface AppDelegate : NSObject  {
IBOutlet ACEView *aceView;
}
@property (assign) IBOutlet NSWindow *window;
@end
#import "AppDelegate.h"
#import "ACEView/ACEView.h"
#import "ACEView/ACEModeNames.h"
#import "ACEView/ACEThemeNames.h"
@implementation AppDelegate
- (void) applicationDidFinishLaunching:(NSNotification *)aNotification {
// Note that you'll likely be using local text
[aceView setString:[NSString stringWithContentsOfURL:[NSURL URLWithString:@"https://github.com/faceleg/ACEView"] encoding:NSUTF8StringEncoding
error:nil]];
[aceView setDelegate:self];
[aceView setMode:ACEModeHTML];
[aceView setTheme:ACEThemeXcode];
[aceView setShowInvisibles:YES];
}
- (void) textDidChange:(NSNotification *)notification {
NSLog(@"%s", __PRETTY_FUNCTION__);
}
@end

项目主页:http://www.open-open.com/lib/view/home/1355631564354

昵    称:
验证码:

相关文档: