我正在使用相同的UIScrollView在DetailViewController中显示不同的图像,并且我想更改不同图像的UIScrollView大小,该怎么做。
只需像其他任何视图一样更改大小即可:
myScrollView.frame = CGRectMake(newX, newY, newWidth, newHeight);
refer a below code.
//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);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.