I am doing a very simple NSArray search as follows
BOOL isCashTender = [_tenderRows containsObject: @"Cash"];
A debug output of the array tells me there is an object in there "Cash" as seen below (its the second to last one)
2017-04-07 11:20:27.644551 NWMobileTill[2134:701297] tenderRowsarray:(
"<Tender: 0x17009c2a0> (entity: Tender; id: 0xd0000000002c0004 <x-coredata://BE2CD993-FDED-43CE-99A3-88597A0E8046/Tender/p11> ; data: {
amount = 10;
authCode = nil;
brandId = XX;
cardEntryMode = nil;
cardType = nil;
createdDate = "2017-04-07T11:20:22+08:00";
createdDateUtc = "2017-04-07T03:20:22";
currency = EUR;
extRefNo = "Cash-In-EUR";
hashedPan = nil;
inOrOut = IN;
isSynched = 0;
obfPan = nil;
orderNumber = "1-20170407112015";
status = 95;
synchDate = nil;
synchDateUtc = nil;
tillId = 1;
type = Cash;
userName = a;
})"
)
But when I look at the debug output of my BOOL it returns 0 when I expected it to be 1, why is that?
2017-04-07 11:20:27.644139 NWMobileTill[2134:701297] isCashTender = 0
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…