문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top