Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不明白为什么会这样。如果我将应用程序拖到页面的底部并释放,它会弹起..但不是一直到顶部..
- (void)viewDidLoad { [super viewDidLoad]; [_scroller setScrollEnabled:YES]; [_scroller setContentSize:CGSizeMake(320, 750)]; }
这通常表明您的滚动视图的contentSize属性设置为小于在屏幕上显示所有内容所需的实际值。调整contentSize.y到高于 750 的值,看看这是否能解决问题。
contentSize
contentSize.y