contentsize

Content size issue for UITableView in UIscrollView

走远了吗. 提交于 2019-11-29 03:42:00
问题 I actually create a UIScrollView with a UITableView inside it with interface builder. I set the content size of my UIScrollView with: scrollView.contentSize = CGSizeMake(self.view.frame.size.width, self.view.frame.size.height); and I set my file's owner view to the UIScrollView I created an IBOutlet UITableView and I set it in the interface builder. When the view is loaded. it displays the correct content size for my UIScrollView . But it doesn't display the correct content size for my

UIScrollView not scrolling regardless of large contentSize

你离开我真会死。 提交于 2019-11-28 07:43:41
I have created a UIScrollView and added subviews to it in Interface Builder, but I am not able to get it to scroll. I have looked at other similar questions, but I have set my contentSize appropriately. In fact, I have even tried setting incredibly large contentSize and it fails to make a difference. What am I missing? Note that the UIScrollView is an IBOutlet: @property (strong, nonatomic) IBOutlet UIScrollView *scroll; This is in my viewDidLoad: self.scroll.scrollEnabled = YES; [self.scroll setContentSize: CGSizeMake(2400,8000)]; Here are screenshots from Interface Builder: Here is the view

UIScrollView adjusts contentOffset when contentSize changes

旧城冷巷雨未停 提交于 2019-11-28 03:49:20
I am adjusting a detail view controller's state, just before it is pushed on a navigationController : [self.detailViewController detailsForObject:someObject]; [self.navigationController pushViewController:self.detailViewController animated:YES]; In the DetailViewController a scrollView resides. Which content I resize based on the passed object: - (void)detailsForObject:(id)someObject { // set some textView's content here self.contentView.frame = <rect with new calculated size>; self.scrollView.contentSize = self.contentView.frame.size; self.scrollView.contentOffset = CGPointZero; } Now, this

UIScrollView not scrolling regardless of large contentSize

梦想的初衷 提交于 2019-11-27 05:46:09
问题 I have created a UIScrollView and added subviews to it in Interface Builder, but I am not able to get it to scroll. I have looked at other similar questions, but I have set my contentSize appropriately. In fact, I have even tried setting incredibly large contentSize and it fails to make a difference. What am I missing? Note that the UIScrollView is an IBOutlet: @property (strong, nonatomic) IBOutlet UIScrollView *scroll; This is in my viewDidLoad: self.scroll.scrollEnabled = YES; [self.scroll

UIScrollView adjusts contentOffset when contentSize changes

喜你入骨 提交于 2019-11-27 00:10:41
问题 I am adjusting a detail view controller's state, just before it is pushed on a navigationController : [self.detailViewController detailsForObject:someObject]; [self.navigationController pushViewController:self.detailViewController animated:YES]; In the DetailViewController a scrollView resides. Which content I resize based on the passed object: - (void)detailsForObject:(id)someObject { // set some textView's content here self.contentView.frame = <rect with new calculated size>; self