我所拥有的是 a NSNumber
,它是在 中创建的,AppDelegate
并且持有 anumberWithBool:TRUE
和 a ViewController
,应该在其中进行比较。
我的问题是,ViewController
不承认 myNSNumber
设置为1。调试器证明NSNumber
确实设置为1但没有发生任何事情。
if([appDelegate.gotUrl isEqualToNumber:[NSNumber numberWithBool:TRUE]])
{
//will do nothing
}
我的问题有什么解决方案吗?
提前致谢