ios - A container view and scroll view present an representation which is offset -


I have a UIScrollView app that contains all UI elements containing a container that is prepared on a UIScrollView UIImage and some UILabels prepared on it. One of the elements in an embedded UIViewController is

I, however, are having a problem with the presentation in the Container UIScrollView as UIImage, which is considered to fill the whole scrolling material, but once the top is offset it is upset, But it also throws my calculation of points (the image should fill the full rounder border.

here Enter image details

I set the size of the container view (using constrains) to the UIViewController ViewDi Set in dLoad (and results, box, expected):

  [Self FloorplancontainerwidthConstraint] .constant = [self view] .frame.size.width - self.marginWidthConstraint.constant * 2; If ([delegate isiPad]) {[self-floor portal-controller-right consultant] .centent = 300;} [_floorPlanContainer layoutIfNeeded];  

Then in the Container's UIViewController, on ViewWillDisplay, I have the UIImageView dimensions Update which is contained in the edges of the scrollview with '0':

  [super viewWillAppear: animated]; [Self imageContainerHeightConstraint] .constant = [self-parentView] .frame.size.height [self imageContainerWidthConstraint] .constant = [self parentView] .frame.size.width [_imageView lay outIfNeeded]; [_Scroll View Layout IFNeeded]; NSLog (@ "Parents frame:% F,% F, location% F,% F", [self guardian view] .frame.size.width, [see self guardian] .frame.size.height, [self guardian View]. Frame Orig.x, [see self guardian] .frame.origin.y); NSLog (@ "Image frame:% f,% f, position% f,% f", _imageView.frame.size.width, _imageView.frame.size.height, _imageView.frame.origin.x, _imageView.frame.origin .y); NSLog (@ "scroll frame:% f,% f, position% f,% f", _scrollView.frame.size.width, _scrollView.frame.size.height, _scrollView.frame.origin.x, _scrollView.frame.origin .y); NSLog (@ "Content Frame:% f,% f, position% f,% f", _scrollView.contentSize.width, _scrollView.contentSize.height, _scrollView.contentOffset.x, _scrollView.contentOffset.y); NSLog (@ "scroll frame zoom% F", [_scrollView zoomcache]);  

Console output is expected (I think):

  Original frame: 351.000000, 200.000000, location 12.000000, 41.000000 Image Frame: 351.000000, 200.000000, location 0.000000, 0.000000 Scroll frame: 351.000000, 200.000000, Placement 0.000000, 0.000000 Content Frame: 351.000000, 200.000000, Placement 0.000000, 0.000000 Scroll Frame Zoom 1.000000  

It shows that the content is in the frame itself As a shape scroll view and image, how is it that the content is a bit bigger (the time has been seen) while the price is equal to Do not Thn? While I can scroll the vertical image, it should fit exactly (horizontally it fits).

If I reduce the container view on the layout then it is better, so there is something wrong I have spent in a few hours trying to understand what is wrong, but not him Finding, so any suggestions are really appreciated!

Try setting self.edgesForExtendedLayout = UIRectEdgeNone .


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -