objective-c - iOS中如何通过getter和setter方法设置tableview的属性
天蓬老师
天蓬老师 2017-04-17 17:32:07
0
1
200
var tableView: UITableView {
        get {
            return 
        }
        set {
            tableView.dataSource = self
        }
    }

我想要直接通过self.view.addSubview(tableView)添加到父视图中

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
Peter_Zhu

1. Add a tableview attribute to the controller;
2. Lazy load the tableview attribute, set the initial attributes and set the proxy;
3. Add the tableview to the controller's view.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!