zoukankan      html  css  js  c++  java
  • UIRefreshControl

    BOOL refreshing;// 刷新中得状态判断,只读属性,根据状态可做一些自定义的事情

    UIColor *tintColor;// 菊花以及文字的颜色

    NSAttributedString *attributedTitle // 下拉刷新文字描述,自定义
     
    - (void)beginRefreshing // 开始刷新
     
    - (void)endRefreshing // 结束刷新,在确定获得想要的加载数据之后调用
     
      //1.初始化
        UIRefreshControl *control = [[UIRefreshControl alloc] init];
        //指定给tableViewController
        self.refreshControl = control;
        //添加tagter action
        [control addTarget:self action:@selector(loadNew:) forControlEvents:UIControlEventValueChanged];
        //设置属性字符串标题
        NSAttributedString *title = [[NSAttributedString alloc] initWithString:@"下拉刷新" attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:15], NSForegroundColorAttributeName : [UIColor orangeColor]}];
        control.attributedTitle = title;
    
                //刷新UI
                [self.tableView reloadData];
    
       //刷新玩数据之后要结束刷新
       [self.refreshControl endRefreshing];
  • 相关阅读:
    Leecode刷题之旅-C语言/python-67二进制求和
    maven 聚合
    maven 继承
    maven 常用命令
    maven 术语
    maven安装
    RabbitMQ 消费消息
    RabbitMQ 生产消息并放入队列
    RabbitMQ 在 web 页面 创建 exchange, queue, routing key
    mybatis 通过实体类进行查询
  • 原文地址:https://www.cnblogs.com/10-19-92/p/4955795.html
Copyright © 2011-2022 走看看