1

I have created a tabBar application, it has two tabs one tableView with detail items and another simple UIView with a UILabel. I added scrollView to detailViewController and put all UI items under scrollView to get scrolling. I connected the scrollView using outlet to my detail view and set the following in detailViewController

[scrollView setScrollEnabled:YES];
    scrollView.contentSize = CGSizeMake(scrollView.frame.size.width,scrollView.frame.size.height);

However detail view is not scrolling, its screen is locked. why?

Dinesh Raja
  • 8,501
  • 5
  • 42
  • 81
user1130906
  • 101
  • 4
  • 16

1 Answers1

0

For a UIScrollView, you want the frame to be the size you want it to appear on the screen, and the content size to be the size it will be able to scroll through. So, for scrolling to work properly, you must have the content size set to larger than the view's size in one dimension or the other.

pfleiner
  • 92
  • 4
  • Yes, I have already taken care of the size dimensions. Scroll views size is larger than other items, it didn't get to work. It seems the screen is locked horizontally and vertically no movement is happening when I move on the screen. – user1130906 Dec 27 '12 at 03:21
  • did you get any resolution for the above issue – shantan kumar Nov 05 '19 at 08:07