0
votes

i have an uiview with a uiscrollview and an uiimageview like background of uiview. In viewDidLoad to have scroll i use this:

CGSize scrollViewSize = [self.view sizeThatFits:CGSizeZero];
scrollViewSize.height = 700.0;
scroll.contentSize = scrollViewSize;

The problem is that background image will not fill the entire scrollview but only the dimension of screen. What can i do? i load this uiview in this way:

MyViewController *contr = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil];
[self presentModalViewController:contr animated:YES];

In InterfaceBuilder uiimageview have mode scaletoFill. Help me pls!

1

1 Answers

0
votes

Just get a reference to you imageView with an IBOutlet and then adjust its size as you adjust the scroll content size.