Programmatically UITableView using swift

前端 未结 4 1614
广开言路
广开言路 2020-12-30 00:59

I\'m trying to create a simple tableView programmatically using swift, so I wrote this code on \"AppDelegate.swift\" :

    func application(application: UIA         


        
4条回答
  •  庸人自扰
    2020-12-30 01:48

    Instead of

    init(style: UITableViewStyle) {
        super.init(style: style)
    }
    

    you might find this handy:

    convenience init() {
        self.init(style: .Plain)
        title = "Plain Table"
    }
    

    Then, you can just call TableViewController() to initialize.

提交回复
热议问题