// 代码地址: https://github.com/CoderMJLee/MJRefresh
// 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000
// MJRefreshComponent.h
// MJRefreshExample
//
// Created by MJ Lee on 15/3/4.
// Copyright (c) 2015年 小码哥. All rights reserved.
// 刷新控件的基类
#import <UIKit/UIKit.h>
#import "MJRefreshConst.h"
#import "UIView+MJExtension.h"
#import "UIScrollView+MJExtension.h"
/** 刷新控件的状态 */
typedef enum {
/** 普通闲置状态 */
MJRefreshStateIdle = 1,
/** 松开就可以进行刷新的状态 */
MJRefreshStatePulling,
/** 正在刷新中的状态 */
MJRefreshStateRefreshing,
/** 即将刷新的状态 */
MJRefreshStateWillRefresh,
/** 所有数据加载完毕,没有更多的数据了 */
MJRefreshStateNoMoreData
} MJRefreshState;
/** 进入刷新状态的回调 */
typedef void (^MJRefreshComponentRefreshingBlock)();
/** 刷新控件的基类 */
@interface MJRefreshComponent : UIView
{
/** 记录scrollView刚开始的inset */
UIEdgeInsets _scrollViewOriginalInset;
/** 父控件 */
__weak UIScrollView *_scrollView;
}
#pragma mark - 刷新回调
/** 正在刷新的回调 */
@property (copy, nonatomic) MJRefreshComponentRefreshingBlock refreshingBlock;
/** 设置回调对象和回调方法 */
- (void)setRefreshingTarget:(id)target refreshingAction:(SEL)action;
/** 回调对象 */
@property (weak, nonatomic) id refreshingTarget;
/** 回调方法 */
@property (assign, nonatomic) SEL refreshingAction;
/** 触发回调(交给子类去调用) */
- (void)executeRefreshingCallback;
#pragma mark - 刷新状态控制
/** 进入刷新状态 */
- (void)beginRefreshing;
/** 结束刷新状态 */
- (void)endRefreshing;
/** 是否正在刷新 */
- (BOOL)isRefreshing;
/** 刷新状态 一般交给子类内部实现 */
@property (assign, nonatomic) MJRefreshState state;
#pragma mark - 交给子类去访问
/** 记录scrollView刚开始的inset */
@property (assign, nonatomic, readonly) UIEdgeInsets scrollViewOriginalInset;
/** 父控件 */
@property (weak, nonatomic, readonly) UIScrollView *scrollView;
#pragma mark - 交给子类们去实现
/** 初始化 */
- (void)prepare;
/** 摆放子控件frame */
- (void)placeSubviews;
/** 当scrollView的contentOffset发生改变的时候调用 */
- (void)scrollViewContentOffsetDidChange:(NSDictionary *)change;
/** 当scrollView的contentSize发生改变的时候调用 */
- (void)scrollViewContentSizeDidChange:(NSDictionary *)change;
/** 当scrollView的contentInset发生改变的时候调用 */
- (void)scrollViewContentInsetDidChange:(NSDictionary *)change;
/** 当scrollView的拖拽状态发生改变的时候调用 */
- (void)scrollViewPanStateDidChange:(NSDictionary *)change;
#pragma mark - 其他
/** 拉拽的百分比(交给子类重写) */
@property (assign, nonatomic) CGFloat pullingPercent;
/** 根据拖拽比例自动切换透明度 */
@property (assign, nonatomic, getter=isAutoChangeAlpha) BOOL autoChangeAlpha;
@end
@interface UILabel(MJRefresh)
+ (instancetype)label;
@end
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Text_Mj_Custom_image_Animal_自定义中间头部旋转动画.zip (62个子文件)
Text_Mj_Custom_image_Animal_自定义中间头部旋转动画
Text_Mj_Custom_image_Animal.xcodeproj
project.xcworkspace
contents.xcworkspacedata 172B
xcuserdata
readtv.xcuserdatad
UserInterfaceState.xcuserstate 17KB
project.pbxproj 32KB
xcuserdata
readtv.xcuserdatad
xcschemes
Text_Mj_Custom_image_Animal.xcscheme 4KB
xcschememanagement.plist 589B
xcdebugger
Breakpoints_v2.xcbkptlist 803B
.DS_Store 6KB
Text_Mj_Custom_image_AnimalTests
Text_Mj_Custom_image_AnimalTests.m 936B
Info.plist 750B
Text_Mj_Custom_image_Animal
AppDelegate.h 294B
MJRefresh
UIView+MJExtension.h 690B
Custom
Footer
Back
MJRefreshBackNormalFooter.m 3KB
MJRefreshBackStateFooter.h 446B
MJRefreshBackGifFooter.m 3KB
MJRefreshBackGifFooter.h 501B
MJRefreshBackStateFooter.m 2KB
MJRefreshBackNormalFooter.h 434B
Auto
MJRefreshAutoStateFooter.h 573B
MJRefreshAutoNormalFooter.h 372B
MJRefreshAutoNormalFooter.m 2KB
MJRefreshAutoGifFooter.m 3KB
MJRefreshAutoStateFooter.m 2KB
MJRefreshAutoGifFooter.h 501B
Header
MJRefreshStateHeader.m 4KB
MJRefreshStateHeader.h 754B
MJRefreshGifHeader.h 485B
MJRefreshNormalHeader.m 3KB
MJRefreshGifHeader.m 3KB
MJRefreshNormalHeader.h 418B
UIScrollView+MJExtension.m 2KB
UIView+MJExtension.m 1KB
UIScrollView+MJExtension.h 833B
MJRefreshConst.m 2KB
MJRefresh.h 532B
MJRefresh.bundle
arrow@2x.png 1KB
UIScrollView+MJRefresh.m 2KB
Base
MJRefreshComponent.m 6KB
MJRefreshAutoFooter.h 563B
MJRefreshBackFooter.h 233B
MJRefreshAutoFooter.m 3KB
MJRefreshBackFooter.m 6KB
MJRefreshFooter.m 1KB
MJRefreshHeader.h 947B
MJRefreshComponent.h 3KB
MJRefreshFooter.h 841B
MJRefreshHeader.m 5KB
MJRefreshConst.h 2KB
.DS_Store 6KB
UIScrollView+MJRefresh.h 691B
ViewController.h 232B
Base.lproj
Main.storyboard 2KB
LaunchScreen.xib 4KB
main.m 351B
Images.xcassets
loading.imageset
Contents.json 304B
loading.png 14KB
AppIcon.appiconset
Contents.json 1KB
Info.plist 1KB
GHSMjHeaderRefresh.m 3KB
AppDelegate.m 2KB
GHSMjHeaderRefresh.h 241B
.DS_Store 6KB
ViewController.m 2KB
共 62 条
- 1
资源评论
srxboys
- 粉丝: 1
- 资源: 18
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于Python的图像阴影检测与去除源码(高分期末大作业项目).zip
- 基于C++/Qt实现的井字棋游戏
- 基于 Python 编程语言的 Web 框架Django
- Python和Flask实现的基于体检数据的城市公共健康可视分析系统源码+使用说明.zip
- 基于python实现的华为智慧工地-安全帽检测
- buck-boost_2023-12-16_12-12-13.eprj
- 后端开发关于数据库和API开发的介绍
- 机器学习和数据挖掘课程设计-米其林餐厅数据挖掘管理系统源码+使用文档说明.zip
- html html html展示我与ai的对化
- 数据结构课程设计-全国交通出行咨询模拟系统C语言实现源码.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功