I create UIScrollView through the IB, put it into the position by setting its own property frame into values (x = 80, y = 58, width = 240, height = 266). Then I specify it through the property contentSize (also I've tried to do that through setContentSize ) the size of the content (width = 253, height = 279). The content is bigger than the visible one in 13 horizontally and vertically. Then I draw square boxes (size 13х13) and fill only the visible area !!!. I scroll down. I watch at the variable contentOffset through NSLog in the repainting drawRect function in UIScrollView. When I shut one square box while scrolling down (size 13), for example horizontally (parameter х) then I see in the console that the contentOffset.х is equal to 7 !!! And to see contentOffset.х == 13 in console's log, it is necessary to scroll in such a way, that two square boxes will be shut (size 13, that is 26). I don't understand anything here !!! Does anyone know the trick? I draw square boxes with the help of Сore Graphics libraryAlso while repainting
Here are the screenshots with the situation described earlier:
http://img.skitch.com/20101118-xyjgy...16b2d4y8a6.png
http://img.skitch.com/20101118-pxt93...n9ibsp4pnh.png
http://img.skitch.com/20101118-psh4b...y9j7p7kdr5.png
http://img.skitch.com/20101118-e55yr...64ubqaaars.png
Here is the code that takes out the whole Debug info in Console Window:
CGPoint offSet = [self contentOffset];
CGSize contSize = [self contentSize];
CGRect frame = [self frame];
CGPoint Center = [self center];
NSLog(@"Draw Cell size x: %d y: %d", m_cellSize.cx, m_cellSize.cy);
NSLog(@"Main Cells offset x: %f y: %f", offSet.x, offSet.y);
NSLog(@"Draw rect x: %f, y: %f, width: %f, height: %f", rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);
NSLog(@" Main Frame size x: %d y: %d", (int)(frame.size.width), (int)(frame.size.height));
NSLog(@" Main content size x: %d y: %d", (int)contSize.width, (int)(contSize.height));
m_cellSize - the size of drawing cell, width dimensions 13x13.
PLEASE HELP !!!