随笔分类 -  Macos

摘要:A dispatchsemaphore(信号量) is useful if you need a concurrency control for a small portion(部分) of the source code that has smaller granularity(颗粒度) than... 阅读全文
posted @ 2014-05-27 10:25 dzldzl 阅读(436) 评论(0) 推荐(0)
摘要:1.malloc申请空间不当,导致越界,在不定的情况下崩溃typedef struct _tagCmsHcInst{。。。。。。}cmsHcInst,*pcmsHcInst;错误:pcmsHcInstinst = (pcmsHcInst)malloc(sizeof(pcmsHcInst))正确:pc... 阅读全文
posted @ 2014-05-23 15:58 dzldzl 阅读(143) 评论(0) 推荐(0)
摘要:相同:NSData*imageData =[imageTIFFRepresentation]; NSBitmapImageRep*imageRep =[NSBitmapImageRep imageRepWithData:imageData]; [imageRep setSize:[[_imageV... 阅读全文
posted @ 2014-05-21 23:06 dzldzl 阅读(934) 评论(0) 推荐(0)
摘要:关于:_iconv_open", referenced from:的解决方案添加动态库libiconv.dylib. 阅读全文
posted @ 2014-05-16 18:36 dzldzl 阅读(907) 评论(0) 推荐(0)
摘要:NSCondition的用法NSCondition:使用lock方法进行资源的申请,使用unlock方法进行资源的释放,申请资源之后可以调用wait方法进行挂起状态,等待被唤醒,调用signal方法唤醒其他正在等待的线程(需抢占),调用broadcast唤醒其他所有等待的线程。使用NSConditi... 阅读全文
posted @ 2014-05-14 11:35 dzldzl 阅读(607) 评论(0) 推荐(0)
摘要:注意:当使用 fork 函数加载独立进程的时候,你必须总是在 fork 后面调用 exec 或者类似的函数。 基于 Core Foundation、Cocao 或者 Core Data 框架(无论显式还是隐式关联)的应用程序随后调用 exec 函数或者类似的函数都会导出不确定的结果。分叉函数编辑头文... 阅读全文
posted @ 2014-05-13 18:18 dzldzl 阅读(289) 评论(0) 推荐(0)
摘要:http://blog.sina.com.cn/s/blog_5df7dcaf0100c0q4.html第十五章: 使用 Alert Panels有时候,我们可能想要通过一个Alert Panel来给用户一些警告信息. Alert panel很容易生成,在cocoa中,大部分的东西都是面向对象的,不... 阅读全文
posted @ 2014-05-09 11:18 dzldzl 阅读(327) 评论(0) 推荐(0)
摘要:当使用CABasicAnimation时,CAConstraintLayoutManager不起作用,原因未知CoreAnimation编程指南(九)图层布局发布日期:2012-11-21 浏览次数:7NSView提供了经典的“stuts and springs”模式,用于视图调整大小的时候把关联到... 阅读全文
posted @ 2014-05-07 16:23 dzldzl 阅读(1008) 评论(0) 推荐(0)
摘要:将NSImage转换为CIImage#import // convert NSImage to bitmapNSImage * myImage= [self currentImage];NSData* tiffData = [myImage TIFFRepresentation];NSBitmapI... 阅读全文
posted @ 2014-04-29 17:34 dzldzl 阅读(2403) 评论(0) 推荐(0)
摘要:有时候,我们在xcode里删除本地文件时,选择了一些不想删除的给删除掉,或者提交给公司版本管理时,把自己修改的给覆盖了。此时需要运用xcode自带的GIt服务器,管理本地代码。现在你可以给你的项目设置多个仓库(repositories),当然现在最流行,好用的就是用Git来进行版本控制了。当然如果用... 阅读全文
posted @ 2014-04-23 17:52 dzldzl 阅读(231) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/kmyhy/article/details/7643568http://blog.csdn.net/kmyhy/article/details/7651794 阅读全文
posted @ 2014-04-22 11:10 dzldzl 阅读(233) 评论(0) 推荐(0)
摘要:Graphics States在创建context的时候,都会创建一个空的stack用于存储graphics的状态。通过函数CGContextSaveGState和函数CGContextRestoreGState分别将graphics的状态压入和弹出stack。graphics的状态不好看path,... 阅读全文
posted @ 2014-04-22 09:44 dzldzl 阅读(398) 评论(0) 推荐(0)
摘要:原文地址:http://blog.sina.com.cn/s/blog_5102c0360100uv9l.html参考http://www.dev3g.com/?p=27对于画文本可以很多做过iphone开发的人员都曾为bojective-c语言的设计而苦恼。前几天我也因为文本的排版很纠结。看了很多... 阅读全文
posted @ 2014-04-22 08:58 dzldzl 阅读(263) 评论(0) 推荐(0)
摘要:你可以在Cocoa View中使用Core Graphics函数,只需要传递当前图形端口:#define cgrect(nsrect) (*(CGRect *)&(nsrect))- (void) drawRect: (NSRect) rect{NSRectbounds = [selfbounds]... 阅读全文
posted @ 2014-04-14 09:22 dzldzl 阅读(214) 评论(0) 推荐(0)
摘要:FFmpeg-n2.2.ziphttps://trac.ffmpeg.org/wiki/MacOSXCompilationGuide编译命令./configure --disable-yasm --cc=clangmakemake install生成库位于 /usr/local/include /u... 阅读全文
posted @ 2014-04-10 13:34 dzldzl 阅读(203) 评论(0) 推荐(0)
摘要:http://www.cnitblog.com/shisanlangd/archive/2013/10/22/ffmpeg_xcode_ios7.html 阅读全文
posted @ 2014-03-14 17:43 dzldzl 阅读(110) 评论(0) 推荐(0)