Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 03-07-2010, 05:32 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 83
djp_phillips is on a distinguished road
Default UIScrollView zooming

Hi all, I have a slight problem, I have a scrollview with zooming enabled, but when I zoom, I can pan a much larger distance to the right and bottom then I should do, Here is my scrollViewDidEndZooming delegate method, I am updating the contentsize to allow panning, but it seems that this isn't the correct way to do it:

Code:
- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale {
scrollView.contentSize = CGSizeMake(320 *scale, 1500 *scale);
}
So when I zoom at any scale above 1, i can pann at least 200 pixels more then I should be allowed to see on the right.

If I log the result of 320 *scale with scale of 2.0, I do get 640, but on screen, it's almost 1000 pixels

Last edited by djp_phillips; 03-07-2010 at 07:46 PM.
djp_phillips is offline   Reply With Quote
Old 03-09-2010, 07:44 AM   #2 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 83
djp_phillips is on a distinguished road
Default

Has no one ever had this problem ?
djp_phillips is offline   Reply With Quote
Old 04-19-2010, 05:30 PM   #3 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 1
agilpwc is on a distinguished road
Default

I was just having this same exact problem. The error I had was that I was returning the scrollview in -
(UIView *)viewForZoomingInScrollViewUIScrollView *)scrollView

instead of the view inside the scrollview. (In my case this was an imageview). Once I started returning the imageview the problem went away. By the way I didn't implement scrollViewDidEndZooming:
agilpwc is offline   Reply With Quote
Reply

Bookmarks

Tags
scrollview, zoom, zooming

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 352
10 members and 342 guests
2Apps1Day, akacaj, c2matrix, esoteric, givensur, HemiMG, mjnafjke, Pudding, SLIC, Techgirl-52
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,650
Threads: 94,115
Posts: 402,887
Top Poster: BrianSlick (7,990)
Welcome to our newest member, soohyun
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:11 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0