self.scrollView.frame=CGRectMake(CGRectGetMinX(self.bounds),CGRectGetMaxY(self.bounds),CGRectGetWidth(self.bounds),CGRectGetHeight(self.bounds));
[self.scrollView addSubview:self.hourView];
[self.scrollView addSubview:self.gridView];
现在在网格视图中嵌入一些视图后,我得到了一些coordinates(x,y,width,height)
.现在我想用这些coordinates(x,y,width,height)
刷新我的滚动视图的框架。
由于滚动视图已经创建过一次,那么我应该怎么更新或刷新它的框架呢?
您可以按照与最初相同的方式更新它。
scrollView.frame=CGRectMake(x,y,width,height);
您可以随时调用[yourScrollView setFrame:CGRectmake(,,,)];