Skip to content

Instantly share code, notes, and snippets.

@InstaRobot
Created May 31, 2016 08:44
Show Gist options
  • Save InstaRobot/5f4d66c442789fa1cd1e3c0c9ab6b00d to your computer and use it in GitHub Desktop.
Save InstaRobot/5f4d66c442789fa1cd1e3c0c9ab6b00d to your computer and use it in GitHub Desktop.
// Интерфейсное объявление класса
- (NSURL *)applicationDocumentsDirectory;
// конец интерфейса
//=======================================
// Раздел реализации класса
- (NSURL *)applicationDocumentsDirectory {
// Директория приложения используется для хранения фалов КореДата. Этот код использует директорию приложения "название приложения” в директории документов в бандле приложения.
return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
}
// конец реализации
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment