- 博客(10)
- 资源 (37)
- 收藏
- 关注
原创 【深入浅出Objective-C】8.1字符串String
#import int main(int argc, const char * argv[]) { @autoreleasepool { //1.NSString常用方法(格式化,拼接,转byte,转char) //initWithString,initWithFormat,stringWithString //ini
2014-01-31 20:41:49 1065
转载 C语言Printf格式
转载自互联网: http://www.360doc.com/content/09/0816/21/26398_4969316.shtml C语言Printf格式 C中格式字符串的一般形式为: %[标志][输出最小宽度][.精度][长度]类型, 其中方括号[]中的项为可选项。各项的意义介绍如下: 1.类型类型字符用以表示输出数据的类型,其格式符和意义下表所示: 表示输出类
2014-01-31 19:27:49 1309
原创 【深入浅出Objective-C】6.5语句
#import int main(int argc, const char * argv[]) { @autoreleasepool { //if,else if,for,goto,while,do while,switch int i = 1;//非0为true goto here;//goto直接
2014-01-31 12:41:38 845
原创 【深入浅出Objective-C】5.3日志描述
1.使用NSLog的打印结果更详细 2.NSLog原理详解 3.对象description重写 #import #import "asl.h" #import "Person.h" #define PR(...) printf(__VA_ARGS__) #define PSQR(x) printf(" the square of " #x " is %d.\n",(x)*(x)) in
2014-01-29 15:13:54 1380
原创 【深入浅出Objective-C】7.2单例和深拷贝
1.单例: #import @interface MySingletonClass : NSObject @end #import "MySingletonClass.h" @implementation MySingletonClass static MySingletonClass *shareSingletonObj = nil; +(MySingletonClass *)s
2014-01-29 09:46:03 1101
原创 【深入浅出Objective-C】4.6协议(Protocols)和代理(Delegation)
1.为MoXieSword类添加协议,这里的协议可以理解为JAVA中的接口(interface) #import "Sword.h" @protocol MoXieUser;//添加协议 @interface MoXieSword : Sword{//继承 id _delegate;//代理对象的变量 } @property (nonatomic, assign) id d
2014-01-25 16:42:09 1181
原创 【深入浅出Objective-C】4.5分类(category)
category可以理解为类的扩展 在 http://blog.csdn.net/coooliang/article/details/18768317 中我们使用了如下代码来判断对象是否可以受到攻击,如果对NSObject类进行扩展的话就不需要进行此判断。 //攻击对象判定 if([(NSObject *)hitTarget respondsToSelector:@selector
2014-01-25 15:46:36 942
原创 【深入浅出Objective-C】4.4类的继承和重写
继承自4.3的Weapon类 #import "Weapon.h" #import //继承 @interface Sword : Weapon{ //子类新增的属性 NSColor *_colorBody;//剑身颜色 NSString *_materialBody;//剑身材质 NSColor *_colorSheath;//剑鞘颜色
2014-01-25 15:27:26 1364
原创 【深入浅出Objective-C】4.3类的创建
例子来自于钱成的《深入浅出Objective-C》,我手抄里面的代码,正在学习中。 /*! @file Werpon.h @brief 武器类的头文件 @author Copyright (c) chenliang 2014 @date 2014-1-21 */ #import //四个宏定义武器的默认值 #define DEFAULT_WEAPON_NAME @"" #de
2014-01-21 22:39:21 986
原创 责任链模式(JAVA设计模式)
这是一个CMM短彩信发送功能中用到的责任链设计模式。 public abstract class PushHandle { //下一次运行内容 private PushHandle nextHandle; public PushHandle(PushHandle nextHandle){ this.nextHandle = nextHandle; } public b
2014-01-07 17:26:24 934
G共享之J2EE初级阶段
2013-06-07
G共享之JAVASE阶段
2013-06-07
strutsSpringHibernateJar
2013-04-23
GZIP windows xp下使用
2011-12-04
javaMail1.4.4
2011-09-13
xtree1.1和例子
2011-07-28
G共享之Oracle阶段
2011-01-07
keyboard-click.aiff
2021-07-21
j2objc ios demo
2018-02-27
java sdk 1.6 for mac
2017-08-14
Adblock Plus (chrome for Mac)
2015-07-24
javapns.jar
2014-06-29
ASIHttpRequest下载
2014-03-02
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人