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 03-03-2010, 10:36 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2010
Posts: 12
Default Extremely Simple UIPageControl help

I have made a scroll view with 3 pages. It's 960x460 pixels, exactly 3 pages. I made it using Interface Builder and linked it up.

Paging is working perfectly. There is a nice smooth scroll between pages.

However, I would like to get UIPageControl working as well, to show which page the user is on and give them another scrolling option. I cannot for the life of me figure out how the apple example works. They don't even have a scroll view or a UIPageControl in their nib file as far as I can tell! What kind of witchcraft is this?!

I want to hook the UIPageControl into my scrollview using interface builder if possible. It doesn't need to handle infinite pages or anything crazy like that, just the 3 I already have.

Code:
.h

@interface PagingTestViewController : UIViewController  {

	IBOutlet UIScrollView *scrollView;
	IBOutlet UIPageControl *pageControl;
}

@end



.m

- (void)viewDidLoad {
    [super viewDidLoad];
	
	[scrollView setContentSize:CGSizeMake(960, 460)];
	[scrollView setClipsToBounds:YES];
	scrollView.backgroundColor = [UIColor blackColor];
	scrollView.scrollEnabled = YES;
	scrollView.pagingEnabled = YES;
	scrollView.bounces = YES;
	scrollView.directionalLockEnabled = YES;
}
Is there an easy way this can be done?
gerakis is offline   Reply With Quote
Old 03-03-2010, 11:22 PM   #2 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 246
Default

In the PageControl example from Apple all of the PageControl code is on the App Delegate, and the Scrollview and PageControl are on the MainWindow nib.
linkmx is online now   Reply With Quote
Old 03-10-2010, 06:30 AM   #3 (permalink)
- U haz disappoint -
 
Join Date: Jan 2010
Location: Belgium
Posts: 487
Send a message via MSN to jNoxx Send a message via Skype™ to jNoxx
Default

Hmm I really need this too.
I have alot of controllers.
And I need the PageControlling on 2 views.
So, I added the PageController into them 2 views(xibs) and want to connect them, BUT, I have 1 image, from 2300x300. Which is a scrollview, how can i make it switch, if i go to the next "part" of this image, because Paging is enabled
Looking for any tight info would be awesome, because, im not figuring it out.
Love u all :P

Greetz, jNoxx
jNoxx is offline   Reply With Quote
Reply

Bookmarks

Tags
builder, interface, pagecontrol, uipagecontrol, uiscrollview

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: 264
17 members and 247 guests
ADY, Alsahir, Dani77, Desert Diva, Duncan C, F_Bryant, Grinarn, HemiMG, Herbie, jansan, linkmx, M@realobjects, macquitzon216, prchn4christ, smethorst, spiderguy84
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,228
Posts: 380,761
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

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