進出口使用JTAppleCalendar
- >https://github.com/patchthecode/JTAppleCalendar日曆插件,我希望把TableView中細胞內ColectionView細胞,我想表明有添加的事件內的每個細胞與標題(的tableview細胞內),但是當我連接口讓我;TableView中的JTAppleCalendar單元格?在斯威夫特3
error: Illegal Configuration: The tableView outlet from the ViewController to the UITableView is invalid. Outlets cannot be connected to repeating content.
我該如何解決?
CellView.swift
import JTAppleCalendar
class CellView: JTAppleCell {
@IBOutlet var selectedView: UIView!
@IBOutlet var dayLabel: UILabel!
@IBOutlet var Label: UILabel!
}
Cell.Swift
import UIKit
class Cell: UITableViewCell {
@IBOutlet weak var label : UILabel!
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
}
ViewController.Swift下低於
@IBOutlet weak var tableView: UITableView!
extension ViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 5
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! Cell
cell.label?.text = String(indexPath.row)
return cell
}
func tableView(_ tableView: UITableView,didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
}
}
我的屏幕;
,如果你創建一個新的github上的問題,並上載有該問題的一小zip文件,我可以提供幫助。然後我會回到這裏來回答。 –