Friday, 15 March 2013

ios - UIWebView not zooming in iOS8 -



ios - UIWebView not zooming in iOS8 -

i want zooming in out in webview.i newer in ios.please help me.some 1 default property of webview.i testing in ios8 . not work me.

self.mywebview= [[uiwebview alloc] init]; [self.mywebview setscalespagetofit:yes]; [self.mywebview setdelegate:self]; [self.mywebview.scrollview setdelegate:self]; [self.mywebview setdatadetectortypes:uidatadetectortypenone]; [self.mywebview.scrollview setbounces:no]; [self.mywebview.scrollview setshowshorizontalscrollindicator:no]; [self.mywebview.scrollview setshowsverticalscrollindicator:no]; [myscrollview addsubview:self.mywebview]; - (void)webviewdidfinishload:(uiwebview *)thewebview { self.mywebview.scrollview.delegate = self; self.mywebview.scrollview.maximumzoomscale = 20; // set want. self.mywebview.scrollview.minimumzoomscale = 1; // set want. } (void)scrollviewdidendzooming:(uiscrollview *)scrollview withview:(uiview *)view atscale:(cgfloat)scale { self.mywebview.scrollview.maximumzoomscale = 20; }

if u not utilize viewforzoominginscrollview work automatically. if utilize viewforzoominginscrollview - (uiview *)viewforzoominginscrollview:(uiscrollview *)scrollview { if (scrollview ==mywebview.scrollview){ homecoming self.mywebview; } else { homecoming nil; } }

ios

No comments:

Post a Comment