类的扩展一 类目(类目也称为分类,为没有源码的类添加方法。)1.作用1)可以扩展别人的类,可以作为子类的替代方法。2)把同一类的代码放到多个文件中。2.形式1)文件名:目标类+类目名.h目标类+类目名.m2).h文件中@interface 需要扩展的类的类名(分类名)-( )method;@ende...
分类:
其他好文 时间:
2014-07-30 14:41:33
阅读次数:
226
Interface与继承不同,interface为一个类指明的是what it does而不是what it isJava中的多重继承多用implement多个interface代替(逻辑上来讲,一个is a很多的类的类通常用can do很多interface来表达会更合理)interface起名通...
分类:
编程语言 时间:
2014-07-30 05:35:23
阅读次数:
343
NSUserDefaults API中英文文档简介及使用
Overview
The NSUserDefaults class provides a programmatic interface for interacting with the defaults system. The defaults system allows an application to customize its behavior to match a user’s preferences. For example, y...
TreeView节点拖拉操作1 //事先设置 TreeView1.DragMode= dmAutomatic; unitUnit1; interface uses Windows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms, ...
分类:
其他好文 时间:
2014-07-29 21:38:52
阅读次数:
245
ListView往TreView里面拖拽 unitUnit1; interface uses Windows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms, Dialogs,ComCtrls; type TForm1=class...
分类:
其他好文 时间:
2014-07-29 21:38:12
阅读次数:
241
一,单纯的set get,.h文件@interface Person : NSObject{ NSString *_name;}-(void)setName:(NSString *)name;-(NSString *)getName;@end.m文件-(void)setName:(NSStri...
分类:
其他好文 时间:
2014-07-29 21:35:42
阅读次数:
253
unitUnit1; interface uses Windows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms, Dialogs,ComCtrls,StdCtrls; type TForm1=class(TForm) List...
分类:
其他好文 时间:
2014-07-29 21:27:32
阅读次数:
320
现在做的App,因为考虑到安全性,所以用到了AES加密,以及配对安卓使用的AES加密。.h文件#import #import #import #define AES_KEY @"cx@hy!*&y.)x#[;>"#define AES_IV @"0102030405060708"@interface...
分类:
移动开发 时间:
2014-07-29 21:01:52
阅读次数:
608
遍历目录及子目录 unitUnit1; interface uses Windows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms, Dialogs,StdCtrls; type TForm1=class(TForm) Memo...
分类:
其他好文 时间:
2014-07-29 20:41:22
阅读次数:
365
unit untCpuInfo;interface{ 获取 CPU 制造商 }function GetCpuFactory: String;{ 获取 CPU 家族系统 }function GetCpuFamily: Cardinal;{ 获取 CPU 型号 }function GetCpuModel...
分类:
其他好文 时间:
2014-07-29 20:40:52
阅读次数:
375