scrollview xcode4.5 autolayout

2019-01-20 06:23发布

-(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

标签: xcode ios6
1条回答
男人必须洒脱
2楼-- · 2019-01-20 07:01

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.

查看更多
登录 后发表回答