iphone - Proper way to convert BOOL value into INT? -
everytime when tried convert bool value int. int value showing -8 true , 0 false. ideally should return 1 true.
i have tried possible ways of conversion like
int val=info.isattachementdownloadable; int val=[[nsstring stringwithformat:@"%d", info.isattachementdownloadable] intvalue]; int val=(int)info.isattachementdownloadable; where info.isattachementdownloadable return bool
in ways showing -8 true.
any suggestion ?
maybe help(thought don't know why may needed in first place)
nsinteger = @(yes).integervalue; hope helps you.
Comments
Post a Comment