personal func buildPredicateForMonths(monthFilter:Int16) -> NSPredicate? {
// monthsFilter isn't zero as each tour has a month
let monthFilter32 : UInt32 = UInt32(monthFilter)
print("monthFilter32: (monthFilter32)")
let predicate:NSPredicate = NSPredicate(format: "(months & %i) != 0", [monthFilter32])
print("predicate: (predicate.description)")
return predicate
}
the output from that is:
monthFilter32: 4095
predicate: months & -2119600160 != 0
I would really like the predicate to be
predicate: months & 4095 != 0
I’m considering this can be a results of %i however can not discover documentation on what I want right here?
Thanks