【发布时间】:2012-05-15 20:36:27
【问题描述】:
我正在编写一个有四个标签的应用程序。在第二个选项卡中,我将数据存储在 plist 中并使用此代码设置路径:
//get the path to the documents directory (where we will store our plist)
NSString* docDirectory = [self applicationDocumentsDirectory];
//append the path to the documents diretory with our plist name
NSString* destPath = [docDirectory stringByAppendingPathComponent:@"surveyResults.plist"];
这是它自己的方法。工作正常。
在第四个选项卡中,我放置了相同的代码,但在 [self applicationDocumentsDirectory] 上出现错误:
No visible @interface for 'FourthViewController' declares the selector 'applicationDocumentsDirectory'
我在 viewDidLoad 方法中有它。
它在一个标签而不是另一个标签上工作的任何原因?
【问题讨论】:
-
您是否在您的 FourthViewController 中实现了:applicationDocumentsDirectory ?
标签: ios tabs directory document