摘要: 1. 重新安装。前提是保证彻底卸载,完全卸载使用下面命令:sudo /Developer/Library/uninstall-devtools --mode=all逼急了才用的方法2. 使用32位模式运行Xcode在Finder里,找到/Developer/Application/XCode.app,右击,菜单里选择Get Info,然后选中Open in 32-bit mode3. 删除project.xcworkspace文件在Finder里,右击工程文件XXX.xcodeproj,菜单里选择Show Package Contents,打开以后可以看到project.xcworkspace 阅读全文
posted @ 2013-01-16 20:52 我的程序人生 阅读(246) 评论(0) 推荐(0) 编辑
摘要: This is a (somewhat) hidden preference which allows you to define the number of concurrent compile tasks:defaults write com.apple.dt.XcodeIDEBuildOperationMaxNumberOfConcurrentCompileTasks4To Disable Indexing in the IDEThis one disables code sense indexing, which can save a lot of resources in large 阅读全文
posted @ 2013-01-16 20:38 我的程序人生 阅读(267) 评论(0) 推荐(0) 编辑
摘要: // int a[2][2];// a[0][0]=11;// a[0][1]=12;// // a[1][0]=21;// a[1][1]=22; int row = 10; int col = 10; char*** a = new char** [row]; for (int i=0; i<row; i++) { *(a+i) = new char* [col]; for (int j=0; j<col; j++) { //*(*(a+i)+j) = ne... 阅读全文
posted @ 2012-12-17 12:00 我的程序人生 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 最近的项目遇到了网络请求,需要在请求完成后回调delegate的方法。然而回调时经常遇到这种情况:delegate已经被释放,这时调用其方法则会引起crash。objc的runtime中有两种判断类型的方式比较靠谱,他们可以直接取得任意一个objc_object(和id是完全一样的数据类型)的类或者类名。其函数如下://Returns the class name of a given object.const char *object_getClassName(id obj); //Returns the class of an object.Class object_getClass(id 阅读全文
posted @ 2012-12-13 20:28 我的程序人生 阅读(595) 评论(0) 推荐(0) 编辑
摘要: http://stackoverflow.com/questions/9602966/uitableview-with-static-headershttp://stackoverflow.com/questions/664781/change-default-scrolling-behavior-of-uitableview-section-header关键代码段:Below is one solution:-(void)scrollViewDidScroll:(UIScrollView*)scrollView {CGFloat sectionHeaderHeight =40;if(scro 阅读全文
posted @ 2012-12-10 14:35 我的程序人生 阅读(373) 评论(0) 推荐(0) 编辑
摘要: #if !defined(__clang__) || __clang_major__ < 3 #ifndef __bridge #define __bridge #endif #ifndef __bridge_retain #define __bridge_retain #endif #ifndef __bridge_retained #define __bridge_retained #endif #ifndef __autoreleasing #define __autoreleasing ... 阅读全文
posted @ 2012-11-27 16:12 我的程序人生 阅读(224) 评论(0) 推荐(0) 编辑
摘要: Download 阅读全文
posted @ 2012-11-23 14:30 我的程序人生 阅读(172) 评论(0) 推荐(0) 编辑
摘要: lipo -create -arch i386 i386/libavcodec.a -arch armv7 armv7/libavcodec.a -output universal/libavcodec.alipo -create -arch i386 i386/libavdevice.a -arch armv7 armv7/libavdevice.a -output universal/libavdevice.alipo -create -arch i386 i386/libavformat.a -arch armv7 armv7/libavformat.a -output universa 阅读全文
posted @ 2012-11-20 14:51 我的程序人生 阅读(309) 评论(0) 推荐(0) 编辑
摘要: ffmpeg git:https://github.com/FFmpeg/FFmpeggas-preprocessor git:https://github.com/yuvi/gas-preprocessor#!/bin/tcsh -fif (! -d i386) mkdir i386if (! -d lib) mkdir librm i386/*.amake clean#./configure --arch=i386 --extra-cflags='-arch i386' --extra-ldflags='-arch i386' --disable-encod 阅读全文
posted @ 2012-11-08 11:44 我的程序人生 阅读(1593) 评论(0) 推荐(0) 编辑
摘要: ffmpeg git:https://github.com/FFmpeg/FFmpeggas-preprocessor git:https://github.com/yuvi/gas-preprocessor#!/bin/tcsh -fif (! -d armv7) mkdir armv7if (! -d lib) mkdir librm armv7/*.amake clean./configure \--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc 阅读全文
posted @ 2012-11-08 11:28 我的程序人生 阅读(1531) 评论(1) 推荐(0) 编辑