userInfo只发送类型的数据anyObject,所以我需要将我的 Meals 数组转换为anyObject不崩溃,然后将其重新转换为[Meal],不幸的是它在这里崩溃了......
var anyOrder = NSMutableArray()
for meal in ordered { // ordered is array of meals [Meal] ...
anyOrder.addObject(meal as! AnyObject) //crashes here
}
我希望能够投射它或找到任何其他方式来使用userInfoin发送它NSNotification,在此先感谢