UILocalNotification 在字典中标记为不明确

UILocalNotification marked as ambiguous in Dictionary

我错过了什么?

var notifications = [Int, UILocalNotification]()

为什么会出现这样的错误:

"Type of expression is ambiguous without more context"

如果你想要字典那么你的语法是错误的,它应该是:

var notifications = [Int : UILocalNotification]()