2017年3月18日

NSWorkspace的mountedLocalVolumePaths

摘要: 1、mountedLocalVolumePaths 显示电脑的本地卷,例如,内部或外部硬盘驱动器,就是在菜单栏前往电脑后显示的 可以通过NSArray *arrayDisks = [[NSWorkspace sharedWorkspace] mountedLocalVolumePaths];返回返回 阅读全文

posted @ 2017-03-18 10:56 请叫我飞戈 阅读(137) 评论(0) 推荐(0) 编辑

2016年11月25日

修改系统默认的NSButton的按下变灰

摘要: 修改系统默认的NSButton的按下变灰:[(NSButtonCell *)self.button.cell setHighlightsBy:NSNoCellMask]; 阅读全文

posted @ 2016-11-25 16:24 请叫我飞戈 阅读(200) 评论(0) 推荐(0) 编辑

NSParagraphStyleAttributeName

摘要: // NSParagraphStyleAttributeName 段落的风格(设置首行,行间距,对齐方式什么的)看自己需要什么属性,写什么 NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init] 阅读全文

posted @ 2016-11-25 15:35 请叫我飞戈 阅读(335) 评论(0) 推荐(0) 编辑

2016年11月9日

- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender

摘要: 目的是为了点击应用程序左上角的关闭按钮,应用程序消失。 阅读全文

posted @ 2016-11-09 10:31 请叫我飞戈 阅读(195) 评论(0) 推荐(0) 编辑

2016年9月14日

xcode中的 preprocessor macros

摘要: ios有没有全局宏,或者在工程属性里设置宏?那么如何操作 比如有个宏(#define AUTO_CONNECT)在所有/整个工程的代码里这个宏都是有效的。 解决方案 在工程的设置属性里搜索preprocessor macros可以看到DEBUG的定义,再添加上自己的项目名就好了 阅读全文

posted @ 2016-09-14 17:51 请叫我飞戈 阅读(282) 评论(0) 推荐(0) 编辑

2016年9月13日

XCode下混合编译 C++/Objective-C

摘要: 做混合编译之前一定要把编译器的Compile Sources As选项改为Objective C++ 阅读全文

posted @ 2016-09-13 09:54 请叫我飞戈 阅读(209) 评论(0) 推荐(0) 编辑

2016年8月13日

<command line>

摘要: 问题描述: /Users/mac/Desktop/1111/<command line> /Users/mac/Desktop/1111/<command line>:4:10: '/Users/mac/Desktop/1111/Yes' file not found /Users/mac/Desk 阅读全文

posted @ 2016-08-13 18:08 请叫我飞戈 阅读(138) 评论(0) 推荐(0) 编辑

cocoapod安装过程中Bug

摘要: 在cocoapod安装过程中遇到: diff: /../Podfile.lock: No such file or directory diff: /Manifest.lock: No such file or directory error: The sandbox is not in sync 阅读全文

posted @ 2016-08-13 18:00 请叫我飞戈 阅读(107) 评论(0) 推荐(0) 编辑

2016年8月9日

UIImageWriteToSavedPhotosAlbum将应用中的图片保存到用户iPhone或者iTouch的相册中

摘要: - (void)savePicToPhotoes { UIGraphicsBeginImageContext(self.view.bounds.size); CGContextRef ref = UIGraphicsGetCurrentContext(); [_board.layer renderI 阅读全文

posted @ 2016-08-09 14:34 请叫我飞戈 阅读(454) 评论(0) 推荐(0) 编辑

2016年8月3日

String相关

摘要: 1. componentsSeparatedByString 将字符串切割成数组 NSString *a = [[NSString alloc] initWithString : @"狗,猪,苹果,小狗" ]; NSArray *b = [a componentsSeparatedByString: 阅读全文

posted @ 2016-08-03 20:04 请叫我飞戈 阅读(84) 评论(0) 推荐(0) 编辑

导航