Possible Duplicate:
Comparing Strings in Cocoa
I need to perform logic on an NSString*
variable.
If I do the following it works fine:
my_label_3.text = local_db_user.lifetime_subscription;
The label in the UI gets populated with the text, True
But the following returns NO
:
local_db_user.lifetime_subscription == @"True"
What code do I use for this pseudo code:
if local_db_user.lifetime_subscription == True
do this
else
do this other thing
My watch, during debugging, on local_db_user.lifetime_subscription
shows:
{NSString * | 0x764e210} "True"