私家学习空间

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

2010年12月22日

摘要: Objective-C语法快速参考作者: Cocoa China 【最热的Mac, iPhone专业开发论坛】【本文永久地址】 大部分有一点其他平台开发基础的初学者看到XCode,第一感想是磨拳擦掌,看到Interface Builder之后,第一感想是跃跃欲试,而看到Objective-C的语法,第一感想就变成就望而却步了。好吧,我是在说我自己。如果你和我一样,对苹果相关的开发:Mac OS X或是iPhone有兴趣,但是第一时间看到Objective-C就会头疼并伴有发烧症状的话,疗效比较好的快速治疗方法是阅读本文。大概花二十分钟左右,而且绝不无聊的时间,你就会对Objective-C有那 阅读全文
posted @ 2010-12-22 15:22 天下一刘 阅读(718) 评论(0) 推荐(0)

2010年12月21日

摘要: // // Tire.m // Car // // Created by liu liyu on 10-12-21. // Copyright 2010 __MyCompanyName__. All rights reserved. // #import @interface Tire: NSObject @end @implementation Tire -(NSStrin... 阅读全文
posted @ 2010-12-21 23:21 天下一刘 阅读(216) 评论(0) 推荐(0)

2010年12月20日

摘要: #import Foundation/Foundation.hThe Tire class follows; there’s not much to it except a description method:@interface Tire : NSObject@end // Tire@implementation Tire- (void) setTire: (Tire *) tire atIndex: (int) index{ if (index 0 || index 3) { NSLog (@"bad index (%d) in setTire:atIndex:", inde 阅读全文
posted @ 2010-12-20 15:29 天下一刘 阅读(238) 评论(0) 推荐(0)

摘要: 20世纪80年代就出现了Objectvie-C.千年万精油 hello Objective-C#importFoudation/Foundation.h //告诉编译器查看Fondation框架中的Foudation.h头文件。int main(int argc,const char*arg【】){ NSLog(@“hello,Object-C!”); // NSLog()接受一个字符串作为其第一个参数作为其第一个参数, 该字符串包含格式说明符 return(0); }//main.m----object-C .c-----c编译器 .cpp-----C++ .m代表message所有这 阅读全文
posted @ 2010-12-20 12:00 天下一刘 阅读(298) 评论(0) 推荐(0)