zoukankan      html  css  js  c++  java
  • v2ex 下拉刷新 SCRootViewController

    SCRootViewController

    - (void)loadView {
        [super loadView];
        
        self.tableView                 = [[UITableView alloc] initWithFrame:self.view.frame];
        self.tableView.separatorStyle  = UITableViewCellSeparatorStyleSingleLine;
        self.tableView.delegate        = self;
        self.tableView.dataSource      = self;
        [self.view addSubview:self.tableView];
    
    }
    typedef NS_ENUM(NSInteger, UITableViewCellSeparatorStyle) {
        UITableViewCellSeparatorStyleNone,
        UITableViewCellSeparatorStyleSingleLine,
        UITableViewCellSeparatorStyleSingleLineEtched   // This separator style is only supported for grouped style table views currently
    };

    - (void)viewDidLoad
    {
        [super viewDidLoad];
        
        self.title = @"SCPullRefresh";
        
        __weak typeof(SCRootViewController) *weakSelf = self;
        
        self.refreshBlock = ^{
            
            __strong typeof(SCRootViewController) *strongSelf = weakSelf;
            
            [strongSelf performSelector:@selector(endRefresh) withObject:strongSelf afterDelay:2.0];
            
        };
        
        self.loadMoreBlock = ^{
            
            __strong typeof(SCRootViewController) *strongSelf = weakSelf;
            
            [strongSelf performSelector:@selector(endLoadMore) withObject:strongSelf afterDelay:2.0];
    
        };
        
    }


  • 相关阅读:
    函数的返回值以及局部,全局变量
    函数的参数
    文件操作 函数
    数据类型一些基本操作方法
    设置精度的方法
    字符串和编码问题
    python中一些函数应用
    初步认识类
    P1613 跑路
    P2383 狗哥玩木棒
  • 原文地址:https://www.cnblogs.com/pencilCool/p/4760365.html
Copyright © 2011-2022 走看看