Lloyd18
Lloyd18

Reputation: 1682

Strange behavior of CGPoint

I have CGPoint in interface section of my class

@interface MyClass ()
{
    CGPoint point;
}

In code I tried to set value to it

point = CGPointMake(1, 3);

but result is (0,1)

another example:

CGPoint qwe = CGPointMake(10, 20);
point = qwe;

result: qwe(10,20), point(0,10)

The same problem with ALL variables that declare in interface (CGFloat, NSNumber..)

WTF?

Upvotes: 0

Views: 270

Answers (1)

calimarkus
calimarkus

Reputation: 9977

Did you log them to the console using NSStringFromCGPoint(point);? If not, try it. Probalby you oversee something. A simple assignment of a CGPoint won't fail regardsless of beeing a local variable or an instance variable.

Upvotes: 1

Related Questions