zoukankan      html  css  js  c++  java
  • 属性初始化

    -(NSMutableArray *)banners
    {
        if (_banners ==nil) {
            self.banners = [NSMutableArray array];
        }
        return _banners;
    }
     if (_shops==nil) {
            self.shops = [NSMutableArray array];
        }
    
     if (_optionalParam ==nil) {
            self.optionalParam = [[NSMutableDictionary alloc]init];
        }
    - (UITableView *)tableView
    {
        if (nil == _tableView) {
            _tableView = [[UITableView alloc] init];
            [self.view addSubview: _tableView];
            [_tableView makeConstraints:^(MASConstraintMaker *make) {
                make.edges.equalTo(UIEdgeInsetsMake(0, 0, 0, 0));
            }];
            _tableView.delegate = self;
            _tableView.dataSource = self;
            NSString * cellReuseIdentifier = NSStringFromClass([UITableViewCell class]);
            [_tableView registerClass: NSClassFromString(cellReuseIdentifier) forCellReuseIdentifier:cellReuseIdentifier];
            _tableView.header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
                self.page = 0;
                [self updateData];
            }];
            _tableView.footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
                [self updateData];
            }];
    
        }

       

    
    
  • 相关阅读:
    安装和配置nginx
    tomcat 生产发布脚本
    nginx 静态页面访问
    redis 搭建主从
    redis 安装
    perl 操作redis
    mysql 用户除了root一般不建议本地登录
    mysql创建用户
    mysql 查看排序集
    perl 安装Cpan
  • 原文地址:https://www.cnblogs.com/fengmin/p/5501260.html
Copyright © 2011-2022 走看看