how to zoom in and zoom out an image on clicking button in iphone -
i have image in imageview placed in scrollview., zoom in , out performed on pinches,
now, want zoom in , out on clicking buttons placed zoom in , zoom out.
how it? there option? if knows please tell me.
thanks in advance.
you can set zoom scale of scroll view programatically based on tap of button. simple implementation:
- (ibaction)zoomin:(id)sender { if(scrollview.zoomscale < scrollview.maximumzoomscale) { scrollview.zoomscale = (scrollview.zoomscale + 0.1); } } - (ibaction)zoomout:(id)sender { if(scrollview.zoomscale > scrollview.minimumzoomscale) { scrollview.zoomscale = (scrollview.zoomscale - 0.1); } }
Comments
Post a Comment