UIView frame origin doesn't set good
        Posted  
        
            by Infinity
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Infinity
        
        
        
        Published on 2010-04-27T11:01:55Z
        Indexed on 
            2010/04/27
            11:03 UTC
        
        
        Read the original article
        Hit count: 406
        
Hi guys!
Here is my code:
    frame = _pageContentView.frame;
    NSLog(@"%f; %f; %f; %f;", frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
    frame.size.height = pageContentView.frame.size.height;
    NSLog(@"%f; %f; %f; %f;", frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
    _pageContentView.frame = frame;
    NSLog(@"%f; %f; %f; %f;", _pageContentView.frame.origin.x, _pageContentView.frame.origin.y, _pageContentView.frame.size.width, _pageContentView.frame.size.height);
And the NSLog outputs these values:
0.000000; 0.000000; 317.648956; 0.000000;
0.000000; 0.000000; 317.648956; 768.000000;
0.000007; 0.000004; 317.648956; 768.000000;  
Can you see? In the last row the x and y coordinates are a bit crazy... Where do these number come frome? What's the problem here?
© Stack Overflow or respective owner