2011-05-12 53 views

回答

6

如何imageView.center = scrollView.center

1

什麼周圍的東西線...

int size = 20; 

UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)]; 

UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake((scrollView.center.x - (size/2)), (scrollView.center.y - (size/2)), size, size)]; 

[scrollView addSubview:imageView];