I placed UILabel in the cell of UITableView, connected to IBOutlet and built, but an error occurred. This is an error. "The vcMenuLabel outlet from the ViewController to the UILabel is invalid. Outlets cannot be connected to repeating content. [12]" I don't know the solution, can you tell me? Xcode12.2
import UIKit
class ViewController: UIViewController, FSCalendarDelegate, FSCalendarDataSource, FSCalendarDelegateAppearance, UITableViewDataSource, UITableViewDelegate {
@IBOutlet weak var noteTableView: UITableView!
@IBOutlet weak var vcMenuLabel: UILabel!
var vcMenuValue : String?
override func viewDidLoad() {
super.viewDidLoad()
vcMenuLabel.text = vcMenuValue
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
let vcMenuLabel = UILabel(frame: CGRect(x: 0, y: 0, width: view.frame.size.width, height: 30))
return cell
}