File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed 
ScrollingNavbarDemo/ScrollingNavbarDemo Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -238,8 +238,13 @@ - (void)updateSizingWithDelta:(CGFloat)delta
238238	//  Changing the layer's frame avoids UIWebView's glitchiness
239239	frame = self.scrollableView .frame ;
240240	frame.size .height  = self.scrollableView .superview .frame .size .height  - frame.origin .y ;
241- 	self.scrollableView .layer .frame  = frame;
242- 	self.scrollableView .frame  = frame;
241+ 
242+ 	//  if the scrolling view is a UIWebView, we need to adjust its scrollview's frame.
243+ 	if  ([self .scrollableView isKindOfClass: [UIWebView class ]]) {
244+ 		((UIWebView*)self.scrollableView ).scrollView .frame  = frame;
245+ 	} else  {
246+ 		self.scrollableView .frame  = frame;
247+ 	}
243248}
244249
245250- (void )refreshNavbar 
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ @implementation AMWebViewController
1919- (void )viewDidLoad 
2020{
2121	[self  setTitle: @" Web View"  ];
22- // 	[self.webView setBackgroundColor:[UIColor colorWithRed:0.93 green:0.93 blue:0.93 alpha:1]];
23- // 	[self.view setBackgroundColor:[UIColor colorWithRed:0.93 green:0.93 blue:0.93 alpha:1]];
22+ 	[self .webView setBackgroundColor: [UIColor colorWithRed: 0.93  green: 0.93  blue: 0.93  alpha: 1 ]];
23+ 	[self .view setBackgroundColor: [UIColor colorWithRed: 0.93  green: 0.93  blue: 0.93  alpha: 1 ]];
2424	NSMutableString * html = [@" <html><head></head><body style='background-color:#eee'>"   mutableCopy ];
2525
2626	[html appendString: @" <h1>The content</h1><p>Long content here</p><p>Some other content here</p>"  ];
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments