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


  • 相关阅读:
    解决CollectionView TableView reloadData或者reloadSections时的刷新的闪烁问题
    HTTP请求头
    Fastlane 使用笔记
    python-函数式编程
    python-高级特性
    python基础使用
    python基础-函数02
    python基础-函数01
    python基础
    Linux基础
  • 原文地址:https://www.cnblogs.com/pencilCool/p/4760365.html
Copyright © 2011-2022 走看看