[英]how to change size of scrollView in iPad
我正在使用相同的UIScrollView在DetailViewController中顯示不同的圖像,並且我想更改不同圖像的UIScrollView大小,該怎么做。
只需像其他任何視圖一樣更改大小即可:
myScrollView.frame = CGRectMake(newX, newY, newWidth, newHeight);
請參考下面的代碼。
//left Area Extension
scrollView.contentInset = UIEdgeInsetsMake(0.0f, scrollView.frame.size.width*2, 0.0f, 0.0f);
//right Area Extension
scrollView.contentSize = CGSizeMake(scrollView.frame.size.width*2, scrollView.frame.size.height);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.