core-data

fetchRequestFromTemplateWithName variables

早过忘川 提交于 2020-03-20 18:20:52
问题 I'm using Xcode 4.2.1 and trying to use a variable. I understand in xcode 4 you need to set the variable with $variable . I have in Xcode for my fetch request the variable as $currDate and my code as NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init]; [dateFormatter setDateFormat:@"YYYYMMdd"]; NSDate *currDate = [NSDate date]; NSString *currDateString = [dateFormatter stringFromDate:currDate]; NSError *error; NSFetchRequest *fetchRequest = [[[DataManager sharedInstance]

fetchRequestFromTemplateWithName variables

折月煮酒 提交于 2020-03-20 18:18:06
问题 I'm using Xcode 4.2.1 and trying to use a variable. I understand in xcode 4 you need to set the variable with $variable . I have in Xcode for my fetch request the variable as $currDate and my code as NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init]; [dateFormatter setDateFormat:@"YYYYMMdd"]; NSDate *currDate = [NSDate date]; NSString *currDateString = [dateFormatter stringFromDate:currDate]; NSError *error; NSFetchRequest *fetchRequest = [[[DataManager sharedInstance]

fetchRequestFromTemplateWithName variables

▼魔方 西西 提交于 2020-03-20 18:15:27
问题 I'm using Xcode 4.2.1 and trying to use a variable. I understand in xcode 4 you need to set the variable with $variable . I have in Xcode for my fetch request the variable as $currDate and my code as NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init]; [dateFormatter setDateFormat:@"YYYYMMdd"]; NSDate *currDate = [NSDate date]; NSString *currDateString = [dateFormatter stringFromDate:currDate]; NSError *error; NSFetchRequest *fetchRequest = [[[DataManager sharedInstance]

fetchRequestFromTemplateWithName variables

为君一笑 提交于 2020-03-20 18:12:43
问题 I'm using Xcode 4.2.1 and trying to use a variable. I understand in xcode 4 you need to set the variable with $variable . I have in Xcode for my fetch request the variable as $currDate and my code as NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init]; [dateFormatter setDateFormat:@"YYYYMMdd"]; NSDate *currDate = [NSDate date]; NSString *currDateString = [dateFormatter stringFromDate:currDate]; NSError *error; NSFetchRequest *fetchRequest = [[[DataManager sharedInstance]

fetchRequestFromTemplateWithName variables

╄→гoц情女王★ 提交于 2020-03-20 18:12:19
问题 I'm using Xcode 4.2.1 and trying to use a variable. I understand in xcode 4 you need to set the variable with $variable . I have in Xcode for my fetch request the variable as $currDate and my code as NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init]; [dateFormatter setDateFormat:@"YYYYMMdd"]; NSDate *currDate = [NSDate date]; NSString *currDateString = [dateFormatter stringFromDate:currDate]; NSError *error; NSFetchRequest *fetchRequest = [[[DataManager sharedInstance]

Core Data NSBatchDeleteRequest appears to leave objects in context

♀尐吖头ヾ 提交于 2020-03-17 06:51:26
问题 I have seen many questions regarding batch deletion in Core Data, but none seem to address my issue. I am creating an iOS 9 / Swift app using Core Data. At WWDC this year, I attended the Core Data session and saw that I could use NSBatchDeleteRequest to delete large numbers of objects directly from the persistent store. This works for me for some objects but not others, and I think it has something to do with my relationships. I have an object graph consisting of Subject and Course , where

Core Data NSBatchDeleteRequest appears to leave objects in context

故事扮演 提交于 2020-03-17 06:51:05
问题 I have seen many questions regarding batch deletion in Core Data, but none seem to address my issue. I am creating an iOS 9 / Swift app using Core Data. At WWDC this year, I attended the Core Data session and saw that I could use NSBatchDeleteRequest to delete large numbers of objects directly from the persistent store. This works for me for some objects but not others, and I think it has something to do with my relationships. I have an object graph consisting of Subject and Course , where

dynamic filters (predicate) in SwiftUI

*爱你&永不变心* 提交于 2020-03-04 18:59:16
问题 I am writing an app for iOS using SwiftUI and CoreData. I am trying to solve one problem for a few days now. How to make dynamic filters using dynamically changing predicate in SwiftUI based on user input? I have followed this tutorial to learn about dynamic filters and CoreData: https://www.hackingwithswift.com/quick-start/ios-swiftui/dynamically-filtering-fetchrequest-with-swiftui After few small changes I have the following code. ContentView.swift : import SwiftUI struct ContentView: View

dynamic filters (predicate) in SwiftUI

核能气质少年 提交于 2020-03-04 18:58:49
问题 I am writing an app for iOS using SwiftUI and CoreData. I am trying to solve one problem for a few days now. How to make dynamic filters using dynamically changing predicate in SwiftUI based on user input? I have followed this tutorial to learn about dynamic filters and CoreData: https://www.hackingwithswift.com/quick-start/ios-swiftui/dynamically-filtering-fetchrequest-with-swiftui After few small changes I have the following code. ContentView.swift : import SwiftUI struct ContentView: View

dynamic filters (predicate) in SwiftUI

对着背影说爱祢 提交于 2020-03-04 18:58:25
问题 I am writing an app for iOS using SwiftUI and CoreData. I am trying to solve one problem for a few days now. How to make dynamic filters using dynamically changing predicate in SwiftUI based on user input? I have followed this tutorial to learn about dynamic filters and CoreData: https://www.hackingwithswift.com/quick-start/ios-swiftui/dynamically-filtering-fetchrequest-with-swiftui After few small changes I have the following code. ContentView.swift : import SwiftUI struct ContentView: View