import UIKit
import SkyFloatingLabelTextField
class TryViewController: UIViewController,UITableViewDelegate,UITableViewDataSource {
@IBOutlet var OutletTableViewCell: UITableView!
var arrdata = ["fghyj","dfghj","kujyhtgfd","ikujyht"]
var arrdataone = ["fghyj","dfghj","kujyhtgfd","ikujyht"]
func numberOfSections(in tableView: UITableView) -> Int {
return 2
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
switch section {
case 0:
return 4
case 1:
return 4
default:
return 0
}
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let variable = UITableViewCell()
switch indexPath.section {
case 0:
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)as! TableViewCell
cell.userinputone.placeholder = arrdata[indexPath.row]
//let userInput = cell.viewWithTag(0) as! SkyFloatingLabelTextField
// cell.userInput.placeholder = Array[indexPath.row]
// userInput.placeholder = arrdata[indexPath.row]
return cell
case 1:
let cell1 = tableView.dequeueReusableCell(withIdentifier: "cell1", for: indexPath)as! TableViewCelltwo
cell1.userinputtwo.placeholder = arrdataone[indexPath.row]
return cell1
default:
print("Default Selected")
}
return variable
}
}