//延展@interfaceAppDelegate(){UIView*_View;}//不是一开始定义类的时候定义的实例变量,而是后期根据需求而定义的实例变量,统一定义在.m文件中的延展中,外界不可见.@end@implementationAppDelegate-(BOOL)application:(UIApplication*)applicationdidFinishLaunchingWithOptio..
分类:
其他好文 时间:
2014-09-05 03:20:31
阅读次数:
194
@interface ViewController (){ Shape *_shape;}@end@implementation ViewController- (void)loadView{ //设置画板 self.view=[[SimpleDrawBoard alloc]ini...
分类:
其他好文 时间:
2014-09-04 22:13:40
阅读次数:
245
之前因为要使用DES加密,在网上找了好多,总于找到了,整理如下。Des.h文件//// Des.h// Copyright (c) 2014年 grant. All rights reserved.//#import #import @interface Des : NSObject//DE...
分类:
移动开发 时间:
2014-09-04 22:05:40
阅读次数:
318
@interface …@property (原子性,可写性,内存管理) id name;@end原子性: nonatomic, atomic 默认atomic可写性: readwrite, readonly 默认readwrite内存管理: assign, retain, copy 默认as...
分类:
其他好文 时间:
2014-09-04 18:32:19
阅读次数:
191
一、点语法1.OC中点语法是方便从事别的语言开发的程序员迅速的转到OC开发当中,先看下面这个例子: 1 // 声明一个Person类 2 @interface Person : NSObject 3 { 4 int _age; 5 NSString *_name; 6 } 7 - (...
分类:
其他好文 时间:
2014-09-04 18:31:09
阅读次数:
165
//// main.m// TestVar2//// Created by lishujun on 14-9-4.// Copyright (c) 2014年 lishujun. All rights reserved.//#import @interface Address : NSObj...
分类:
其他好文 时间:
2014-09-04 18:30:09
阅读次数:
212
OC语言是面向对象的语言,其三大特性必不可少。一、封装是一个很重要的概念,它避免外界直接访问或修改对象的属性,可以过滤不合理的值,让外界不必关心内部的细节。通过set方法来让外部设置成员的属性值,通过get方法来获得对象属性值。 1 #import 2 @interface Student : N....
分类:
其他好文 时间:
2014-09-04 16:26:49
阅读次数:
148
1.适配器模式适配器模式是针对接口不一时处理的情况,比如我的类的参数是IInterface1,但是我现在想要调用IInterface2接口的函数,怎么办呢?就是用适配器来解决这个问题:public interface IInterface1(){ public void method1();}...
分类:
其他好文 时间:
2014-09-04 14:37:49
阅读次数:
216
partial关键字的用法:把partial放在class, struct, interface关键字的前面,以用来把类,结构,接口放在多个文件中。 // Program 位于两个不同的源文件BigClassPart1.cs和BigClassPart2.cs// BigClassPart1.csp....
分类:
其他好文 时间:
2014-09-04 13:11:19
阅读次数:
187
MainViewController.h#import<UIKit/UIKit.h>
@interfaceMainViewController:UIViewController<UIScrollViewAccessibilityDelegate>
@endMainViewController.m#import"MainViewController.h"
@interfaceMainViewController()
@end
@implementationMainViewControll..
分类:
其他好文 时间:
2014-09-04 10:37:59
阅读次数:
218