在我们开发iOS程序时,常常会遇到:property和synthesize,以前很懒没有仔细去理解,只是看了看别人写的书,觉得挺容易的(在这里我不得不说,现在很多本土出的土书,尤其是早期的2009年,写的是真乱,误人子弟),所以今天有时间,自己试验了一番,希望和大家讨论。property,..
分类:
其他好文 时间:
2014-12-21 18:09:43
阅读次数:
168
public class CallBackTools {
//接口
public interface OnListener {
void execute();
}
//声明接口
OnListener callBack;
//被调用,执行接口实现
public void callListen() {...
分类:
移动开发 时间:
2014-12-21 18:03:13
阅读次数:
156
本文以新浪微博的Oauth认证为例子进行Post请求的演示
下面直接上代码:
#import "ViewController.h"
#import "AFNetworking.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewD...
分类:
Web程序 时间:
2014-12-21 16:41:36
阅读次数:
397
服务器端代码如下: IHello接口: import java.rmi.Remote;
import java.rmi.RemoteException; public interface IHello extends Remote { /** * @return return hellowold *...
分类:
其他好文 时间:
2014-12-21 16:35:31
阅读次数:
174
1.契约 - 接口 (客户端和服务端都要认识Message)1 namespace WCFService2 {3 [ServiceContract(Namespace = "http://wintellect.com/ProcessOrder")]4 public interface...
分类:
其他好文 时间:
2014-12-21 15:10:18
阅读次数:
170
例子//类名:Car//属性:轮胎个数、时速//行为:跑#import//完整的写一个函数:函数的声明和定义(实现)//完整的写一个类:类的声明和实现1、类的声明//声明对象的属性、行为//NSObject 目的性:让Car这个类具备创建对象的能力(继承)@interface Car : NSO.....
分类:
其他好文 时间:
2014-12-21 13:54:50
阅读次数:
202
public interface QueueMBean {}假如接口名叫XMBean,那么实现名就必须一定是X,而且是大小写敏感的。public class Queue implements QueueMBean {}
分类:
编程语言 时间:
2014-12-21 12:40:45
阅读次数:
206
#import #import "ViewController.h"//window窗口#define WINDOW [[UIApplication sharedApplication]keyWindow]@interface MyNavigationViewController : UINavi....
分类:
其他好文 时间:
2014-12-21 12:40:31
阅读次数:
191
一、工厂方法模式
简单工厂模式的缺陷就是类的创建太过于依赖工厂,一旦需要进行程序扩展,就必须修改工厂类的代码
这违背了背包原则。
而工厂方法模式针对这一问题进行了改进。
public interface Sender {
public void send();
}
public interface producer {
public Sender produce();
}
...
分类:
其他好文 时间:
2014-12-21 00:44:42
阅读次数:
186
一、基本组件
1、Network
网络操作的定义,NetworkResponse performRequest(Request request)
public interface Network {
/**
* Performs the specified request.
* @param request Request to process
* @r...
分类:
移动开发 时间:
2014-12-20 23:30:38
阅读次数:
360