objective-c - oc获取DocumentDirectory目录报错expected identifier
ringa_lee
ringa_lee 2017-05-02 09:20:19
0
2
611

获取DocumentDirectory目录报错为什么会报错expected identifier

ringa_lee
ringa_lee

ringa_lee

reply all (2)
小葫芦

Because your grammar is wrong.

NSArray *docs = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);

or

NSString *path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES) objectAtIndex:0];
    漂亮男人

    NSSearchPathForDirectoriesInDomains is a C function, not a method of a certain OC class, so the outermost square brackets are not needed.

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!