core data - SWIFT: How do I create a predicate with an Int value? -
i hope no 1 tells me rtfm because have been struggling time here , on apple developer , doing lots of searching.
i getting exc-bad-access error on statement:
var thispredicate = nspredicate(format: "(sectionnumber == %@"), thissection)
thissection has int value of 1 , displays value 1 when hover on it. in debug area see this:
thispredicate = (_contiguousarraystorage ...)
another predicate using string shows objectivec.nsobject why happening?
you might try string interpolation swift standard library reference. this:
let thissection = 1 let thispredicate = nspredicate(format: "sectionnumber == \(thissection)")
Comments
Post a Comment