Good, but UIWebViewhas no property zoomScale, UIScrollViewdoes! Therefore, we just scan it subView'sfor scrollVieweverything sits and gets it that way.
Here is a small (1 method) category that will allow you to get scale by calling [webView zoomScale].
File UIWebView + zoom.h
@interface UIWebView (zoom)
-(float)zoomScale;
@end
File UIWebView + zoom.m
@implementation UIWebView (zoom)
-(float)zoomScale{
UIScrollView *webViewContentView;
for (UIView *checkView in [self subviews] ) {
if ([checkView isKindOfClass:[UIScrollView class]]) {
webViewContentView = (UIScrollView*)checkView;
break;
}
}
return webViewContentView.zoomScale;
}
@end
UIScrollView Class Reference
UIWebView ( , webView, Apple iOS)
. , , .