After loading the htmlString contentSize scrollView in the UIWebView does not change. In my other form, the controllers are all good, but now it's something mysterious.
I have
UIWebView *contentWebView;
I do this in some method
- (void)makeContent { ... contentWebView = [[UIWebView alloc] initWithFrame:CGRectMake(5, imageView.originY + imageView.height + 5, mainView.width - 10, 100)]; contentWebView.delegate = self; contentWebView.scrollView.scrollEnabled = NO; contentWebView.contentMode = UIViewContentModeScaleAspectFit; NSLog(@"%@", factDict[@"text"]); [contentWebView loadHTMLString:factDict[@"text"] baseURL:nil]; contentWebView.height = contentWebView.scrollView.contentSize.height; [mainView addSubview:contentWebView]; } - (void)webViewDidFinishLoad:(UIWebView *)webView { NSLog(@"%f %f %f %f ", webView.height, webView.scrollView.contentSize.height, contentWebView.height, contentWebView.scrollView.contentSize.height); [webView sizeToFit]; NSLog(@"%f %f %f %f ", webView.height, webView.scrollView.contentSize.height, contentWebView.height, contentWebView.scrollView.contentSize.height); ... }
At the beginning of other controllers contentWebView.height = contentWebView.scrollView.contentSize.height; help me but now it doesn't work
In the magazine I have the following

So I donβt understand why contentize.height is not changed
EDIT
In my other viewcontrollers all is good
- (void)makeScrollView { CGFloat width = [Utils widthOfMainViewForOrientation:self.interfaceOrientation]; [mainView removeFromSuperview]; mainView = [[UIView alloc] initWithFrame:CGRectMake((self.view.width - width) / 2, 15, width, 100)]; mainView.backgroundColor = [UIColor whiteColor]; if ([self.fullInfoDictionary[@"content"] length]) { contentWebView = [[UIWebView alloc] initWithFrame:CGRectMake(6, 4, mainView.width - 12, 100)]; contentWebView.contentMode = UIViewContentModeScaleAspectFit; contentWebView.delegate = self; HelperDf.htmlString = self.fullInfoDictionary[@"content"]; [contentWebView loadHTMLString:self.fullInfoDictionary[@"content"] baseURL:nil]; contentWebView.scrollView.scrollEnabled = NO; [mainView addSubview:contentWebView]; } [self.scrollView addSubview:mainView]; } - (void)webViewDidFinishLoad:(UIWebView *)webView { contentWebView.height = contentWebView.scrollView.contentSize.height; NSLog(@"%f %f %f %f", webView.height, webView.scrollView.contentSize.height, contentWebView.height, contentWebView.scrollView.contentSize.height); [self reloadFrames]; }
I have the following

I get htmlString from this controller
HelperDf.htmlString = self.fullInfoDictionary[@"content"];
And install in my first UIWebVIew, but the results are NO.
You can do this regardless of whether I contentWebView.scrollView.scrollEnabled = NO; , I turn to YES, but the results are the same - in the second case, everything is fine in the first - NO