4 개의 탭이있는 앱을 쓰고 있습니다. 두 번째 탭에서 나는 PLIST에 데이터를 저장하고 경로를 설정하려면이 코드를 사용하고 있습니다 : 그것은 자신의 방법에iOS : 탭 및 문서 디렉토리
//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"];
. 잘 작동합니다. 네 번째 탭
I는 동일한 코드를 삽입하지만, I는 [자기 applicationDocumentsDirectory]에 오류 얻을 :No visible @interface for 'FourthViewController' declares the selector 'applicationDocumentsDirectory'
I는 그것이있는 viewDidLoad 방법에 가지고있다.
어떤 이유에서나 다른 탭에서 작동하는 이유는 무엇입니까?
당신은 FourthViewController에서 : applicationDocumentsDirectory를 구현 했습니까? – CarlJ