scrollview xcode4.5 autolayout

2019-01-20 06:04发布

问题:

-(void)viewDidLoad {

[scroller setScrollerEnabled:YES]; [scroller setContentSize:CGSizeMake(100, 1000)];

[super viewDidLoad];

work 100% before check auto layout when i check auto layout and add a imagesView,button and more the scroll is dosen't work any more, if I remove autolayout is work good again

回答1:

To my understanding "autolayout" set constraint after loading the view so the problem could be that you set your constrains on viewDidLoad and just after that "autolayout" changes that. Try to set this constrains on viewDidAppear.



标签: xcode ios6