What I've got is a NSNumber
which is created in the AppDelegate
and holds a numberWithBool:TRUE
and a ViewController
in which a comparison should be made.
My problem is, that the ViewController
doesn't recognize that my NSNumber
is set as 1 . The debugger proves that the NSNumber
is really set as 1 but nothing is happening.
if([appDelegate.gotUrl isEqualToNumber:[NSNumber numberWithBool:TRUE]])
{
//will do nothing
}
Any solutions for my problem?
Thanks in advance
if([appDelegate.gotUrl boolValue])
{
// might do something
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.