I have a scrollview and its initialize as this ;
scrollV = [[UIScrollView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
Later in the application i add a UIView, and i need the UIView to take the height and width of the scrollView. (Since a scrollView can very in its length i can’t hard code the value)
So i tried this ;
justAnotherView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.scrollV.frame.size.width, self.scrollV.frame.size.height)];
But, it isn’t taking the size of the scrollview (the total size of the scrollview). It only shows part of the screen (width 320 and height 460). Is this because of the scrollV initialization statement i wrote above ? How can i correct this ?
You may want to use the
contentSizeproperty of the UIScrollView instead.