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.
-(无效)viewDidLoad {
[scroller setScrollerEnabled:YES]; [scroller setContentSize:CGSizeMake(100, 1000)];
[超级视图DidLoad];
当我检查自动布局并添加图像视图、按钮等时,在检查自动布局之前工作 100% 滚动不再起作用,如果我删除自动布局又可以正常工作
据我了解,“自动布局”在加载视图后设置约束,因此问题可能是您在 viewDidLoad 上设置了约束,并且在“自动布局”更改之后。尝试在 viewDidAppear 上设置此约束。