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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.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 10-27-2009, 12:09 AM   #1 (permalink)
Registered Member
 
iphonig's Avatar
 
Join Date: Sep 2009
Location: United States
Posts: 73
Default Zooming question

Hello everyone,
In my app I have a scroll view because I am displaying a lot of text as well as pictures... the problem I am having is that one of the pictures I have is too big for the view and shows up very "smushed" together no matter how big I make it. I was wondering if anyone knew how to make it so I can pinch and zoom into that picture and ONLY that picture. I know you need a scroll view to zoom pictures in but is it possible to have a scroll view within a scroll view? BTW I am using Interface Builder for all of this.
Here is the code
Code:
- (void)viewDidLoad {
	
	mainScroller.contentSize = CGSizeMake(320,800);
	//[mainScroller setUserInteractionEnabled:YES]; This is what it is set to in IB
	[[self mainScroller] setAutoresizesSubviews:YES];
	//[[self mainScroller] setMaximumZoomScale:3.0f]; this is what it is set to in IB
	//[[self mainScroller] setMinimumZoomScale:1.00f]; This is what it is set to in IB
	[[self mainScroller] setDelegate:self];
	[scrollView addSubview:mainScroller];
}
-(UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView{
    return mainScroller;
}
Any help would be greatly appreciated!
Thanks!
~iPhonig

Last edited by iphonig; 10-27-2009 at 11:57 PM.
iphonig is offline   Reply With Quote
Reply

Bookmarks

Tags
picture, scroll, view, zoom

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: 259
24 members and 235 guests
@sandris, ADY, Dani77, diyora, FAED, fredidf, F_Bryant, GHuebner, HDshot, iDifferent, JasonR, mer10, Oral B, prchn4christ, Rudy, smithdale87, Speed, spiderguy84, stekki, tgjorgoski, Thompson22, Touchmint, twerner, vigu360
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,880
Threads: 89,228
Posts: 380,753
Top Poster: BrianSlick (7,129)
Welcome to our newest member, @sandris
Powered by vBadvanced CMPS v3.1.0

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