创建一个类需要两个部分:接口和实现-----.h 头文件 相当于接口@interface Aa: NSObject //基类{//成员变量声明//大括号内部,添加当前类属性 //字符串类型 NSString *name; //姓名 NSString是一个类 //整型类型 NSInteger...
分类:
移动开发 时间:
2014-10-14 20:28:49
阅读次数:
213
class(类)1.internal 表示类只能在当然程序集中访问,类默认修饰符2.public 表示所有地方都可以访问,与internal是互斥的3.abstract 抽象类,不能被实例化,只能继承4.sealed 密封类,不能被继承,与astract是互斥的interface(接口)1.publ...
效果图:其中图片是可以自己动的。当然,点击白色的小圆点,也是可以滑动的。上代码。.h#import @interface RootViewController : UIViewController{ UIScrollView *scoreView;}@end.m- (void)viewDidL...
分类:
其他好文 时间:
2014-10-14 19:36:59
阅读次数:
144
/**
* 声明一个抽象的解释操作
* @author stone
*
*/
public interface Interpreter {
public void interpret(Context context); //实际中,可以有个返回的类型,定义解释出的数据对象
}
public class XmlSaxInterpreter implements Interpreter...
分类:
编程语言 时间:
2014-10-14 19:23:49
阅读次数:
167
两个tableView是可以左右滑动的。两个tableView放在一个scrollerView上,可以,左右滑动。上代码。.h#import @interface RootViewController : UIViewController{ UIScrollView *_scrolView; ...
分类:
其他好文 时间:
2014-10-14 19:22:02
阅读次数:
195
module dom {
[Supplemental, NoInterfaceObject]
interface NodeSelector {
Element querySelector(in DOMString selectors);
NodeList querySelectorAll(in DOMString selectors);
};
Document implements N...
分类:
编程语言 时间:
2014-10-14 19:00:29
阅读次数:
645
类图
public interface IMediator {
public void createMediator();
public void work();
}
/**
* 中介、调节实际上需要交互的两个元素,让其松耦合
* @author stone
*
*/
public class Mediator implements IMediator {
pr...
分类:
编程语言 时间:
2014-10-14 18:44:59
阅读次数:
192
效果图:代码:.h#import #import "EGORefreshTableHeaderView.h"@interface RootViewController : UIViewController{ UITableView *_tableView; EGORefreshTable...
分类:
其他好文 时间:
2014-10-14 18:21:49
阅读次数:
136
interface Visitor {
void visit(Gladiolus g);
void visit(Chrysanthemum c);
}// concrete visitor 名称访问
class StringVisitor implements Visitor {
String s;
public String toString() {
return s;
}
...
分类:
编程语言 时间:
2014-10-14 15:48:28
阅读次数:
182
BookStoreCell.h#import @interface BookStoreCell : UITableViewCell@property (strong, nonatomic) UIImageView *bookImageView;@property (strong, nonatomic...
分类:
其他好文 时间:
2014-10-13 23:12:07
阅读次数:
238