zoukankan      html  css  js  c++  java
  • [翻译] AAPullToRefresh

    AAPullToRefresh

    效果:

    Requirement - 需要的环境

    • ARC.
    • iOS 6 or higher(tested on iOS 6, 7 and 8).

    Install - 安装

    CocoaPods CocoaPods方式安装

    Add pod 'AAPullToRefresh' to your Podfile.

    Manually 手动安装

    1. Copy AAPullToRefresh directory to your project. 将AAPullToRefresh文件夹拷贝到你的项目当中.

    Usage - 使用

    #import "AAPullToRefresh.h"
    ...
    AAPullToRefresh *tv = [self.scrollView addPullToRefreshPosition:AAPullToRefreshPositionTop actionHandler:^(AAPullToRefresh *v){
        // do something...
        // then must call stopIndicatorAnimation method.
        [v performSelector:@selector(stopIndicatorAnimation) withObject:nil afterDelay:1.0f];
    }];
    

    Customization - 定制

    Property - 属性

    You can customize below properties.

    tv.imageIcon = [UIImage imageNamed:@"launchpad"];
    tv.borderColor = [UIColor whiteColor];
    tv.borderWidth = 3.0f;
    tv.threshold = 60.0f;
    tv.showPullToRefresh = NO; // also remove KVO observer if set to NO.
    

    Method - 方法

    - (void)manuallyTriggered;    // Manually trigger the block.
    - (void)setSize:(CGSize)size; // Zoom in/out size.
  • 相关阅读:
    CCDictionary 用调试器查看问题
    博客 小记
    cocos2d-x 调试问题
    string知识
    静动态库
    fedora 20安装vim Transaction check error
    PyQt中ui编译成窗体.py,中文乱码
    centos编译安装vim7.4
    linux c驴杂记
    c++指针 c指针 改变值
  • 原文地址:https://www.cnblogs.com/YouXianMing/p/4119897.html
Copyright © 2011-2022 走看看