gpt4 book ai didi

xcode - 类没有初始值设定项 (Xcode 6.3)

转载 作者:行者123 更新时间:2023-11-28 09:09:27 25 4
gpt4 key购买 nike

尝试找出更新到 Xcode 6.3 后的错误。我有一个类出现错误“类没有初始化器”谁能告诉我如何解决这个问题?

class TodayViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, BWWalkthroughViewControllerDelegate {


var events: [EKEvent] = []
let eventStore = EKEventStore()
var pttCalendar: EKCalendar?

let walkthroughVC : BWWalkthroughViewController?

@IBOutlet weak var tableView: UITableView!

var dateFormatter = NSDateFormatter()

override func viewDidLoad() {
super.viewDidLoad()

requestCalendarAccess()

let firstLaunch = NSUserDefaults.standardUserDefaults().boolForKey("FirstLaunch")
if firstLaunch {
println("Not first launch.")
}
else {
showWalkthrough()
println("First launch, setting NSUserDefault.")
NSUserDefaults.standardUserDefaults().setBool(true, forKey: "FirstLaunch")
}


self.tableView.rowHeight = 50

dateFormatter.dateFormat = "EE, MMM dd"
let dateForLabel = dateFormatter.stringFromDate(NSDate())

self.title = dateForLabel
}

最佳答案

你忘记了覆盖 func init()

关于xcode - 类没有初始值设定项 (Xcode 6.3),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29755935/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com