“Swift ScrollView Automotion Fit Content Altura” Respostas de código

Swift ScrollView Automotion Fit Content Altura

CGRect contentRect = CGRectZero;

for (UIView *view in self.scrollView.subviews) {
    contentRect = CGRectUnion(contentRect, view.frame);
}
self.scrollView.contentSize = contentRect.size;
Thankful Turkey

Swift ScrollView Automotion Fit Content Altura

let contentRect: CGRect = scrollView.subviews.reduce(into: .zero) { rect, view in
    rect = rect.union(view.frame)
}
scrollView.contentSize = contentRect.size
Thankful Turkey

Respostas semelhantes a “Swift ScrollView Automotion Fit Content Altura”

Perguntas semelhantes a “Swift ScrollView Automotion Fit Content Altura”

Mais respostas relacionadas para “Swift ScrollView Automotion Fit Content Altura” em Swift

Procure respostas de código populares por idioma

Procurar outros idiomas de código