This is the Demo related with my current research named Viable Upload Acceleration Service.
The details will soon be posted here with my published paper.
This is the Demo related with my current research named Viable Upload Acceleration Service.
The details will soon be posted here with my published paper.
对目前SDK中的翻页效果真的不是很满意,今天偶然见看见了这个信息,一个叫做PaperStack的小组写了这个库,全部由CoreGraphic和ES实现,根据网站上的介绍来看真的是不错!
目前不再进行版本替换了,如果可能的话看看明年是不是将其植入我的APP
Project Introduction : http://api.mutado.com/mobile/paperstack/
Git: https://github.com/lomanf/PaperStack
在ObjectiveC中,所有的回调都是通过Delegate实现的,例子如下:
/// Header File @interface MyClass : NSObject { id delegate; } - (void)setDelegate:(id)delegate; - (void)doSomething; @end @interface NSObject(MyDelegateMethods) - (void)myClassWillDoSomething:(MyClass *)myClass; - (void)myClassDidDoSomething:(MyClass *)myClass; @end /// Message (.m) File @implementation MyClass - (void)setDelegate:(id)aDelegate { delegate = aDelegate; /// Not retained } - (void)doSomething { [delegate myClassWillDoSomething:self]; /* DO SOMETHING */ [delegate myClassDidDoSomething:self]; } @end
并且,实际上更加标准的写法应该是用协议的概念来实现,具体的方法是在需要回调函数来处理的类中增加一个Protocol,在这个Protocol中定义回调的方法,同时在类的成员中增加一个Protocol类型变量作为委托的对象。
激发委托的时候,通过调用类的Protocol成员的回调方法来实现。具体的写法举例在这里省略。
EvoLve theme by Theme4Press • Powered by WordPress 网络APP实验室 | NET APP LAB
专注APP虚拟化及云计算
yan.pu@me.com