UzysAnimatedGifPullToRefresh 0.9.8

UzysAnimatedGifPullToRefresh 0.9.8

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最新发布2016年7月

Uzysjung macAir维护。



  • 作者:
  • Uzysjung

用简单的代码将动画 GIF 拉刷新功能添加到任意 scrollView 中

Screenshot

UzysAnimatedGifPullToRefresh 特性

  • 简单易用。
  • 支持 CocoaPods。
  • 仅 ARC(如果您的项目不使用 ARC,请在 Project > Build Phases Tab > Compile Sources Section 下双击文件名,在弹出的窗口中添加 -fno-objc-arc。)

信息

安装

  1. 您可以通过 CocoaPods 在您的应用中安装 UzysAnimatedGifPullToRefresh。
  2. 将文件库文件夹复制到您的项目文件夹中。

用法

导入头文件。

#import "UIScrollView+UzysAnimatedGifPullToRefresh.h"

初始化

添加 PullToRefreshActionHandler

- (void)viewDidLoad
{
    __weak typeof(self) weakSelf =self;
    [self.tableView addPullToRefreshActionHandler:^{
        typeof(self) strongSelf = weakSelf;
        [strongSelf insertRowAtTop];
    }
    ProgressImagesGifName:@"[email protected]" 
    LoadingImagesGifName:@"[email protected]" 
    ProgressScrollThreshold:60 
    LoadingImageFrameRate:30];
}

以编程方式触发拉刷新

[_tableView triggerPullToRefresh];

停止拉刷新活动动画

[_tableView stopRefreshAnimation];

选项

进度:动画 GIF,加载:动画 GIF

- (void)addPullToRefreshActionHandler:(actionHandler)handler
                ProgressImagesGifName:(NSString *)progressGifName
                 LoadingImagesGifName:(NSString *)loadingGifName
              ProgressScrollThreshold:(NSInteger)threshold;

进度:动画 GIF,加载:UIActivitiyIndicator

- (void)addPullToRefreshActionHandler:(actionHandler)handler
                ProgressImagesGifName:(NSString *)progressGifName
              ProgressScrollThreshold:(NSInteger)threshold;

进度:图像数组,加载:UIActivitiyIndicator

- (void)addPullToRefreshActionHandler:(actionHandler)handler
                       ProgressImages:(NSArray *)progressImages
              ProgressScrollThreshold:(NSInteger)threshold;

进度:图像数组,加载:图像数组

- (void)addPullToRefreshActionHandler:(actionHandler)handler
                       ProgressImages:(NSArray *)progressImages
                        LoadingImages:(NSArray *)loadingImages
                    ProgressScrollThreshold:(NSInteger)threshold
               LoadingImagesFrameRate:(NSInteger)lframe;

为横竖屏设置顶部内边距。

[self.tableView addTopInsetInPortrait:64 TopInsetInLandscape:52];
// iOS 7 LandScape Navigationbar size 52 , Portrait Navigationbar size 64  

非半透明导航控制器。

self.navigationController.navigationBar.translucent= NO; 
[self.tableView addTopInsetInPortrait:0 TopInsetInLandscape:0];

联系

许可证

致谢

此应用使用了以下第三方库:

AnimatedGIFImageSerialization

版权所有 (c) 2014 Mattt Thompson (http://mattt.me)

特此免费授予任何获得此软件及其相关文档副本(以下简称“软件”)的人士,在不受限制的情况下处理该软件的权利,包括但不限于使用、复制、修改、合并、发布、分发、再许可和/or 销售软件副本,并允许软件提供接收方据此进行上述操作,前提是遵守以下条件

上述版权声明和免责声明应包含在软件的所有副本或主要部分中。

软件按“现状”提供,不提供任何明示或暗示的保证,包括但不限于适销性、特定用途的适用性和非侵权性保证。在任何情况下,作者或版权所有者均不对任何索赔、损害或其他责任负责,不论此类责任是由于合同、侵权或其他原因引起的,也不论此类索赔、损害或其他责任是否与软件无关、源于软件或与软件有关,或与软件的使用或其他处理有关。

示例项目资源来源