objective c - Disabling scrolling when image is zoomed -


i have image inside uiscrollview. want happen if zoomed in particular position, want disable scrolling (both vertical , horizontal) remain on zoomed area. can give me ideas on how this?

two things keep in mind:

  1. make sure want when need disable scroll. (you can use methods uiscrollviewdelegate accomplish that).
  2. make contentsize of uiscrollview same size of frame. way both horizontal , vertical scroll disable.

cgrect myscrollviewrect = myscrollview.frame; cgsize myscrollviewframesize = cgsizemake(myscrollviewrect.frame.size.width, myscrollviewrect.frame.size.height); myscrollview.contentsize = myscrollviewframesize; 

for clarity putted more code need to.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -