以下方法在转换/迁移到Swift 4后抛出警告而无法正常工作。
public func calendar(_ calendar: JTCalendarManager!, prepareDayView dayView: UIView!)
public func calendar(_ calendar: JTCalendarManager!, didTouchDayView dayView: UIView!)
参见图片以供参考:
答案 0 :(得分:1)
在Swift 4中,这两种方法对dayView
参数((UIView & JTCalendarDay)!
而不是UIView!
)有不同的类型:
func calendar(_ calendar: JTCalendarManager!, prepareDayView dayView: (UIView & JTCalendarDay)!)
func calendar(_ calendar: JTCalendarManager!, didTouchDayView dayView: (UIView & JTCalendarDay)!)