iphone - Not able to compare range.length to an integer -


I am developing an app on iPhone

I use a NSRange object in my code I am here.

If (range.length == 0) {something}

When I print the value of the range.lumber on the console, it writes 0. This means that my condition condition is valid. But it does not ever enter the loop to do something.

Any clue what I am doing wrong?

Thanks AJ

NSRanguage is a defined structure that: / P>

  Type-Apex structure _NSRange {NSUIN location; Length of NSUINTER; } NSRange;  

If (myRange.length == 0) is not true, then the length of your range is not the comparison is correct, your Find out more about the problem using Debugger to see what's really going on and when.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -