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 10-11-2010, 05:54 PM   #1 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 34
Sachelis is on a distinguished road
Default UIPageControl and UITabBar

I developed a view that contains a UIScrollView which allows the user to flip through a few pages of images. It also has a UIPageControl. All this works fine in the small test app I used to work out the challenges (at least for me) of scrolling through multiple images and allowing pinch zooming. Then I moved it into my main app, which has a UITabBar. Unfortunately, the page control no longer appears. I saw the thread, http://www.iphonedevsdk.com/forum/ip...-uitabbar.html, from back in '08 which presents the problem, but not a solution.

I've tried changing the bounds and frame of the UIPageControl, made my UIScrollView tiny to make sure it isn't hiding the page control, etc. I'm unsure if the page control just isn't compatible with the tab bar, or if I've made some other mistake...
Sachelis is offline   Reply With Quote
Old 10-13-2010, 09:55 AM   #2 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 34
Sachelis is on a distinguished road
Default

I got this working and wanted to end the rumor (which I was perpetuating) that you can't have a UIPageControl with a UITabBar.

I initially based my scrolling using Apple's PageControl sample (https://developer.apple.com/library/...ion/Intro.html). That sample uses the AppDelegate to manage the scrolling. I must have made a mistake moving the code from the AppDelegate to a new UIViewController class, because I could never get the page control to display.

Later, I found this simple tutorial (David Janes' Code Weblog UIPageControl + UIScrollView) which shows how to use a UIPageControl and UIScrollView, but it handles the messages in a UIViewController. I dropped the tutorial’s ScrollingViewControl.h, .m, and .xib files in my project, routed my UITabBar to it, and instantly had a scrolling view with a tab bar and a page control indicator.

I've spent plenty of hours since getting things positioned, replacing the sample's images with views that will scroll, etc, but the bottom line is that you can definitely have a UIPageControl and a UITabBar (and a UINavigationController, FWIW) at the same time.
Sachelis is offline   Reply With Quote
Old 02-28-2011, 01:21 PM   #3 (permalink)
Registered Member
 
Join Date: Feb 2011
Location: North Carolina
Posts: 3
Spookytooth is on a distinguished road
Default Tab Bar and UIPageControl + UIScrollView

Quote:
Originally Posted by Sachelis View Post
I got this working and wanted to end the rumor (which I was perpetuating) that you can't have a UIPageControl with a UITabBar.

I initially based my scrolling using Apple's PageControl sample (https://developer.apple.com/library/...ion/Intro.html). That sample uses the AppDelegate to manage the scrolling. I must have made a mistake moving the code from the AppDelegate to a new UIViewController class, because I could never get the page control to display.

Later, I found this simple tutorial (David Janes' Code Weblog UIPageControl + UIScrollView) which shows how to use a UIPageControl and UIScrollView, but it handles the messages in a UIViewController. I dropped the tutorial’s ScrollingViewControl.h, .m, and .xib files in my project, routed my UITabBar to it, and instantly had a scrolling view with a tab bar and a page control indicator.

I've spent plenty of hours since getting things positioned, replacing the sample's images with views that will scroll, etc, but the bottom line is that you can definitely have a UIPageControl and a UITabBar (and a UINavigationController, FWIW) at the same time.
Would you happen to have example code you can share? I am working on the same thing, and have been falling into all the same pits apparently. Thanks in advance.
Spookytooth is offline   Reply With Quote
Old 03-01-2011, 07:22 AM   #4 (permalink)
Registered Member
 
Join Date: Feb 2011
Location: North Carolina
Posts: 3
Spookytooth is on a distinguished road
Default

Never mind. Actually read and clicked the link above. Thanks!
Spookytooth is offline   Reply With Quote
Old 01-25-2012, 04:18 PM   #5 (permalink)
Registered Member
 
geeo's Avatar
 
Join Date: Nov 2009
Posts: 30
geeo is on a distinguished road
Default

I try to do the same, from the same tutorial I guess How To: UIScrollView with Paging | iOS Dev Notes, I achieve to add the scroll view in one of the view of my tabbar application, but the uipagecontrol only update when I click on it (and it triggers the page change).

But when I scroll into my scrollview, scrollViewDidScroll isn't triggered.

I used the xCode 4 template for the tabbar application, and there is no windows.xib so I guess that I miss a delegate somewhere.

Any help would be appreciated.
geeo is offline   Reply With Quote
Reply

Bookmarks

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: 355
10 members and 345 guests
alexP, gordo26, headkaze, mistergreen2011, nobstudio, Objective Zero, rayjeong, revg, Sloshmonster, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,655
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, pungs
Powered by vBadvanced CMPS v3.1.0

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