1

I got a suggestion here on SO to write this line:

NSArray *files = @[url];

However my Xcode/gcc is outdated as I'm still using OSX 10.6.

How do I rewrite this line so that it will compile?

4

1 回答 1

1

If you need to use the old style Objective-C syntax you would write:

NSArray *files = [NSArray arrayWithObjects:url, nil];

or just:

NSArray *files = [NSArray arrayWithObject:url];

Look at the documentation for NSArray.

于 2015-12-05T19:10:59.060 回答