300x250 Dynamic1 UIscrollView dynamic height 스크롤뷰의 높이를 컨텐츠에 맞게 설정하는 방법! scrollview의 subview의 frame을 'CGRectUnion' 함수를 이용하여 설정할 수 있다. CGRect contentRect = CGRectZero; for (UIView *view in self.scroll.subviews) { for (UIView * content in view.subviews) { contentRect = CGRectUnion(contentRect, content.frame); } } self.scroll.contentSize = contentRect.size; 참고 : https://stackoverflow.com/questions/2944294/how-do-i-auto-size-a-uiscrollview-to-f.. 2022. 10. 14. 이전 1 다음 300x250