cocoa touch - iPhone ScrollView zoom problems -


i'm new iphone dev , obj-c , have several problems scrollview/imageview while getting close deadline. used ib create interface access parameters via builder.

1) using touch events (begin/moved/ended) on imageview switch images. when put imageview scrollview old gestures stopped working , can zoom. if scrollview of both have focus can't use gestures when zoomed out. how can use both?

2) how zoom image part of view? unfortunately see background area around :/ what's worse - after rotating view keeps it's old dimensions , have more black areas around image. reason image in top-left corner.

code snippets found doesn't me in case. have various images of different sizes in imageview switch , zoom in/out.


edit: ok, little different. how override scrollview touch mode when image zoomed out (to screen size) "normal" gestures work. currenly have either scroll view scrolling or gestures, can't use both. anyone?

solved dynamically changing imageview imagesize , switching like:

- (void)scrollviewdidendzooming:(uiscrollview *)scrollview withview:(uiview *)view atscale:(float)scale {     if (scrollview.zoomscale==1.0) {     scrollview.userinteractionenabled = no;     imageview.userinteractionenabled = yes; } 

not best solution works enough.


Comments

Popular posts from this blog

400 Bad Request on Apache/PHP AddHandler wrapper -

Add email recipient to all new Trac tickets -

php - Change action and image src url's with jQuery -