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];
    
        };
        
    }


  • 相关阅读:
    寒假日报day10
    寒假日报day9
    周计划06(20201026-20201101)
    周计划05(20201019-20201025)
    周总结2
    编程语言的实现模式读后感1
    软工总结
    哈夫曼编码算法
    hive表查询——排序
    假期总结4
  • 原文地址:https://www.cnblogs.com/pencilCool/p/4760365.html
Copyright © 2011-2022 走看看