import UIKit
class oneeViewController: UIViewController,UITableViewDataSource,UITableViewDelegate {
var tabv = UITableView()
override func viewDidLoad() {
super.viewDidLoad()
self.navigationController?.navigationBar.barTintColor = UIColor .white
self.view.backgroundColor = UIColor .white
tabv = UITableView(frame: self.view.frame, style: UITableView.Style.grouped)
tabv.delegate = self
tabv.dataSource = self
self.view.addSubview(tabv)
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section == 0 {
return 2
}else if section == 1{
return 3
}else{
return 4
}
}
func numberOfSections(in tableView: UITableView) -> Int {
return 3
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cellID = "cell"
var cell = tableView.dequeueReusableCell(withIdentifier: cellID)
if cell == nil{
cell = UITableViewCell.init(style: UITableViewCell.CellStyle.value1, reuseIdentifier: cellID)
}
if indexPath.section == 0{
if indexPath.row == 0{