In iOS, objRect
is a CGRect
object. The code runs fine with
if (objRect.origin.x > 0) {
// do something
}
but under it, the line
NSLog(@"%@", objRect);
will cause bad memory access (EXC_BAD_ACCESS
) and the program will stop. Why is that? Can the object be printed out otherwise?