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 12-22-2010, 05:38 PM   #1 (permalink)
MBC
Registered Member
 
Join Date: Dec 2010
Location: Plano, TX
Posts: 1
MBC is on a distinguished road
Question Alter PageControl sample code provided by Apple to load 3 separate UIViews

So I would like to modify the PageControl sample code provided by Apple so that instead of loading a single imageView and modifying a label through code, it loads 3 separate UIViews (3 pages with 3 dots at the bottom). I need to be able to create the 3 views in IB so that I can drag 12 buttons onto each view and connect the buttons to the actions in my code. I'm assuming that I will just drag 3 views into the "MyView.xib" file and then customize each of the views from there (vs. creating completely separate .xib files to hold each view).

So I need to alter the code so that it knows that the first page it should load (and the first dot of the page control) is "view1" in the "MyView.xib" file and that the second page it should load (and the second dot on the page control) is "view2" from the "MyView.xib" file and the the third page and third dot it should load is "view3" from the "MyView.xib" file.

If creating a separate .xib file each view would be better, then I need to know how to alter the PageContol sample code to tell it to load the first .xib file for the first page, the second .xib for the second page, and so on.

I know this is a very specific way of doing this, but I already have a working application that is built in this way (a single view with 12 buttons, all created in IB). All I'm trying to do is add a second and third page of buttons to offer more content. Trying get the UIScrollView/Paging implemented has been a nightmare.

Am I approaching this the right way? I've seen that many other people have had this problem, but I just can't seem to find any code that matches specifically what I'm trying to do here. Any and all help will be greatly appreciated.
MBC is offline   Reply With Quote
Reply

Bookmarks

Tags
pagecontrol, sample code, uiscrollview, uiview interface builder

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: 392
8 members and 384 guests
chemistry, daudrizek, jeroenkeij, Kirkout, PavelMik, whitey99
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,665
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, daudrizek
Powered by vBadvanced CMPS v3.1.0

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