码迷,mamicode.com
首页 >  
搜索关键字:pch nslog    ( 1866个结果
iOS开发 - 解决百度地图模拟器无法定位问题
在模拟器上使用百度地图定位的时候, 经常报这样的错误:/** *定位失败后,会调用此函数 *@param error 错误号 */ - (void)didFailToLocateUserWithError:(NSError *)error { NSLog(@"%@", error); //Error Domain=kCLErrorDomain Code=0 "The operation cou...
分类:移动开发   时间:2014-10-30 13:32:44    阅读次数:259
关于Precompile Prefix Header
在Xcode项目属性->Build Settings中,属性Precompile Prefix Header用于标识是否使用预编译头文件,Prefix header用于标识pch文件。Prefix.pch文件内容如下例示:#ifdef __OBJC__#import #import #endif其中...
分类:其他好文   时间:2014-10-29 21:24:18    阅读次数:254
iOS 打印 UI结构
NSLog(@"------------%@",[[UIApplication sharedApplication].keyWindow performSelector:@selector(recursiveDescription)]);由于recursiveDescription是Apple的私有...
分类:移动开发   时间:2014-10-29 19:15:52    阅读次数:117
IOS中利用宏将RGB值转换为UIColor(转)
可以在pch文件中定义宏,这样整个项目就都可以用了!1 #define UIColorFromRGBValue(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((r...
分类:移动开发   时间:2014-10-29 18:41:25    阅读次数:142
debug输出rect,size和point的宏
#define NSLogRect(rect) NSLog(@"%s x:%.4f, y:%.4f, w:%.4f, h:%.4f", #rect, rect.origin.x, rect.origin.y, rect.size.width, rect.size.height) #define NSLogSize(size) NSLog(@"%s w:%.4f, h:%.4f", #size, s...
分类:其他好文   时间:2014-10-29 17:09:34    阅读次数:171
Xcode6关于Pch文件
在Xcode6之前新建项目,系统会帮我们自动新建一个以工程名为名字的pch (precompile header)文件,在Supporting FIles文件下会看到一个以 -Prefix.pch结尾文件的文件,pch全称是“precompiled header”,也就是预编译头文件,该文件里存放的...
分类:其他好文   时间:2014-10-27 00:26:24    阅读次数:182
Prefix.pch文件-判断iOS系统版本
ItcastWeibo-Prefix.pch//// Prefix header//// The contents of this file are implicitly included at the beginning of every source file.//#import #ifndef...
分类:移动开发   时间:2014-10-26 18:16:00    阅读次数:287
XCode6 生成prefix.pch文件
XCode6里, 新建工程默认是没有pch文件的,苹果取消pch文件这一点肯定有它的道理,刚开始很多人可能不适应,如果我们想使用pch文件,需要手动添加,添加步骤如下:(依旧直接上图)      @ 取消的原因:      Stackoverflow上有一个人对此的解释是这样的:       I suspect because of modules, which remove the need f...
分类:其他好文   时间:2014-10-24 20:46:41    阅读次数:459
OC的HelloWorld程序详解
1 #import 2 3 int main(int argc, const char * argv[]) 4 { 5 @autoreleasepool { 6 NSLog(@"Hello world!"); 7 } 8 9 ...
分类:其他好文   时间:2014-10-24 20:19:45    阅读次数:142
OC中的多态
代码1: #import?<Foundation/Foundation.h> @interface?Animal?:?NSObject -?(void)eat; @end @implementation?Animal -?(void)eat { ????NSLog(@"Animal-eat"); } @end @interface?Dog?:?Ani...
分类:其他好文   时间:2014-10-24 00:29:57    阅读次数:168
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!