#import "ViewController.h"@interface ViewController ()-(IBAction)move:(UIButton *)btn;-(IBAction)big;-(IBAction)small;-(IBAction)leftRotata;-(IBAction...
分类:
其他好文 时间:
2015-03-14 12:21:41
阅读次数:
92
面向对象的设计,服用的重点其实应该是抽象层的复用,而不是具体某一个代码块的复用。
说到了抽象,就不得不提到Java接口和Java抽象类了,这也是我这里想要谈论的重点。
Java接口和抽象类代表的就是抽象类型,就是我们需要提出的抽象层的具体表现。OOP面向对象编程,如果要提高程序的复用率,增加程序的可维护性,可扩展性,就必须是面向接口编程,面向抽象编程,正确地使用接口,抽象类这些有用的抽象类型作...
分类:
编程语言 时间:
2015-03-14 11:06:12
阅读次数:
126
超类即父类,通过 [super setName: @"a"] 可以调用超类方法复合是指一个对象由其他多个对象组成对象初始化@interface Car : NSObject( Engine *engine;)@end@implementation Car- (id) init{ if(self .....
分类:
其他好文 时间:
2015-03-14 06:08:03
阅读次数:
116
意图:为其他对象提供一种代理以控制对这个对象的访问 结构 或者 .静态代理 举个简单的例子,首先定义一个Ihello接口 代码 ihello.java public interface Ihello { public void hello(String name); } 然后让实现业务逻辑的Hell...
分类:
其他好文 时间:
2015-03-13 23:46:37
阅读次数:
159
2015.3.13//应用程序分类://ios本地应用程序: 利用iphone软件开发包(SDK)开发的本地应用程序//web应用程序: 在web中显现的应用程序//开发环境及工具//1. xcode :编辑及调试代码文本//2. interface builder: 可视化UI接口创建工具//3....
分类:
移动开发 时间:
2015-03-13 22:16:29
阅读次数:
261
在配置hadoop2.6 ?,hive1.2的时候,会报一个错误。 Terminal initialization failed; falling back to unsupported java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was ex...
分类:
其他好文 时间:
2015-03-13 19:12:57
阅读次数:
545
@Retention(value=RUNTIME)@Target(value=TYPE)public @interface XmlType将类或枚举类型映射到 XML 模式类型。用法@XmlType注释可以与以下程序元素一起使用:顶层类枚举类型有关其他公共信息,请参阅 javax.xml.bind....
分类:
其他好文 时间:
2015-03-13 18:18:07
阅读次数:
172
我的方法是这样的 声明一个接口,让Activity实现它,然后在Fragment中判断Activity是否实现它,调用Activity方法 ? 具体: 接口声明: public?interface?ChatBackListener?{
?void?logout();
} 在Activit...
分类:
其他好文 时间:
2015-03-13 16:51:15
阅读次数:
164
iOS 中KVC、KVO、NSNotification、delegate 总结及区别
1、KVC,即是指 NSKeyValueCoding,一个非正式的Protocol,提供一种机制来间接访问对象的属性。而不是通过调用Setter、Getter方法访问。KVO 就是基于 KVC 实现的关键技术之一。
Demo:
@interface myPerson : NSObject
{
NSString*_name;
int _age; ...
分类:
移动开发 时间:
2015-03-13 16:41:59
阅读次数:
74011
Initializing View Instances Created in Interface BuilderView instances that are created in Interface Builder don't callinitWithFrame:when their nib fi...
分类:
其他好文 时间:
2015-03-13 16:12:14
阅读次数:
132