Translate

2013年6月13日 星期四

Xcode 4.6.2常莫名crash

国外有人有解决办法了:
since yesterday's OSX update, every other run on the simulator is crashing on start. It appears to work fine when compiling and running on hardware.

I thought it could be useful for your to warn other developers to hold off from performing the update if they want to work on the simulator."

I've experienced the same issue, but found that switching from LLDB to GDB (on the advice of Tony Arnold from Apple's Dev Forums) seems to fix the problem for the moment.

Update your scheme by selecting Product > Scheme > Edit Scheme, and choose the GDB debugger for your debug scheme.

简单的说,就是把Scheme里的LLDB换成GDB,就解决这个问题了!

2013年6月10日 星期一

如何用NSLog输出NSRange,CGRect等结构体

參考link

使用对应的转换
NSStringFromCGPoint
NSStringFromCGSize
NSStringFromCGRect
NSStringFromCGAffineTransform
NSStringFromUIEdgeInsets
比如

NSLog(@"rect1: %@", NSStringFromCGRect(rect1));

2013年6月4日 星期二

Xcode files ARC setting

To see which files override the ARC setting:

Select your project in the navigator. This will open the project editor.
In the project editor, select your target.
In the project editor, click Build Phases (not Build Settings).
Expand the Compile Sources build phase.
Here, you can see the compiler flags for each file. Files with that set whether or not to use ARC will include either -fno-objc-arc or -fobjc-arc, for specifying MRR or ARC respectively.

How to know Xcode project is using ARC?

Select your target, then Build Settings. Look for Objective-C Automatic Reference Counting in the Apple LLVM Compiler - Language section.