我从 Zarra/Long 的 Core Animation 一书中得到了这段代码。由于以下错误,它将无法编译:“'runModalForTypes' is deprecated”
- (IBAction)setMovieLocation:(id)sender {
NSOpenPanel *openPanel;
openPanel = [NSOpenPanel openPanel];
[openPanel setCanChooseDirectories: NO];
[openPanel setAllowsMultipleSelection: NO];
[openPanel setResolvesAliases: NO];
[openPanel setCanChooseFiles: NO];
if ([openPanel runModalForTypes:nil] == NSOKButton)
{
[[qcLayer setValue:openPanel filename]
forInputKey:[@"movie_location" ;]]
}
}
有可能的解决方法吗?