修改MJRefreshFooterView.m文件中的这个方法

#pragma mark - 状态相关
#pragma mark 设置状态
- (void)setState:(MJRefreshState)state
{
if (_state == state) return;
MJRefreshState oldState = _state;
[super setState:state]; switch (state){ case MJRefreshStatePulling:{
_statusLabel.text = MJRefreshFooterReleaseToRefresh; [UIView animateWithDuration:MJRefreshAnimationDuration animations:^{
_arrowImage.transform = CGAffineTransformIdentity;
UIEdgeInsets inset = _scrollView.contentInset;
inset.bottom = _scrollViewInitInset.bottom;
_scrollView.contentInset = inset;
}];
break;
} case MJRefreshStateNormal:{
_statusLabel.text = MJRefreshFooterPullToRefresh; // 刚刷新完毕
CGFloat animDuration = MJRefreshAnimationDuration;
CGFloat deltaH = [self contentBreakView];
CGPoint tempOffset; int currentCount = [self totalDataCountInScrollView];
if (MJRefreshStateRefreshing == oldState && deltaH > && currentCount != _lastRefreshCount) { tempOffset = _scrollView.contentOffset;
if (_appDelegate.isA) {//A视图:隐藏FooterView
tempOffset.y -= 60;
}else if(!_appDelegate.isA){//B视图:上拉之后显示后面的新数据
tempOffset.y += 60;
}
animDuration = ;
} [UIView animateWithDuration:animDuration animations:^{
_arrowImage.transform = CGAffineTransformMakeRotation(M_PI);
UIEdgeInsets inset = _scrollView.contentInset;
inset.bottom = _scrollViewInitInset.bottom;
_scrollView.contentInset = inset;
}]; if (animDuration == ) {
_scrollView.contentOffset = tempOffset;
}
break;
} case MJRefreshStateRefreshing:{
// 记录刷新前的数量
_lastRefreshCount = [self totalDataCountInScrollView]; _statusLabel.text = MJRefreshFooterRefreshing;
_arrowImage.transform = CGAffineTransformMakeRotation(M_PI);
[UIView animateWithDuration:MJRefreshAnimationDuration animations:^{
UIEdgeInsets inset = _scrollView.contentInset;
CGFloat bottom = MJRefreshViewHeight + _scrollViewInitInset.bottom;
CGFloat deltaH = [self contentBreakView];
if (deltaH < ) { // 如果内容高度小于view的高度
bottom -= deltaH;
}
inset.bottom = bottom;
_scrollView.contentInset = inset;
}];
break;
} default:
break;
}
}

MJ刷新控件MJRefreshFooterView上拉之后收不回来的解决办法的更多相关文章

  1. bootstrop 日期控件 datepicker被弹出框dialog覆盖的解决办法

    筒子们在使用bootstrap的日期控件(datepicker , 现在官网提供的名称叫 datetimepicker)时可能会遇到如上图的问题这是啥原因造成的呢? 答案很简单时输出的优先级造成的(z ...

  2. phpcmsV9中表单向导在js调用里日期控件在IE下报Calendar未定义的解决办法

    最近在phpcmsV9里用表单向导弄个的提交表单,但用了日期和时间类型时,用   <script language='javascript' src='{APP_PATH}index.php?m ...

  3. 点击ViewGroup时其子控件也变成pressed状态的原因分析及解决办法

    这个问题,当初在分析touch事件处理的时候按理应该分析到的,可是由于我当时觉得这块代码和touch的主题不是那么紧密, 就这么忽略掉了,直到后来在这上面遇到了问题.其实这个现象做Android开发的 ...

  4. 【C#】在窗体中水平居中的控件,到了XP下不居中的解决办法

    我时不时会遭遇这个操蛋问题,今天得闲研究了一下,解决如下: A.将窗体FormBorderStyle属性改为Fixed系,当然这会导致用户不能拖拉窗口大小,所以你可能需要B计划↓ B.确保在[VS]中 ...

  5. Qt qml listview 列表视图控件(下拉刷新、上拉分页、滚动轴)

    Qt qml listview下拉刷新和上拉分页主要根据contentY来判断.但要加上顶部下拉指示器.滚动条,并封装成可简单调用的组件,着实花了我不少精力:) [先看效果]    [功能] 下拉刷新 ...

  6. 上拉加载下拉刷新控件WaterRefreshLoadMoreView

    上拉加载下拉刷新控件WaterRefreshLoadMoreView 效果: 源码: // // SRSlimeView // @author SR // Modified by JunHan on ...

  7. android官方下拉刷新控件SwipeRefreshLayout的使用

    可能开发安卓的人大多数都用过很多下拉刷新的开源组件,但是今天用了官方v4支持包的SwipeRefreshLayout觉得效果也蛮不错的,特拿出来分享. 简介:SwipeRefreshLayout组件只 ...

  8. 下拉刷新控件(1)PullToRefreshList示例

    有很多控件都可以下拉刷新如,ListView,ExpandableListView,GridView,ScrollView,ViewPager,WebView等, 其中最常见的是ListView.本文 ...

  9. Android PullToRefresh下拉刷新控件的简单使用

    PullToRefresh这个开源库早就听说了,不过一直没用过.作为一个经典的的开源库,我觉得还是有必要认识一下. 打开github上的网址:https://github.com/chrisbanes ...

随机推荐

  1. nodejs以及npm的安装

    参考资料:http://xiaoyaojones.blog.163.com/blog/static/28370125201351501113581/ 上面的仁兄说的比较清楚,基本解决了安装中遇到的问题 ...

  2. Swift 实现Bitmask Option(Enum)

    在Swift中实现ObjC中的NS_OPTION不是通过enum,而是通过conform RawOptionSetType protocol的struct来实现的. 代码如下: struct Test ...

  3. STM32 使用 printf 发送数据配置方法 -- 串口 UART, JTAG SWO, JLINK RTT

    STM32串口通信中使用printf发送数据配置方法(开发环境 Keil RVMDK) http://home.eeworld.com.cn/my/space-uid-338727-blogid-47 ...

  4. UML精粹学习 - 订单类结构图

    Order Class Diagram of Martin Fowler's UML Distilled

  5. hihocoder #1179 : 永恒游戏 暴力

    #1179 : 永恒游戏 Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://hihocoder.com/problemset/problem/11 ...

  6. 【JavaScript】对比12 款优秀的JavaScript MVC/MVVC框架 你最喜欢Backbone or Ember

    http://codebrief.com/2012/01/the-top-10-javascript-mvc-frameworks-reviewed/ 目前基本所以后台程序都是面向对象MVC模式开发, ...

  7. iOS NSData

    NSData全部API学习. 学习NSData,在网上找资料竟然都是拷贝的纯代码,没人去解释.在这种网上没资料的情况下,整理这个API文件好难,好艰辛.在这贡献给大家了,么么哒~示例程序用红色标注. ...

  8. iOS开发——UI篇Swift篇&UIScrollView

    UIScrollView //返回按钮事件 @IBAction func backButtonClick() { self.navigationController?.popViewControlle ...

  9. Media Queries详细

    @media only screen and (max-device-width: 480px) { //页面最大宽度480px } <link rel="stylesheet&quo ...

  10. vm内核参数优化设置

     http://www.cnblogs.com/wjoyxt/archive/2014/06/08/3777042.html (1)vm.overcommit_memory 执行grep -i com ...