Hi I was succeeded in fetching data from coreData by using the below code.
class func fetchObject() -> [User]?{
let context = getContext()
var user: [User]? = nil
do{
user = try context.fetch(User.fetchRequest())
return user
}catch{
return user
}
}
Now I want to fetch a data in particular range.
For example I was saving some records with age as one column in that. Now I want to get the only 10 to 20 age persons from that coreData table. How can I achieve that. Please some one help me.Because I am new to ios.