系统下拉刷新

 UIRefreshControl* refreshControl =  [[UIRefreshControl alloc] initWithFrame:CGRectMake(0, 0, 5, 5)];
    refreshControl.tintColor = [UIColor whiteColor];
    [refreshControl addTarget:self action:@selector(refresh:) forControlEvents:UIControlEventValueChanged];
    [self.tableView addSubview:refreshControl];
    self.refreshControl= refreshControl;

系统的下拉刷新,样式太丑!想要如下效果,使用activityIndicatorView配合MJRefresh实现

    __weak typeof(self) weakSelf = self;
    self.tableView.headRefreshBlock = ^{
        [weakSelf loadMemberData];
    };
    self.activityIndicatorView=[[UIActivityIndicatorView alloc]initWithFrame:CGRectMake(0,0,20,20)];
    self.activityIndicatorView.centerX =self.view.centerX;
    [self.activityIndicatorView setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhite];
    [self.headView addSubview:self.activityIndicatorView];

21533956901_.pic.jpg

WechatIMG2.jpeg
WechatIMG2.jpeg

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 180,099评论 25 708
  • 最近在研究下拉刷新的一些问题,先给大家介绍下系统的下拉刷新。。如果问题望指点出来。。 1、UIRefreshCon...
    MrBrave丶彬彬阅读 608评论 3 5
  • 科技的进步,淘汰掉大批的人。互联网的发达,薰养出这许多持续混吃等死的人。或许,只是混吃,连“等死”的念头都没有。 ...
    铭玥咏全阅读 250评论 3 1
  • 今天下午我回到家,我先吃了个煎饼。开始写作业,我们语文作业是一课一练一个接一个写完,数学作业是比较大小写完,我的语...
    文文_cee1阅读 593评论 0 0
  • 一、 之前我在某旅游网站注册了VIP,想要在过年期间能够带爸妈去泰国玩,后来网站的小哥联系的我,详细的解答我的各种...
    麦粒飞阅读 471评论 0 1

友情链接更多精彩内容