//
// MJRefreshBaseView.h
// MJRefresh
//
// Created by mj on 13-3-4.
// Copyright (c) 2013年 itcast. All rights reserved.
#import <UIKit/UIKit.h>
/**
枚举
*/
// 控件的刷新状态
typedef enum {
MJRefreshStatePulling = 1, // 松开就可以进行刷新的状态
MJRefreshStateNormal = 2, // 普通状态
MJRefreshStateRefreshing = 3, // 正在刷新中的状态
MJRefreshStateWillRefreshing = 4
} MJRefreshState;
// 控件的类型
typedef enum {
MJRefreshViewTypeHeader = -1, // 头部控件
MJRefreshViewTypeFooter = 1 // 尾部控件
} MJRefreshViewType;
@class MJRefreshBaseView;
/**
回调的Block定义
*/
// 开始进入刷新状态就会调用
typedef void (^BeginRefreshingBlock)(MJRefreshBaseView *refreshView);
// 刷新完毕就会调用
typedef void (^EndRefreshingBlock)(MJRefreshBaseView *refreshView);
// 刷新状态变更就会调用
typedef void (^RefreshStateChangeBlock)(MJRefreshBaseView *refreshView, MJRefreshState state);
/**
代理的协议定义
*/
@protocol MJRefreshBaseViewDelegate <NSObject>
@optional
// 开始进入刷新状态就会调用
- (void)refreshViewBeginRefreshing:(MJRefreshBaseView *)refreshView;
// 刷新完毕就会调用
- (void)refreshViewEndRefreshing:(MJRefreshBaseView *)refreshView;
// 刷新状态变更就会调用
- (void)refreshView:(MJRefreshBaseView *)refreshView stateChange:(MJRefreshState)state;
@end
/**
类的声明
*/
@interface MJRefreshBaseView : UIView
{
// 父控件一开始的contentInset
UIEdgeInsets _scrollViewInitInset;
// 父控件
__weak UIScrollView *_scrollView;
// 子控件
__weak UILabel *_lastUpdateTimeLabel;
__weak UILabel *_statusLabel;
__weak UIImageView *_arrowImage;
__weak UIActivityIndicatorView *_activityView;
// 状态
MJRefreshState _state;
}
// 构造方法
- (instancetype)initWithScrollView:(UIScrollView *)scrollView;
// 设置要显示的父控件
@property (nonatomic, weak) UIScrollView *scrollView;
// 内部的控件
@property (nonatomic, weak, readonly) UILabel *lastUpdateTimeLabel;
@property (nonatomic, weak, readonly) UILabel *statusLabel;
@property (nonatomic, weak, readonly) UIImageView *arrowImage;
// Block回调
@property (nonatomic, copy) BeginRefreshingBlock beginRefreshingBlock;
@property (nonatomic, copy) RefreshStateChangeBlock refreshStateChangeBlock;
@property (nonatomic, copy) EndRefreshingBlock endStateChangeBlock;
// 代理
@property (nonatomic, weak) id<MJRefreshBaseViewDelegate> delegate;
// 是否正在刷新
@property (nonatomic, readonly, getter=isRefreshing) BOOL refreshing;
// 开始刷新
- (void)beginRefreshing;
// 结束刷新
- (void)endRefreshing;
// 不静止地结束刷新
//- (void)endRefreshingWithoutIdle;
// 结束使用、释放资源
- (void)free;
/**
交给子类去实现 和 调用
*/
- (void)setState:(MJRefreshState)state;
- (int)totalDataCountInScrollView;
@end
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
快速集成下拉刷新.zip (54个子文件)
快速集成下拉刷新
.DS_Store 6KB
快速集成下拉刷新.xcodeproj
project.xcworkspace
contents.xcworkspacedata 209B
xcuserdata
ericwang.xcuserdatad
UserInterfaceState.xcuserstate 5KB
mj.xcuserdatad
UserInterfaceState.xcuserstate 15KB
chenbo.xcuserdatad
UserInterfaceState.xcuserstate 21KB
apple.xcuserdatad
UserInterfaceState.xcuserstate 39KB
project.pbxproj 27KB
xcuserdata
ericwang.xcuserdatad
xcschemes
xcschememanagement.plist 586B
快速集成下拉刷新.xcscheme 4KB
mj.xcuserdatad
xcschemes
xcschememanagement.plist 586B
快速集成下拉刷新.xcscheme 4KB
chenbo.xcuserdatad
xcschemes
xcschememanagement.plist 586B
快速集成下拉刷新.xcscheme 4KB
apple.xcuserdatad
xcschemes
xcschememanagement.plist 586B
快速集成下拉刷新.xcscheme 4KB
xcdebugger
Breakpoints_v2.xcbkptlist 91B
快速集成下拉刷新
MJRefresh
MJRefreshConst.m 927B
MJRefresh.bundle
arrow@2x.png 3KB
MJRefresh.h 1KB
MJRefreshBaseView.h 3KB
MJRefreshHeaderView.m 5KB
.DS_Store 12KB
MJRefreshHeaderView.h 259B
MJRefreshConst.h 1012B
MJRefreshFooterView.h 270B
MJRefreshBaseView.m 10KB
MJRefreshFooterView.m 6KB
快速集成下拉刷新-Prefix.pch 344B
.DS_Store 6KB
快速集成下拉刷新-Info.plist 1KB
Images.xcassets
AppIcon.appiconset
Contents.json 333B
NavBar.imageset
Contents.json 243B
NavBar@2x.png 4KB
LaunchImage.launchimage
Contents.json 442B
NavBar64.imageset
Contents.json 245B
NavBar64@2x.png 3KB
en.lproj
InfoPlist.strings 45B
Classes
Other
main.m 346B
MJAppDelegate.h 286B
MJAppDelegate.m 3KB
Model
MJSampleIndex.h 412B
MJSampleIndex.m 437B
Controller
MJNavigationController.h 247B
MJSampleIndexViewController.h 251B
MJTableViewController.h 239B
.DS_Store 6KB
MJSampleIndexViewController.m 2KB
MJTableViewController.m 4KB
MJCollectionViewController.h 254B
MJCollectionViewController.m 4KB
MJNavigationController.m 1KB
快速集成下拉刷新Tests
快速集成下拉刷新Tests-Info.plist 689B
en.lproj
InfoPlist.strings 45B
________Tests.m 644B
共 54 条
- 1
资源评论
- qq_272111672015-05-21你这完全是copy别人的 还要我三个积分
sammyieveo
- 粉丝: 42
- 资源: 29
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功