object-c
文章平均质量分 78
a564941464
这个作者很懒,什么都没留下…
展开
-
object-c 中@synthesize的用处
In your class implementation, you can use the @synthesize compiler directive to ask the compiler to generate the methods according to the specification in the declaration:@synthesize flag;...原创 2011-11-06 14:07:30 · 162 阅读 · 0 评论 -
【object-c基础】Object-c基础之一:#import,NSLog(),数据类型
(1)在object-c中,用#import来代替C语言中的#include;在一般的头文件中都会用#import<Foundation/Foundation.h>;Foundation框架是一个处理用户界面之下的层中的特性,Foundation为cocoa框架的子集,cocoa框架还包括Application Kit框架。(2)NSLog...原创 2011-11-10 09:05:47 · 69 阅读 · 0 评论 -
Object-c 字符串处理及建立(包含一些数组的使用等)
1//创建字符串对象数组NSArray *array = [str componentsSeparatedByString:@"@"];//就是以@为标示输出看看啦int count=[array count];int i;for(i=0;i<count;i=i+4){printf("%i: %s\n",i,[[array objectAtIn...原创 2011-11-10 09:11:16 · 131 阅读 · 0 评论 -
object-c 的异常构造,并抛出
@try { NSException *exception = [NSException exceptionWithName: @"HotTeaException" reason: @"The tea is too hot" ...原创 2011-11-10 19:17:29 · 225 阅读 · 0 评论 -
NSObject.h
/* NSObject.h Copyright (c) 1994-2009, Apple Inc. All rights reserved.*/#import <Foundation/NSObjCRuntime.h>#import <Foundation/NSZone.h>@class NSInvocation, NSMethodSignatur...原创 2011-11-10 19:35:39 · 107 阅读 · 0 评论