You could subclass UIWebView and use the following initalizers:
-(id) initWithCoder:(NSCoder *)aDecoder
{
if(self = [super initWithCoder:aDecoder])
{
for (UIView* v in self.subviews){
if ([v isKindOfClass:[UIScrollView class]]){
self.scrollview = (UIScrollView*)v;
break;
}
}
}
return self;
}
- (id) initWithFrame:(CGRect)frame{
if(self = [super initWithFrame:frame])
{
for (UIView* v in self.subviews){
if ([v isKindOfClass:[UIScrollView class]]){
self.scrollview = (UIScrollView*)v;
break;
}
}
}
return self;
}
then have a property called
@property (nonatomic, retain) UIScrollView *scrollview;
You then have access to the scrollview within the UIWebView and can check its content size to see if it is bigger than your views size