I have added a view in IB. I have a label in this view, its height will vary at run time based on text it is holding, Now my question is when the label size is varying it is going beyond the height of UIView, So I want to add a scroll view in this view to view full label. I have added scroll view like this…
CGRect scrollViewFrame = CGRectMake(0, 0, 320, 460);
UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:scrollViewFrame];
CGSize scrollViewContentSize = CGSizeMake(self.view.frame.size.width,
(self.view.frame.size.height + 1000));
[scrollView setContentSize:scrollViewContentSize];
[self.view addSubview:scrollView];
After this scroll view is added in my view, however my view is not moving down when I scroll down. Am I doing anything wrong here…
thanks for your helps..
try like this code..
first take
UIViewand addUILablein this your new view alike a bellow code .. like a flow..i hope this help you…
🙂