开发者

viewForZoomingInScrollView not being called for zooming support

I ha开发者_StackOverflow中文版ve been making application in which i click on image and new window pops up which supports zooming and swiping of photoes..I have implemented swiping of photoes successfully but in zooming of image I am stumped..

To support zooming I referred apple's guidelines Supporting the Pinch Zoom Gestures and followed approach.. also included this line

@interface AppReviewPopUp : UIViewController<UIScrollViewDelegate>

But sadly viewForZoomingInScrollView is not being called in my class..I have implemented the whole functionality for zooming but its worthless as this function ain't get called..I am posting link of my coding if anyone is interested to have a look at coding.

Code: http://pastebin.com/uKqUafhp

Can anyone tell what is wrong with it??Any suggestion or idea will be much appreciated..Thanks..


viewForZoomingInScrollView is change in swift 3

set scroll view delegate

try this

 func viewForZooming(in scrollView: UIScrollView) -> UIView?
 {
   return imgPhoto
  }


Can you try changing a property of imageView that you are adding. Try changing the property UserInteractionEnabled of image view to YES. May be that can help , sot sure ....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜