- 博客(17)
- 收藏
- 关注
转载 [Objective-C] #include和#import的区别
#import 的功能大致和 #include 一样,不同之处在于,#import 实现了下面的功能#ifndef _SOME_HEAER_H_#define _SOME_HEAER_H_// ...#endif在include头文件时,避免了重复include同一个头文件。
2015-06-29 18:40:38 1186
转载 [Objective-C] class add a property and its setter and getter
参考:http://cocoadevcentral.com/d/learn_objectivec/ 有两种方法,方法一较简洁方便。方法一:使用 @property 和 @synthesize 关键字。setter 和 getter 方法会编译器被自动生成。// MyTest.h#import @interf
2015-06-29 18:28:55 475
转载 [Objective-C] 理解 Objective-C 的 ARC
转自: http://www.oschina.net/translate/objc-automatic-reference-counting-in-xcode-explained英文原文:Understanding Automatic Reference Counting in Objective-C自动引用计数(Automati
2015-06-29 11:48:39 456
转载 [Objective-C] iOS 开发中建议使用自动引用计数(ARC)
参考:http://stackoverflow.com/questions/12811767/ios-garbage-collectionOS X开发中,目前是支持Garbage Collection的,但是从OS X Mountain Lion开始就不建议使用了(deprecated)。iOS开发中不支持Garbage Collection。iOS开发中,有更好替代品:ARC (
2015-06-29 11:20:07 626
转载 [Objective-C] 从“引用计数”过渡到“自动引用计数”(ARC)
转自:https://developer.apple.com/library/mac/releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.htmlTransitioning to ARC Release NotesAutomatic Reference Counting (A
2015-06-29 11:04:50 1455
转载 [Objective-C] Objective-C中的id
转自:http://unixjunkie.blogspot.com/2006/02/nil-and-nil.htmlhttp://www.cocoachina.com/ios/20090611/170.htmlObjective-C中有一些很有趣的数据类型经常会被错误地理解。他们中的大多数都可以在/usr/include/objc/objc.h或者这个目录中的其他头文件
2015-06-29 09:59:43 695
原创 [XCode] InterfaceBuilder 误操作导致的uncaught exception 'nsunknownkeyexception'异常
参考:http://stackoverflow.com/questions/8232766/terminating-app-due-to-uncaught-exception-nsunknownkeyexception【问题】通过 http://blog.csdn.net/yasi_xi/article/details/46651415 描述的方式创建lab
2015-06-26 17:01:57 998
转载 [XCode] 通过Assistant Editor完成拖拽映射UI元素和Action
参考:http://www.tutorialspoint.com/ios/ios_actions_and_outlets.htm 【目标】类似Visual Studio | MFC的Class Wizard生成UI元素和代码中对象的映射,以及点击一个button就自动生成相应的响应函数的代码一样,我们希望在XCode中也有类似的功能。【做
2015-06-26 16:29:57 3982
转载 [XCode] Frame Rectangle 和 Alignment Rectangle 的区别
参考:http://stackoverflow.com/questions/28152533/difference-between-frame-rectangle-and-alignment-rectangle如上图,XCode中编辑界面元素,“Size Inspector”中的 View -> Show 可以有两种选择:Frame Rectangle 和 Alignm
2015-06-26 14:25:46 6725
原创 [XCode] XCode 6 中修改模拟器版本
【问题描述】在XCode 6中创建一个默认的 Single View Application 工程。按照 http://blog.csdn.net/yasi_xi/article/details/46605767 的做法,将默认的正方形面板改成“iPhone”的面板。给Main.storyboard的默认的面板加一个ImageView,满屏覆盖,然后它的“Ima
2015-06-26 10:53:04 7491
转载 [XCode] XCode 6 run app without rebuild
如果不想每次运行工程之前都rebuild整个工程,可以选择Product -> Perform Action -> Run Without Building.快捷键是:ctrl + cmd + R
2015-06-26 10:45:48 936
转载 [XCode] XCode 中设置 UI 部件的 z-order
参考:http://stackoverflow.com/questions/3378234/xcode-4-how-to-send-objects-in-nib-files-to-front-back在界面编辑器中选中要改变z-order的部件,然后 Editor -> Arrange -> Send to ...
2015-06-26 10:37:36 794
转载 [XCode] ViewController和class关联时找不到class的问题
【问题】1)XCode中创建iOS工程,在 storyboard 中创建新的 ViewController 和 class(比如名为Game的class),想让二者关联。2)选中新建的 ViewController,在 Identity Inspector 中找不到名为 Game 的 class。【原因】很可能在第2)步中,选中 ViewController
2015-06-25 14:54:20 4405 2
转载 [XCode] XCode 6给 ViewController 创建类的时候找不到 Objective C Class 选项
参考:http://stackoverflow.com/questions/26009639/xcode-6-creating-new-objective-c-class【问题】在先前的XCode4中,为一个 ViewController 创建一个Object C 的类的时候,可以通过 create new-->Objective C Class 的方式做到。但是在 XC
2015-06-23 17:19:32 5122
转载 [XCode] XCode默认storyboard是正方形的问题
参考:http://stackoverflow.com/questions/24088639/in-the-storyboard-the-width-of-the-uiviewcontroller-is-not-the-width-of-the-iphohttp://www.raywenderlich.com/83276/beginning-adaptive-layout-tutori
2015-06-23 14:53:55 2085
转载 [XCode] 怎样让XCode不要在新的窗口中打开文件
转自:http://stackoverflow.com/questions/6053800/xcode-how-to-make-it-stop-opening-extra-windows【问题】在某些XCode系统设置下,双击XCode的工程中的文件时,会在一个新的窗口中打开该文件,某些情况下,这样的新窗口会给工作带来不便。【解决】
2015-06-15 08:10:42 9974
转载 等待所有子进程结束
C语言方法一:while (pid = waitpid(-1, NULL, 0)) { if (errno == ECHILD) { break; }}C语言方法二:pid_t child_pid, wpid;int status = 0;//Father code (before child processes start)for (int id=
2015-06-03 10:27:18 5562
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人