What is the name for the view that manages the iPhone home screen? - iphone

My google-fu is failing here. I'm looking for the name of the UIView (or whatever it is) that handles several pages, with those little glowing dots indicating which page you're on.

UIScrollView is the name of the view with pages
UIPageControl is what you connect to it to add the dots

To expand on coneybeare's brief description, there is no special control that does the pages, it is simply a UIView within a UIScrollView with code to 'lock' the scrolling to certain spots (pages). The UIPageControl is simply a display of which position the scrollview is currently locked to.
A perfect example is Apple's sample code/demo here:
http://developer.apple.com/iphone/library/samplecode/PageControl/index.html

Related

XCode iOS - home screen style navigation

Sorry this is a pretty silly question, but I cannot think what the actual menu style is called. I'm trying to find a tutorial on how to create a instructions page that you flick through left and right to see more instructions. Basically exactly how the home screen works with dots representing how many screens there are and which screen the user is on, plus the same animation where if you flick left/right the next one slides on.
If anyone knows what these are commonly referred to as I can go look up some tutorials.
Thanks a lot,
Chris
This control is called a UIPageControl. And here's a link to a tutorial.
Use a UIScrollview with pagingEnabled.
add a UIPageControl to the view (wherever you want to see the dots).
Instruction pages should be added as subviews to the UIScrollView
Make sure to use UIScrollView and UIPageControl delegates to update the page in the pageControl.
If you need more info on how to implement this, search with keywords UIScrollView and UIPageControl

Rotating UILabels depending on page in UIScrollView like in Google+ App

I have an application with several (8) different Views in a UIScrollView. They are circling so that you get to the first when you try to get "behind" the last and vice versa.
My problem is how to create a titlebar like in the Stream of the Google+ App. There the titles are circling with the pages and show the current visible page.
How could I realize that? Would it be possible to create a general class to use such a view in many different apps?
I've already tried to solve this problem with some different approaches, but they all didn't work (well). I can display labels above my scrollView and move them, but how far and with which text seems to be difficult for me.
So now I'm looking forward to your answers ;D
Try using two UIScrollView, one for the content and one for the headers. The header UIScrollView would be controlled by your view controller that is also a delegate of the main UIScrollView. Update the header UIScrollView whenever you receive a -scrollViewDidScroll: message from the main UIScrollView.
I think you need to add label in customview and then add customviews in scrollView, you will get events for individual view, so you can rotate that view according to angle and keep label at fix place...

Whats the approach to create a view similar to the one at apple app store

I wanted to know how can we design the view controller such that.., the upper half of the screen remains fixed and the below part of the screen can be navigated through.. !!
Should we use slipScreenController here ?
Your description sounds nothing like the Appstore app but the Appstore app simply has one vertical UIScrollView and another horizontal UIScrollView inside that for images.
If you are referring to browsing categories in AppStore then:
That is a tableView implemented in such way that it doesn't take the whole screen area. You need to create a UIViewController (not UITableViewController) and than add a tableView to the view (using Interface Builder or code). That way you can change the size and position of the tableView and use the remaining area of the view for something else, for example a UISegmentedControl above the tableView.
If you are reffering to reading description and images of single app then I think that UIScrollView is used for displaying images, not sure about the rest.

Displaying one graph per day, home screen style

I'm working on an app that can display a graph with some data, one every day. I'll call this "dayGraph".
I'd like to build an interface similar to the iPhone home screen, aka pageControl, with one dayGraph per page. (but i don't need the small dots!)
I tried with the standard pageControl example from Apple, and it's working, but only with a small number of pages. I need to display even 100 possible dayGraph, if the user wants, but the pageControl is going crazy when the page number exceed 50.
I know that the photo app is doing a similar thing, and it can work with many photos.
My question is: How can i do that? Is there any "Apple way" of doing it, or i should begin to make my own method for swapping the dayGraphs?
Thank you very much!
If your goal is to enable swipe-based paging, the view you want to use is a UIScrollView. Set its pagingEnabled property to YES. Then add each graph as a subview of your UIScrollView, setting the frame of each graph to position each one on its own page extending beyond the bounds of your UIScrollView to the right. Finally, update the contentSize property of your UIScrollView to encompass all of your pages.
Now the user can swipe left and right to flip between the pages of your scroll view.
Note: If you add 50+ subviews to your scrollview, it's likely that you'll run into memory problems. To avoid this, you'll probably want just keep subviews loaded for the current page, plus the adjacent pages to the right and left. Set a delegate on your UIScrollView to an object that implements scrollViewDidEndDecelerating:. In that method, remove any subviews that aren't on the current or adjacent pages, and make sure each adjacent page has its subview loaded. That way you'll never have more than 3 pages of content in memory at one time.

Nested UIScrollView-iPhone photos application

I have been facing the same nested UIScrollView problem for long time.I tried some open source codes like Scrolling madness ,three-20 and others but all fails finaly.I am trying to make a photo Viewer application same as iPhone.For that I have created the structure like this:-
1)one View controller.
2)on view of view controller one UIScrollView (i.e inner/parent scroll view) as a child.
3)on inner/parent scroll view number of child scroll views(i.e. outer/child scroll views) ,each represents one page of photos application.
4)On each scroll view one image View on which i am displaying my image.
So what I want is when user scrolls the outer scroll view it should scroll horizontally with all the child views so I will get the look and feel of paging in photos application.Also when user is on one specific image(i.e. child/outer scroll view) he should be able to zoom in/out,swipes and perform single/double tapping.I was able to make it work in sdk 2.1,but it dosnt work since sdk 3.0.Please tell me the idea behind your project.Means which scroll view you are subclassing ,in which view to detect touches.How this completely child - parent relation should be.
If possible provide any sample code also.
There is a WWDC session from 2010 that deals with this very issue.
Here's the short of it:
You need a single scroll view that is paginated and scrolls horizontally. Each "page" of that scroll view is another scroll view containing a photo.
First, it looks like you want to subclass UIScrollView? Every interaction method you need is provided for you in either the delegate callbacks or the touch methods. (Many of Apple's more advanced classes, such as UIScrollView, react poorly to subclassing.)
Second, it sounds like you have a first responder problem. IOW, your innermost scrollview isn't getting the first crack at the touch events.
Andrew
I also struggled with this for a long time trying samples you mentioned. I could finally figure it out with the samples provided by apple (iphone dev center).
http://developer.apple.com/iphone/library/samplecode/Scrolling/Introduction/Intro.html
http://developer.apple.com/iphone/library/samplecode/ScrollViewSuite/Introduction/Intro.html
The first one is pretty basic and probably what u already have. The second one is all about zooming, etc. Just study these and the samples you already have, I think you will be able to figure it out. On specific topics just come back here search for answers or post another question.
EDIT: I forgot this one check out these examples by Andrey Tarantsov hosted on github. This is what you want... http://github.com/andreyvit/ScrollingMadness