2016-12-17 1 views
1

autolayout을 사용하여 스크롤보기 내에서보기를 사용하고 있습니다. scrollview 제약 조건을 위쪽, 아래쪽, 앞뒤로 설정했습니다. 스크롤 뷰 내부의 뷰는 스크롤 뷰를 사용하여 위쪽, 아래쪽, 맨 앞뒤에 동일한 구석으로 설정됩니다. 그러나 뷰는 런타임에 이동합니다.스크롤보기 내부보기

스크린 샷을 첨부하고 있습니다.

In bluee color there is scroll view and in gray color it is uiview

enter image description here

답변

2

viewDidLoad() 방법에 추가하려고 :

self.automaticallyAdjustsScrollViewInsets = NO 

automaticallyAdjustsScrollViewInsets 및 기타 관련 UIScrollView 플래그에 대한 완전하고 자세한 설명이 답변을 살펴보십시오 : https://stackoverflow.com/a/19585104/1392452