Вот мой AppDelegate.swift
:
import Cocoa
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
var window: NSWindow!
func applicationDidFinishLaunching(_ aNotification: Notification) {
let timer = Timer(fire: Date(), interval: 60, repeats: true, block: { timer in
print("timer")
})
RunLoop.current.add(timer, forMode: .RunLoop.Modes.default)
}
}
В этой строке RunLoop
в конце отображается ошибка (особенно в части .RunLoop.Modes.default
):
Тип выражения неоднозначен без контекста.
Есть идеи, что мне здесь не хватает?