在objective-c中我会这样做来更新数组控制器中对象的值。
[[[moviesListAC selectedObjects] objectAtIndex:0] setObject:[dict objectForKey:@“movieName”] forKey:@“movieName”];
其中moviesListAC是我的NSArrayController
@property(弱)IBOutlet NSArrayController * moviesListAC;
注意:此Swift代码不起作用:
moviesListAC.selectedObjects()[0] [“movieName”] =(dict [“movieName”]为?String)