首页 > 解决方案 > 圆形微调器不显示

问题描述

下面是在表脚视图中设置圆形微调器约束的代码。现在,只显示下半部分。我怎样才能解决这个问题 ?

https://media.giphy.com/media/xptIqtvJdkKNlRAtrD/giphy.gif

tableView.contentInsetAdjustmentBehavior = .never
        tableView.register(FriendsHeaderCell.self, forHeaderFooterViewReuseIdentifier: headerReuse)
        tableView.register(UserCell.self, forCellReuseIdentifier: cellReuse)
        tableView.translatesAutoresizingMaskIntoConstraints = false
        view.addSubview(tableView)
        tableView.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(10)
            make.left.right.bottom.equalToSuperview()
        }
        
        // loading view for friends list
        loadingIndicator = NVActivityIndicatorView(frame: .zero, type: .circleStrokeSpin, color: Constants.loadingIndictorColor)
        loadingIndicator.translatesAutoresizingMaskIntoConstraints = false
        tableView.addSubview(loadingIndicator)
        loadingIndicator.snp.makeConstraints { (make) in
            make.centerX.top.equalTo(tableView)
            make.size.equalTo(Constants.loadingIndicatorSize)
        }
    }

标签: iosuitableview

解决方案


推荐阅读